Skip to content

Commit

Permalink
Bug#29769293: ERROR 1236 "MASTER HAS PURGED BINARY LOGS CONTAINING GT…
Browse files Browse the repository at this point in the history
…IDS": GTID NOT LOGGED

Problem
-------
The tests rpl.rpl_gtid_purged_fail_to_connect.test and
rpl.rpl_gtid_deleted_binlog_fail_to_connect.test are sporadically failing
on daily-5.6 because of the below warning found in error log.

[Warning] Slave SQL: Request to stop slave SQL Thread received while
applying a group that has non-transactional changes; waiting for completion
of the group...

Analysis & Fix
--------------
This warning is generated from applier thread when it is applying the test
suppressions into non-transactional engine (MyISAM).

Fix is to stop the slave before calling test suppressions.

Reviewed by: Pedro Figueiredo <[email protected]>
  • Loading branch information
vpvenugo committed Nov 22, 2019
1 parent 4b008ed commit 13beff1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ include/assert_grep.inc [Found warning containing lost GTIDs in the slave error
CHANGE MASTER TO MASTER_LOG_FILE = 'MASTER_FILE', 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]
include/stop_slave.inc
[connection master]
CALL mtr.add_suppression("Cannot replicate to server.*server has purged required binary logs.*");
CALL mtr.add_suppression("Failed to open log");
CALL mtr.add_suppression("Could not open log");
[connection slave]
CALL mtr.add_suppression("Got fatal error 1236 from master.*Replicate the missing transactions from elsewhere");
include/stop_slave.inc
#
# 7) Cleanup.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ include/assert_grep.inc [Found a message about the long GTIDs in the slave error
CHANGE MASTER TO MASTER_LOG_FILE = 'MASTER_FILE', 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]
include/stop_slave.inc
include/assert_grep.inc [Found warning containing lost GTIDs in the master error log.]
include/assert_grep.inc [Found warning containing lost GTIDs in the slave error log.]
[connection master]
Expand All @@ -67,7 +68,6 @@ CALL mtr.add_suppression("Got fatal error 1236 from master.*Replicate the missin
# 7) Cleanup.
#
[connection slave]
include/stop_slave.inc
RESET MASTER;
RESET SLAVE;
[connection master]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ START SLAVE;
--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
--source include/stop_slave.inc

# Suppress the error on master.
--source include/rpl_connection_master.inc
Expand All @@ -127,7 +128,6 @@ CALL mtr.add_suppression("Could not open log");
# Suppress the error on slave.
--source include/rpl_connection_slave.inc
CALL mtr.add_suppression("Got fatal error 1236 from master.*Replicate the missing transactions from elsewhere");
--source include/stop_slave.inc

--echo #
--echo # 7) Cleanup.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ eval CHANGE MASTER TO MASTER_LOG_FILE = '$master_file', MASTER_LOG_POS = $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
--source include/stop_slave.inc

# Verify that warning about the missing transactions are logged into the master's error log.
--let $assert_file=$MYSQLTEST_VARDIR/log/mysqld.1.err
Expand Down Expand Up @@ -159,7 +160,6 @@ CALL mtr.add_suppression("Got fatal error 1236 from master.*Replicate the missin
--echo # 7) Cleanup.
--echo #
--source include/rpl_connection_slave.inc
--source include/stop_slave.inc
RESET MASTER;
RESET SLAVE;
--source include/rpl_connection_master.inc
Expand Down

0 comments on commit 13beff1

Please sign in to comment.