3637 Andrei Elkin 2012-02-16
Bug#13727933 - PURGE BINARY LOGS TO MIGHT BE INEFFECTIVE AND NOT VERBOSE ABOUT THAT
This is a workaround patch as PURGE can't be used so RESET MASTER is attempted as a tool
to remove binlog files and thereby to desynchronize master and slave wrt GTID data.
I had to change the test in three more parts: two are the local slave side
INSERT and DROP as parts of the workaround, and
yet another
--source include/have_binlog_format_mixed_or_statement.inc
due to a new being reported Bug 13729084.
@ mysql-test/suite/rpl/r/rpl_gtid_lost_fail_to_connect.result
results updated.
@ mysql-test/suite/rpl/t/rpl_gtid_lost_fail_to_connect.test
PURGE can't be used so RESET MASTER is attempted as a tool to remove binlog files
and thereby to desynchronize master and slave wrt GTID data.
modified:
mysql-test/suite/rpl/r/rpl_gtid_lost_fail_to_connect.result
mysql-test/suite/rpl/t/rpl_gtid_lost_fail_to_connect.test
3636 Luis Soares 2012-02-16
WL#3584
Renaming back the collection.
renamed:
mysql-test/collections/mysql-trunk-wl3584-release-builds.push => mysql-test/collections/mysql-trunk-wl3584-gtid-ON.push
=== modified file 'mysql-test/suite/rpl/r/rpl_gtid_lost_fail_to_connect.result'
--- a/mysql-test/suite/rpl/r/rpl_gtid_lost_fail_to_connect.result 2012-02-01 14:51:39 +0000
+++ b/mysql-test/suite/rpl/r/rpl_gtid_lost_fail_to_connect.result 2012-02-16 21:25:06 +0000
@@ -9,17 +9,18 @@ include/gtid_utils.inc
CREATE TABLE t1 (a INT) ENGINE = InnoDB;
include/stop_slave.inc
INSERT INTO t1 VALUES (1);
-FLUSH LOGS;
+RESET MASTER;
+INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (2);
-PURGE BINARY LOGS TO 'master-bin.000002';
CHANGE MASTER TO MASTER_AUTO_POSITION = 1;
START SLAVE;
include/wait_for_slave_io_error.inc [errno=1236 # ER_MASTER_FATAL_ERROR_READING_BINLOG]
include/stop_slave_sql.inc
-CHANGE MASTER TO MASTER_LOG_FILE = 'master-bin.000002', MASTER_LOG_POS = MASTER_POS, MASTER_AUTO_POSITION = 0;
+CHANGE MASTER TO MASTER_LOG_FILE = 'master-bin.000001', MASTER_LOG_POS = MASTER_POS, MASTER_AUTO_POSITION = 0;
include/start_slave.inc
include/assert.inc [t1 should contain only one row with the value 2]
######## Clean up ########
DROP TABLE t1;
+DROP TABLE t1;
include/gtid_utils_end.inc
include/rpl_end.inc
=== modified file 'mysql-test/suite/rpl/t/rpl_gtid_lost_fail_to_connect.test'
--- a/mysql-test/suite/rpl/t/rpl_gtid_lost_fail_to_connect.test 2012-02-01 14:51:39 +0000
+++ b/mysql-test/suite/rpl/t/rpl_gtid_lost_fail_to_connect.test 2012-02-16 21:25:06 +0000
@@ -18,8 +18,14 @@
--source include/have_debug.inc
--source include/have_gtid.inc
-
--source include/master-slave.inc
+
+# Bug 13729084
+# Row format makes
+# the replicated `INSERT INTO t1 VALUES (2)' to be applied
+# whereas it should not be that way so the assert fires.
+--source include/have_binlog_format_mixed_or_statement.inc
+
call mtr.add_suppression("Got fatal error 1236 from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.");
--source include/gtid_utils.inc
@@ -32,15 +38,27 @@ CREATE TABLE t1 (a INT) ENGINE = InnoDB;
--connection master
INSERT INTO t1 VALUES (1);
-FLUSH LOGS;
+
+#FLUSH LOGS;
+#--let $master_file= query_get_value(SHOW MASTER STATUS, File, 1)
+#--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+#INSERT INTO t1 VALUES (2);
+#eval PURGE BINARY LOGS TO '$master_file';
+# Bug 13727933 prevents using PURGE
+# Todo: restore PURGE and remove the following workaround
+
+RESET MASTER;
--let $master_file= query_get_value(SHOW MASTER STATUS, File, 1)
--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
INSERT INTO t1 VALUES (2);
--save_master_pos
-eval PURGE BINARY LOGS TO '$master_file';
--connection slave
+
+INSERT INTO t1 VALUES (2); # Todo: remove as a part of Bug 13727933 workaround
+
CHANGE MASTER TO MASTER_AUTO_POSITION = 1;
+
START SLAVE;
--let $slave_io_errno= 1236 # ER_MASTER_FATAL_ERROR_READING_BINLOG
--source include/wait_for_slave_io_error.inc
@@ -52,6 +70,7 @@ eval CHANGE MASTER TO MASTER_LOG_FILE =
--source include/start_slave.inc
--sync_with_master
+
--let $assert_text= t1 should contain only one row with the value 2
--let $assert_cond= "[SELECT COUNT(*) FROM t1]" = "1" AND "[SELECT * FROM t1]" = "2"
--source include/assert.inc
@@ -59,5 +78,9 @@ eval CHANGE MASTER TO MASTER_LOG_FILE =
--echo ######## Clean up ########
--connection master
DROP TABLE t1;
+
+--connection slave
+DROP TABLE t1; #Todo: remove as a part of Bug 13727933 workaround
+
--source include/gtid_utils_end.inc
--source include/rpl_end.inc
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-wl3584 branch (andrei.elkin:3636 to 3637)Bug#13727933 | Andrei Elkin | 20 Feb |