MINI MINI MANI MO
###############################################################################
# Bug #26272158: FLUSH LOGS SENDS OK EVEN AFTER FAILING IN THE COMMIT PHASE.
#
# Problem:
# ========
# A failing FLUSH LOGS attempts to send OK to connection after
# having sent error reply before. This is caused by missing error propagation
# between where the error happened (ha_commit_trans inside close_table()) and
# where the OK is sent (at the top level switch statement in
# mysql_execute_command)
#
# Test:
# =====
# We will activate the debug point "crash_commit_before" this will ensure
# that the commit fails for FLUSH LOGS. We will then check if the command
# FLUSH LOGS returns an error.
###############################################################################
# Don't test this under valgrind, memory leaks will occur
--source include/not_valgrind.inc
--source include/have_debug.inc
--source include/have_gtid.inc
# Test in this file is binlog format agnostic, thus no need
# to rerun it for every format.
--source include/have_binlog_format_row.inc
call mtr.add_suppression('Could not open .*');
call mtr.add_suppression("Either disk is full or file system is read only");
call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
call mtr.add_suppression("Got error .*");
CREATE TABLE t(s INT);
INSERT INTO t VALUES(10);
# Set the debug option that will simulate crash commit
SET GLOBAL debug = '+d,simulate_flush_commit_error';
--error ER_ERROR_DURING_FLUSH_LOGS, ER_BINLOG_LOGGING_IMPOSSIBLE
FLUSH LOGS;
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
SET GLOBAL debug = '-d,simulate_flush_commit_error';
#cleanup
DROP TABLE t;
OHA YOOOO