1 CREATE TABLE t1 (c1 char(50));
2 LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
3 LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE t1;
4 show binlog events from <binlog_start>;
5 Log_name Pos Event_type Server_id End_log_pos Info
6 master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50))
7 master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
8 master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`c1`) ;file_id=#
9 master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
10 master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`c1`) ;file_id=#
12 include/master-slave.inc
14 select last_insert_id();
17 create table t1(a int not null auto_increment, b int, primary key(a) );
18 load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
19 select last_insert_id();
22 create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
23 load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
24 create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
25 insert into t3 select * from t2;
32 2003-02-22 2461 b a a a @ %
\b ' " a
33 2003-03-22 2161 c asdf
34 2003-03-22 2416 a bbbbb
38 create table t1(a int, b int, unique(b));
39 insert into t1 values(1,10);
40 load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
41 call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
42 call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
43 include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
44 include/check_slave_no_error.inc
48 load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
49 include/wait_for_slave_sql_error.inc [errno=1062]
50 include/stop_slave_io.inc
51 change master to master_user='test';
52 change master to master_user='root';
53 include/check_slave_no_error.inc
54 set global sql_slave_skip_counter=1;
59 load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
60 include/wait_for_slave_sql_error.inc [errno=1062]
63 include/check_slave_no_error.inc
65 create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
66 unique(day)) engine=MyISAM;
67 load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
68 terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
69 '\n##\n' starting by '>' ignore 1 lines;
70 ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
73 2003-02-22 2461 b a a a @ %
\b ' " a
74 2003-03-22 2161 c asdf
78 2003-02-22 2461 b a a a @ %
\b ' " a
79 2003-03-22 2161 c asdf
80 alter table t2 drop key day;
82 load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
83 terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
84 '\n##\n' starting by '>' ignore 1 lines;
85 ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
86 include/wait_for_slave_sql_to_stop.inc
88 include/stop_slave_io.inc
90 CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
91 LOAD DATA CONCURRENT INFILE "../../std_data/words.dat" INTO TABLE t1;
92 ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY'
93 DROP TABLE IF EXISTS t1;
95 drop database if exists b48297_db1;
96 drop database if exists b42897_db2;
97 create database b48297_db1;
98 create database b42897_db2;
100 CREATE TABLE t1 (c1 VARCHAR(256)) engine=MyISAM;;
102 ### assertion: works with cross-referenced database
103 LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
105 ### assertion: works with fully qualified name on current database
106 LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
107 ### assertion: works without fully qualified name on current database
108 LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1;
109 ### create connection without default database
110 ### connect (conn2,localhost,root,,*NO-ONE*);
111 ### assertion: works without stating the default database
112 LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
113 ### disconnect and switch back to master connection
115 include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1]
116 DROP DATABASE b48297_db1;
117 DROP DATABASE b42897_db2;
118 include/rpl_reset.inc
120 CREATE TABLE t1 (`key` TEXT, `text` TEXT);
121 LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ',';