mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#37373: rpl_ndb_transaction fails sporadically in pb on sol10-amd64-a and sol10-sparc-a
Problem: rpl_ndb_transaction fails because it assumes nothing is written to the binlog at a certain point. However, ndb may binlog updates in ndb system tables at a nondeterministic time point after an ndb table update has been committed. Fix: break the test into two. rpl_ndb_transaction still does the ndb updates needed by the first half of the test. The new test case rpl_bug26395 includes the part that assumes nothing more will be written to the binlog. mysql-test/include/sync_slave_io_with_master.inc: Like sync_slave_with_master, but only waits until the IO thread has synced; the SQL thread may still be behind. mysql-test/suite/rpl/r/rpl_bug26395.result: New result file. mysql-test/suite/rpl/t/rpl_bug26395-master.opt: New option file. mysql-test/suite/rpl/t/rpl_bug26395-slave.opt: New option file. mysql-test/suite/rpl/t/rpl_bug26395.test: - Moved second half of rpl_ndb_transaction here. - Improved the test case: instead of using a sleep, it waits for the slave's io thread to sync up to a proper position, and for the slave's sql thread to sync up to another position. - Added a warning that no more tests should be added at the end of the file. mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result: Updated and renamed result file. mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-master.opt: No need for the special debug flag any more, it was used by the second part of the test which is now in rpl_bug26395. Also renamed the file. mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions-slave.opt: Renamed option file. mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test: - Moved second half of the test to another test (rpl_bug26395) - Improved comments. - Extended the mixed transaction test to include also innodb. - Used 'source include/diff_tables.inc' instead of listing several identical tables in the result file. - Renamed the test.
This commit is contained in:
25
mysql-test/include/sync_slave_io_with_master.inc
Normal file
25
mysql-test/include/sync_slave_io_with_master.inc
Normal file
@ -0,0 +1,25 @@
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# Waits until the slave IO thread has been synced, i.e., all events
|
||||
# have been copied over to slave. Does not care if the SQL thread is
|
||||
# in sync.
|
||||
#
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
# Syncs to the current position on master, as found by SHOW MASTER
|
||||
# STATUS.
|
||||
#
|
||||
# Must be called on the master.
|
||||
|
||||
let $_master_file= query_get_value("SHOW MASTER STATUS", File, 1);
|
||||
let $_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1);
|
||||
|
||||
connection slave;
|
||||
|
||||
let $slave_param= Master_Log_File;
|
||||
let $slave_param_value= $_master_file;
|
||||
source include/wait_for_slave_param.inc;
|
||||
let $slave_param= Read_Master_Log_Pos;
|
||||
let $slave_param_value= $_master_pos;
|
||||
source include/wait_for_slave_param.inc;
|
Reference in New Issue
Block a user