Commit f7a4a871 authored by Monty's avatar Monty

MDEV-14996 kill during FLUSH TABLES FOR EXPORT causes assert

parent 51c3a5c8
#
# MDEV-14996
# Assertion `!thd->get_stmt_da()->is_sent() ||
# thd->killed == KILL_CONNECTION' failed in ha_maria::external_lock
#
CREATE TABLE t1 (a INT) ENGINE=Aria;
connect con1,localhost,root,,;
FLUSH TABLE t1 FOR EXPORT;
KILL CONNECTION_ID();
ERROR 70100: Connection was killed
disconnect con1;
connection default;
DROP TABLE t1;
--echo #
--echo # MDEV-14996
--echo # Assertion `!thd->get_stmt_da()->is_sent() ||
--echo # thd->killed == KILL_CONNECTION' failed in ha_maria::external_lock
--echo #
CREATE TABLE t1 (a INT) ENGINE=Aria;
--connect (con1,localhost,root,,)
FLUSH TABLE t1 FOR EXPORT;
--error ER_CONNECTION_KILLED
KILL CONNECTION_ID();
--disconnect con1
--connection default
DROP TABLE t1;
......@@ -2782,7 +2782,7 @@ int ha_maria::external_lock(THD *thd, int lock_type)
changes to commit (rollback shouldn't be tested).
*/
DBUG_ASSERT(!thd->get_stmt_da()->is_sent() ||
thd->killed == KILL_CONNECTION);
thd->killed);
/* autocommit ? rollback a transaction */
#ifdef MARIA_CANNOT_ROLLBACK
if (ma_commit(trn))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment