mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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'.
This commit is contained in:
@ -4,6 +4,8 @@ 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
|
||||
@ -12,15 +14,18 @@ load data infile 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2;
|
||||
select count(*) from t2 /* 5 000 */;
|
||||
count(*)
|
||||
5000
|
||||
show binlog events in 'master-bin.000002' from <binlog_start>;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000002 # Query # # use `test`; create table t2 (id int not null primary key auto_increment)
|
||||
master-bin.000002 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000002 # Append_block # # ;file_id=#;block_len=#
|
||||
master-bin.000002 # Append_block # # ;file_id=#;block_len=#
|
||||
master-bin.000002 # Execute_load_query # # use `test`; load data infile 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2 ;file_id=#
|
||||
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
|
||||
drop table t1, t2;
|
||||
end of the tests
|
||||
==== Clean up ====
|
||||
[on master]
|
||||
drop table t2;
|
||||
|
Reference in New Issue
Block a user