Skip to content
Permalink
Browse files

MDEV-14996 kill during FLUSH TABLES FOR EXPORT causes assert

  • Loading branch information...
montywi committed Jun 27, 2019
1 parent 51c3a5c commit f7a4a8719bd59eca27e3e5e467c138853aa63dd5
Showing with 28 additions and 1 deletion.
  1. +13 −0 mysql-test/suite/maria/kill.result
  2. +14 −0 mysql-test/suite/maria/kill.test
  3. +1 −1 storage/maria/ha_maria.cc
@@ -0,0 +1,13 @@
#
# 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;
@@ -0,0 +1,14 @@
--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))

0 comments on commit f7a4a87

Please sign in to comment.
You can’t perform that action at this time.