mariadb/mysql-test/suite/rpl/r/rpl_loaddata_map.result
Sven Sandberg 620c4878b3 BUG#38178: rpl_loaddata_map fails sporadically in pushbuild
Problem: master binlog has 'create table t1'. Master binlog
was removed before slave could replicate it. In test's cleanup
code, master did 'drop table t1', which caused slave sql
thread to stop with an error since slave sql thread did not
know about t1.
Fix: t1 is just an auxiliary construction, only needed on
master. Hence, we turn off binlogging before t1 is created,
drop t1 as soon as we don't need it anymore, and then turn
on binlogging again.


mysql-test/include/show_binlog_events.inc:
  Filter out directories and block_len from
  LOAD DATA INFILE events.
mysql-test/suite/rpl/r/rpl_loaddata_map.result:
  updated result file
mysql-test/suite/rpl/t/rpl_loaddata_map.test:
  Turn off binlogging while t1 is used, drop t1 as soon
  as we don't need it anymore, and turn on binlogging again.
  Also added some comments and replaced 'show binlog events'
  by 'source include/show_binlog_events.inc'.
2008-07-18 13:34:19 +02:00

31 lines
1.2 KiB
Text

stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
==== Create a big file ====
==== Load our big file into a table ====
create table t2 (id int not null primary key auto_increment);
select @@session.read_buffer_size - @@session.max_allowed_packet > 0 ;
@@session.read_buffer_size - @@session.max_allowed_packet > 0
1
load data infile 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2;
select count(*) from t2 /* 5 000 */;
count(*)
5000
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 t2 (id int not null primary key auto_increment)
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
master-bin.000001 # Append_block # # ;file_id=#;block_len=#
master-bin.000001 # Append_block # # ;file_id=#;block_len=#
master-bin.000001 # Execute_load_query # # use `test`; load data infile 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2 ;file_id=#
==== Verify results on slave ====
[on slave]
select count(*) from t2 /* 5 000 */;
count(*)
5000
==== Clean up ====
[on master]
drop table t2;