summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-04-03 19:55:37 +0300
committerunknown <monty@narttu.mysql.fi>2003-04-03 19:55:37 +0300
commit5f5b6a7cea8ad5f1594e0dc1f72e3e00855c892b (patch)
treec9a11b51aa48ec7aafde041e18ad44ef0c527385
parent1834b6ff4955a0e7f19638a1abd5de5ab9eaed73 (diff)
parent9c1c76bf2ee09bd4f1308e31a5b1b88f06f39431 (diff)
downloadmariadb-git-5f5b6a7cea8ad5f1594e0dc1f72e3e00855c892b.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0 BitKeeper/etc/logging_ok: auto-union sql/log_event.cc: Auto merged
-rw-r--r--BitKeeper/etc/logging_ok1
-rw-r--r--mysql-test/r/rpl_loaddata.result11
-rw-r--r--mysql-test/t/rpl_loaddata.test20
-rw-r--r--sql/log_event.cc7
4 files changed, 37 insertions, 2 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index 71e7c58cda7..dbd4df6efe4 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -94,6 +94,7 @@ tonu@volk.internalnet
tonu@x153.internalnet
tonu@x3.internalnet
venu@work.mysql.com
+vva@eagle.mysql.r18.ru
vva@genie.(none)
walrus@kishkin.ru
walrus@mysql.com
diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result
index 27f3d185f63..c1518e8e29a 100644
--- a/mysql-test/r/rpl_loaddata.result
+++ b/mysql-test/r/rpl_loaddata.result
@@ -6,8 +6,19 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
+create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
+load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' ignore 1 lines;
+create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
+insert into t3 select * from t2;
select * from t1;
a b
1 10
2 15
+select * from t3;
+day id category name
+2003-02-22 2461 b a a a @ %  ' " a
+2003-03-22 2161 c asdf
+2003-04-22 2416 a bbbbb
drop table t1;
+drop table t2;
+drop table t3;
diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test
index d7fc2a10ca4..2acb67dfce2 100644
--- a/mysql-test/t/rpl_loaddata.test
+++ b/mysql-test/t/rpl_loaddata.test
@@ -1,16 +1,34 @@
# See if replication of a "LOAD DATA in an autoincrement column"
# Honours autoincrement values
# i.e. if the master and slave have the same sequence
+#
+# check replication of load data for temporary tables with additional parameters
+#
source include/master-slave.inc;
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
+
+create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
+#load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionaly enclosed by '%' escaped by '@' lines terminated by '\n%%\n' ignore 1 lines;
+ load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' ignore 1 lines;
+
+create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
+insert into t3 select * from t2;
+
save_master_pos;
connection slave;
sync_with_master;
-select * from t1;
+
+select * from t1;
+select * from t3;
+
connection master;
+
drop table t1;
+drop table t2;
+drop table t3;
+
save_master_pos;
connection slave;
sync_with_master;
diff --git a/sql/log_event.cc b/sql/log_event.cc
index f39ff643f21..9ed672d8d4e 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1868,6 +1868,11 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
String line_term(sql_ex.line_term,sql_ex.line_term_len);
String line_start(sql_ex.line_start,sql_ex.line_start_len);
String escaped(sql_ex.escaped,sql_ex.escaped_len);
+ ex.field_term= &field_term;
+ ex.enclosed= &enclosed;
+ ex.line_term= &line_term;
+ ex.line_start= &line_start;
+ ex.escaped= &escaped;
ex.opt_enclosed = (sql_ex.opt_flags & OPT_ENCLOSED_FLAG);
if (sql_ex.empty_flags & FIELD_TERM_EMPTY)
@@ -1876,7 +1881,7 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
ex.skip_lines = skip_lines;
List<Item> field_list;
set_fields(field_list);
- thd->slave_proxy_id = thd->thread_id;
+ thd->slave_proxy_id = thread_id;
if (net)
{
// mysql_load will use thd->net to read the file