mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
1fb36976d6
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.
41 lines
852 B
Text
41 lines
852 B
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;
|
|
==== Initialize ====
|
|
[on master]
|
|
CREATE TABLE tinnodb (a INT) ENGINE = INNODB;
|
|
SHOW CREATE TABLE tinnodb;
|
|
Table Create Table
|
|
tinnodb CREATE TABLE `tinnodb` (
|
|
`a` int(11) DEFAULT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
set @old_debug= @@debug;
|
|
set @@debug= 'd,do_not_write_xid';
|
|
==== Test ====
|
|
INSERT INTO tinnodb VALUES (1);
|
|
SELECT * FROM tinnodb ORDER BY a;
|
|
a
|
|
1
|
|
[on slave]
|
|
==== Verify results on slave ====
|
|
STOP SLAVE;
|
|
SELECT "" AS Slave_IO_State;
|
|
Slave_IO_State
|
|
|
|
SELECT "" AS Last_SQL_Error;
|
|
Last_SQL_Error
|
|
|
|
SELECT "" AS Last_IO_Error;
|
|
Last_IO_Error
|
|
|
|
SELECT * FROM tinnodb ORDER BY a;
|
|
a
|
|
==== Clean up ====
|
|
[on master]
|
|
DROP TABLE tinnodb;
|
|
set @@debug= @old_debug;
|
|
[on slave]
|
|
DROP TABLE tinnodb;
|