2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
8
select last_insert_id();
11
create table t1(a int not null auto_increment, b int, primary key(a) );
12
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
13
select last_insert_id();
16
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
17
load data 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;
18
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
19
insert into t3 select * from t2;
26
2003-02-22 2461 b a a a @ % ' " a
27
2003-03-22 2161 c asdf
28
2003-03-22 2416 a bbbbb
32
create table t1(a int, b int, unique(b));
33
insert into t1 values(1,10);
34
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
35
set global sql_slave_skip_counter=1;
43
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
45
change master to master_user='test';
46
change master to master_user='root';
50
set global sql_slave_skip_counter=1;
55
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
62
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
63
unique(day)) engine=MyISAM;
64
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
65
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
66
'\n##\n' starting by '>' ignore 1 lines;
67
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
70
2003-02-22 2461 b a a a @ % ' " a
71
2003-03-22 2161 c asdf
75
2003-02-22 2461 b a a a @ % ' " a
76
2003-03-22 2161 c asdf
77
alter table t2 drop key day;
79
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
80
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
81
'\n##\n' starting by '>' ignore 1 lines;
82
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
85
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
86
LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1;
87
ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY'
88
DROP TABLE IF EXISTS t1;
90
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
93
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
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 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 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 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 LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
113
### disconnect and switch back to master connection
115
Comparing tables master:b48297_db1.t1 and slave:b48297_db1.t1
116
DROP DATABASE b48297_db1;
117
DROP DATABASE b42897_db2;
119
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
122
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
125
CREATE TABLE t1 (`key` TEXT, `text` TEXT);
126
LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ',';