Debian Codegraph @

mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result

raw
1 RESET MASTER;
2 CREATE TABLE t1 (c1 char(50)) ENGINE=MyISAM;
3 LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
4 LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE t1;
5 include/show_binlog_events.inc
6 Log_name Pos Event_type Server_id End_log_pos Info
7 master-bin.000001 # Gtid # # GTID #-#-#
8 master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50)) ENGINE=MyISAM
9 master-bin.000001 # Gtid # # BEGIN GTID #-#-#
10 master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
11 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=#
12 master-bin.000001 # Query # # COMMIT
13 master-bin.000001 # Gtid # # BEGIN GTID #-#-#
14 master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
15 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=#
16 master-bin.000001 # Query # # COMMIT
17 DROP TABLE t1;
18 include/master-slave.inc
19 [connection master]
20 select last_insert_id();
21 last_insert_id()
22 0
23 create table t1(a int not null auto_increment, b int, primary key(a) );
24 load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
25 select last_insert_id();
26 last_insert_id()
27 1
28 create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
29 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;
30 create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
31 insert into t3 select * from t2;
32 connection slave;
33 select * from t1;
34 a b
35 1 10
36 2 15
37 select * from t3;
38 day id category name
39 2003-02-22 2461 b a a a @ %  ' " a
40 2003-03-22 2161 c asdf
41 2003-03-22 2416 a bbbbb
42 connection master;
43 drop table t1;
44 drop table t2;
45 drop table t3;
46 create table t1(a int, b int, unique(b));
47 connection slave;
48 insert into t1 values(1,10);
49 connection master;
50 load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
51 connection slave;
52 call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* error.* 1062");
53 call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*error.* 0");
54 include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
55 include/check_slave_no_error.inc
56 connection master;
57 set sql_log_bin=0;
58 delete from t1;
59 set sql_log_bin=1;
60 load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
61 connection slave;
62 include/wait_for_slave_sql_error.inc [errno=1062]
63 include/stop_slave_io.inc
64 change master to master_user='test';
65 change master to master_user='root';
66 include/check_slave_no_error.inc
67 set global sql_slave_skip_counter=1;
68 start slave;
69 connection master;
70 set sql_log_bin=0;
71 delete from t1;
72 set sql_log_bin=1;
73 load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
74 connection slave;
75 include/wait_for_slave_sql_error.inc [errno=1062]
76 stop slave;
77 include/reset_slave.inc
78 Warnings:
79 Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-14. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
80 include/check_slave_no_error.inc
81 connection master;
82 reset master;
83 create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
84 unique(day)) engine=MyISAM;
85 load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
86 terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
87 '\n##\n' starting by '>' ignore 1 lines;
88 ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
89 select * from t2;
90 day id category name
91 2003-02-22 2461 b a a a @ %  ' " a
92 2003-03-22 2161 c asdf
93 connection slave;
94 start slave;
95 select * from t2;
96 day id category name
97 2003-02-22 2461 b a a a @ %  ' " a
98 2003-03-22 2161 c asdf
99 alter table t2 drop key day;
100 connection master;
101 delete from t2;
102 load data CONCURRENT infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
103 terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
104 '\n##\n' starting by '>' ignore 1 lines;
105 ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
106 connection slave;
107 include/wait_for_slave_sql_error.inc [errno=0]
108 drop table t1, t2;
109 connection master;
110 drop table t1, t2;
111 CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
112 LOAD DATA CONCURRENT INFILE "../../std_data/words.dat" INTO TABLE t1;
113 ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY'
114 DROP TABLE t1;
115 include/rpl_reset.inc
116 connection master;
117 drop database if exists b48297_db1;
118 drop database if exists b42897_db2;
119 create database b48297_db1;
120 create database b42897_db2;
121 use b48297_db1;
122 CREATE TABLE t1 (c1 VARCHAR(256)) engine=MyISAM;;
123 use b42897_db2;
124 ### assertion: works with cross-referenced database
125 LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
126 use b48297_db1;
127 ### assertion: works with fully qualified name on current database
128 LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
129 ### assertion: works without fully qualified name on current database
130 LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1;
131 ### create connection without default database
132 connect conn2,localhost,root,,*NO-ONE*;
133 connection conn2;
134 ### assertion: works without stating the default database
135 LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
136 disconnect conn2;
137 connection master;
138 connection slave;
139 use b48297_db1;
140 include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1]
141 connection master;
142 DROP DATABASE b48297_db1;
143 DROP DATABASE b42897_db2;
144 connection slave;
145 include/rpl_reset.inc
146 connection master;
147 use test;
148 CREATE TABLE t1 (`key` TEXT, `text` TEXT);
149 LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ',';
150 SELECT * FROM t1;
151 key text
152 Field A 'Field B'
153 Field 1 'Field 2'
154 Field 3 'Field 4'
155 'Field 5' 'Field 6'
156 Field 6 'Field 7'
157 connection slave;
158 connection master;
159 DROP TABLE t1;
160 include/rpl_end.inc