From 836d70899780f28ea2a6870428ff6daac21ca993 Mon Sep 17 00:00:00 2001 From: Sujatha Date: Tue, 19 May 2020 11:22:39 +0530 Subject: MDEV-22451: SIGSEGV in __memmove_avx_unaligned_erms/memcpy from _my_b_write on CREATE after RESET MASTER Analysis: ======== RESET MASTER TO # command deletes all binary log files listed in the index file, resets the binary log index file to be empty, and creates a new binary log with number #. When the user provided binary log number is greater than the max allowed value '2147483647' server fails to generate a new binary log. The RESET MASTER statement marks the binlog closure status as 'LOG_CLOSE_TO_BE_OPENED' and exits. Statements which follow RESET MASTER try to write to binary log they find the log_state != LOG_CLOSED and proceed to write to binary log cache and it results in crash. Fix: === During MYSQL_BIN_LOG open, if generation of new binary log name fails then the "log_state" needs to be marked as "LOG_CLOSED". With this further statements will find binary log as closed and they will skip writing to the binary log. --- mysql-test/suite/rpl/r/rpl_binlog_errors.result | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/suite/rpl') diff --git a/mysql-test/suite/rpl/r/rpl_binlog_errors.result b/mysql-test/suite/rpl/r/rpl_binlog_errors.result index 72844fb9de6..fead3d128e5 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_errors.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_errors.result @@ -7,6 +7,7 @@ include/stop_slave.inc call mtr.add_suppression("Can't generate a unique log-filename"); call mtr.add_suppression("Writing one row to the row-based binary log failed.*"); call mtr.add_suppression("Error writing file .*"); +call mtr.add_suppression("Could not use master-bin for logging"); SET @old_debug= @@global.debug; SELECT repeat('x',8192) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166.data'; SELECT repeat('x',10) INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug_46166-2.data'; -- cgit v1.2.1