mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
0ac501c79a
Actually, the failure happened with 3innodb as well. Most probably the reason is in failing to delete a binlog file on __NT__ so that that master increments the index of the binlog file. The test results hide valueable warning that windows could generate about that. The scope of this fix is to make sure we have such warning and to lessen chances for binlog file being held at time of closing. The dump thread is getting a good chance to leave and release the file for its successful deletion. We shall watch over the two tests as regression is not excluded. In that case we would have an extra info possibly explaining why __NT__ env can not close/delete the file. However, regardless of that reason, there is alwasy workaround to mask out non-deterministic binlog index number. mysql-test/extra/rpl_tests/rpl_truncate_helper.test: enable warnings for other than DROP queries; wait for slave's full stop which ensures io thread left and that will be regarded by dump thread to leave and close the binlog file; relocating reset master to the end of the test so that the caller of this helper should start with the binlog name which has not yet been affected/reset since its creation. mysql-test/suite/rpl/r/rpl_truncate_2myisam.result: results changed mysql-test/suite/rpl/r/rpl_truncate_3innodb.result: results changed
42 lines
930 B
Text
42 lines
930 B
Text
connection slave;
|
|
STOP SLAVE;
|
|
source include/wait_for_slave_to_stop.inc;
|
|
connection master;
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
--enable_warnings
|
|
connection slave;
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1;
|
|
--enable_warnings
|
|
RESET SLAVE;
|
|
START SLAVE;
|
|
|
|
--echo **** On Master ****
|
|
connection master;
|
|
eval SET SESSION BINLOG_FORMAT=$format;
|
|
eval SET GLOBAL BINLOG_FORMAT=$format;
|
|
|
|
eval CREATE TABLE t1 (a INT, b LONG) ENGINE=$engine;
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
SELECT * FROM t1;
|
|
--echo **** On Slave ****
|
|
sync_slave_with_master;
|
|
INSERT INTO t1 VALUE (3,3);
|
|
SELECT * FROM t1;
|
|
--echo **** On Master ****
|
|
connection master;
|
|
eval $stmt t1;
|
|
SELECT * FROM t1;
|
|
--echo **** On Slave ****
|
|
sync_slave_with_master;
|
|
# Should be empty
|
|
SELECT * FROM t1;
|
|
--echo **** On Master ****
|
|
connection master;
|
|
DROP TABLE t1;
|
|
let $SERVER_VERSION=`select version()`;
|
|
source include/show_binlog_events.inc;
|
|
|
|
connection master;
|
|
RESET MASTER;
|