diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/lock_kill.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/lock_kill.test')
-rw-r--r-- | mysql-test/main/lock_kill.test | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/mysql-test/main/lock_kill.test b/mysql-test/main/lock_kill.test new file mode 100644 index 00000000..5cf67fd3 --- /dev/null +++ b/mysql-test/main/lock_kill.test @@ -0,0 +1,63 @@ +--source include/have_innodb.inc + +# This test file is for testing killing of queries that are under LOCK TABLES + +--echo # +--echo # MDEV-17749 Kill during LOCK TABLE ; ALTER TABLE causes assert +--echo # + +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +--connect (con1,localhost,root,,test) +LOCK TABLE t1 WRITE; +--let $conid= `SELECT CONNECTION_ID()` +--send ALTER TABLE t1 ADD COLUMN b INT +--connection default +--disable_query_log +--echo Killing connection +eval KILL $conid; +--enable_query_log +--connection con1 +--disable_warnings +--error 0,2006,2013,ER_CONNECTION_KILLED +reap; +--enable_warnings +--connection default +--disconnect con1 +DROP TABLE t1; + +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +CREATE TABLE t2 (a INT) ENGINE=InnoDB; +--connect (con1,localhost,root,,test) +LOCK TABLE t1 WRITE, t2 WRITE; +--let $conid= `SELECT CONNECTION_ID()` +--send ALTER TABLE t1 ADD COLUMN b INT +--connection default +--disable_query_log +--echo Killing connection +eval KILL $conid; +--enable_query_log +--connection con1 +--disable_warnings +--error 0,2006,2013,ER_CONNECTION_KILLED +reap; +--enable_warnings +--connection default +--disconnect con1 +DROP TABLE t1, t2; + +# Similar test for CREATE TRIGGER, which also failed + +CREATE TABLE t1 (id int(11)) ENGINE=InnoDB; +LOCK TABLES t1 WRITE; +SET max_statement_time= 0.0001; +--error 0,1969 +--disable_warnings +CREATE TRIGGER tr16 AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t1 VALUES (1); +--enable_warnings +SET max_statement_time= default; +DROP TRIGGER IF EXISTS trg16; +DROP TABLE t1; + +--echo # +--echo # End of 10.3 tests +--echo # |