From 8199ed9ceb9e1112f71056beda536cb4d4195a1c Mon Sep 17 00:00:00 2001 From: Venkatesh Venugopal Date: Tue, 19 Nov 2019 20:18:25 +0530 Subject: [PATCH] Bug#29769293: ERROR 1236 "MASTER HAS PURGED BINARY LOGS CONTAINING GTIDS": GTID NOT LOGGED Stabilize the test rpl_gtid_deleted_binlog_fail_to_connect.test on Windows. Reviewed by: Pedro Gomes --- .../rpl/r/rpl_gtid_deleted_binlog_fail_to_connect.result | 2 -- .../suite/rpl/t/rpl_gtid_deleted_binlog_fail_to_connect.test | 2 ++ sql/binlog.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_gtid_deleted_binlog_fail_to_connect.result b/mysql-test/suite/rpl/r/rpl_gtid_deleted_binlog_fail_to_connect.result index b17fd65fdc55..305a169aab5a 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_deleted_binlog_fail_to_connect.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_deleted_binlog_fail_to_connect.result @@ -59,8 +59,6 @@ RESET MASTER; RESET SLAVE; [connection master] RESET MASTER; -Warnings: -Warning 1612 Being purged log ./master-bin.000001 was not found [connection slave] include/start_slave.inc [connection master] diff --git a/mysql-test/suite/rpl/t/rpl_gtid_deleted_binlog_fail_to_connect.test b/mysql-test/suite/rpl/t/rpl_gtid_deleted_binlog_fail_to_connect.test index 6fc791d7a183..6c5467156bda 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_deleted_binlog_fail_to_connect.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_deleted_binlog_fail_to_connect.test @@ -132,6 +132,7 @@ CALL mtr.add_suppression("Got fatal error 1236 from master.*Replicate the missin --echo # --echo # 7) Cleanup. --echo # +--disable_warnings RESET MASTER; RESET SLAVE; --source include/rpl_connection_master.inc @@ -141,4 +142,5 @@ RESET MASTER; --source include/rpl_connection_master.inc DROP TABLE t1; --source include/sync_slave_sql_with_master.inc +--enable_warnings --source include/rpl_end.inc diff --git a/sql/binlog.cc b/sql/binlog.cc index b58d92ae0fa5..fa5f8073aa9e 100644 --- a/sql/binlog.cc +++ b/sql/binlog.cc @@ -7795,7 +7795,7 @@ void MYSQL_BIN_LOG::report_missing_purged_gtids(const Gtid_set* slave_executed_g /* Buffer for formatting the message about the missing GTIDs. */ static char buff[MYSQL_ERRMSG_SIZE]; - snprintf(buff, MYSQL_ERRMSG_SIZE, *errmsg, gtid_info.str().c_str()); + my_snprintf(buff, MYSQL_ERRMSG_SIZE, *errmsg, gtid_info.str().c_str()); *errmsg= const_cast(buff); my_free(missing_gtids); @@ -7869,7 +7869,7 @@ void MYSQL_BIN_LOG::report_missing_gtids(const Gtid_set* previous_gtid_set, " GTID_SUBTRACT"); /* Buffer for formatting the message about the missing GTIDs. */ static char buff[MYSQL_ERRMSG_SIZE]; - snprintf(buff, MYSQL_ERRMSG_SIZE, *errmsg, gtid_info.str().c_str()); + my_snprintf(buff, MYSQL_ERRMSG_SIZE, *errmsg, gtid_info.str().c_str()); *errmsg= const_cast(buff); my_free(missing_gtids);