Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result |
CREATE TABLE t1 (c1 char(50)); LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE t1; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50)) master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ DROP TABLE t1; include/master-slave.inc [connection master] select last_insert_id(); last_insert_id() 0 create table t1(a int not null auto_increment, b int, primary key(a) ); load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; select last_insert_id(); last_insert_id() 1 create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60)); 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; 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-03-22 2416 a bbbbb drop table t1; drop table t2; drop table t3; create table t1(a int, b int, unique(b)); insert into t1 values(1,10); load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; include/wait_for_slave_sql_error_and_skip.inc [errno=1062] include/check_slave_no_error.inc set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; include/wait_for_slave_sql_error.inc [errno=1062] include/stop_slave_io.inc change master to master_user='test'; change master to master_user='root'; include/check_slave_no_error.inc set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; delete from t1; set sql_log_bin=1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; include/wait_for_slave_sql_error.inc [errno=1062] stop slave; reset slave; include/check_slave_no_error.inc reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; 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; ERROR 23000: Duplicate entry '2003-03-22' for key 'day' select * from t2; day id category name 2003-02-22 2461 b a a a @ % ' " a 2003-03-22 2161 c asdf start slave; select * from t2; day id category name 2003-02-22 2461 b a a a @ % ' " a 2003-03-22 2161 c asdf alter table t2 drop key day; delete from t2; 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; ERROR 23000: Duplicate entry '2003-03-22' for key 'day' drop table t1, t2; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; LOAD DATA CONCURRENT INFILE "../../std_data/words.dat" INTO TABLE t1; ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' DROP TABLE t1; include/rpl_reset.inc drop database if exists b48297_db1; drop database if exists b42897_db2; create database b48297_db1; create database b42897_db2; use b48297_db1; CREATE TABLE t1 (c1 VARCHAR(256)) engine=MyISAM;; use b42897_db2; ### assertion: works with cross-referenced database LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1; use b48297_db1; ### assertion: works with fully qualified name on current database LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1; ### assertion: works without fully qualified name on current database LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1; ### create connection without default database ### connect (conn2,localhost,root,,*NO-ONE*); ### assertion: works without stating the default database LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1; ### disconnect and switch back to master connection use b48297_db1; include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; include/rpl_reset.inc use test; CREATE TABLE t1 (`key` TEXT, `text` TEXT); LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ','; SELECT * FROM t1; key text Field A 'Field B' Field 1 'Field 2' Field 3 'Field 4' 'Field 5' 'Field 6' Field 6 'Field 7' DROP TABLE t1; include/rpl_end.inc