diff options
author | Monty <monty@mariadb.org> | 2019-06-27 20:57:01 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2019-06-27 20:57:25 +0300 |
commit | f7a4a8719bd59eca27e3e5e467c138853aa63dd5 (patch) | |
tree | 58f7e6d9f970434bdc77d970536ef1b0db88a9ef | |
parent | 51c3a5c84023671903af2879c8f85f3dd1e8344d (diff) | |
download | mariadb-git-f7a4a8719bd59eca27e3e5e467c138853aa63dd5.tar.gz |
MDEV-14996 kill during FLUSH TABLES FOR EXPORT causes assert
-rw-r--r-- | mysql-test/suite/maria/kill.result | 13 | ||||
-rw-r--r-- | mysql-test/suite/maria/kill.test | 14 | ||||
-rw-r--r-- | storage/maria/ha_maria.cc | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/mysql-test/suite/maria/kill.result b/mysql-test/suite/maria/kill.result new file mode 100644 index 00000000000..5e75e75a41a --- /dev/null +++ b/mysql-test/suite/maria/kill.result @@ -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; diff --git a/mysql-test/suite/maria/kill.test b/mysql-test/suite/maria/kill.test new file mode 100644 index 00000000000..98a588a6698 --- /dev/null +++ b/mysql-test/suite/maria/kill.test @@ -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; diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 887065ff825..23de1508b05 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -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)) |