From 68143c8905352361c30595864a90f494d9a3d99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sat, 29 Dec 2018 10:57:26 +0200 Subject: [PATCH] MDEV-17470: Fix the test for --embedded --- .../suite/innodb/r/innodb-alter-debug.result | 7 ++---- .../suite/innodb/t/innodb-alter-debug.test | 24 +++++++++++-------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb-alter-debug.result b/mysql-test/suite/innodb/r/innodb-alter-debug.result index 5ce93b96c77..fa6670e6fb3 100644 --- a/mysql-test/suite/innodb/r/innodb-alter-debug.result +++ b/mysql-test/suite/innodb/r/innodb-alter-debug.result @@ -81,11 +81,8 @@ INSERT INTO t1 SELECT NULL, i FROM t1; INSERT INTO t1 SELECT NULL, i FROM t1; INSERT INTO t1 SELECT NULL, i FROM t1; LOCK TABLE t1 READ; -SET max_statement_time= 1; ALTER TABLE t1 FORCE, ALGORITHM=COPY; -ERROR 70100: Query execution was interrupted (max_statement_time exceeded) -SET DEBUG_SYNC = 'now SIGNAL stop_waining'; -SET DEBUG_SYNC = 'now WAIT_FOR stop_waining'; +kill query @id; +ERROR 70100: Query execution was interrupted UNLOCK TABLES; DROP TABLE t1; -SET DEBUG_SYNC = 'RESET'; diff --git a/mysql-test/suite/innodb/t/innodb-alter-debug.test b/mysql-test/suite/innodb/t/innodb-alter-debug.test index d32faf39aad..3c457294884 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-debug.test +++ b/mysql-test/suite/innodb/t/innodb-alter-debug.test @@ -98,9 +98,6 @@ SET DEBUG_SYNC='RESET'; DROP TABLE t1; -# Wait till all disconnects are completed ---source include/wait_until_count_sessions.inc - --echo # --echo # MDEV-17470 Orphan temporary files after interrupted ALTER --echo # cause InnoDB: Operating system error number 17 and eventual @@ -117,14 +114,21 @@ INSERT INTO t1 SELECT NULL, i FROM t1; LOCK TABLE t1 READ; --connect (con1,localhost,root,,test) -SET max_statement_time= 1; ---error ER_STATEMENT_TIMEOUT -ALTER TABLE t1 FORCE, ALGORITHM=COPY; -SET DEBUG_SYNC = 'now SIGNAL stop_waining'; ---disconnect con1 +let $ID= `SELECT @id := CONNECTION_ID()`; +send ALTER TABLE t1 FORCE, ALGORITHM=COPY; --connection default -SET DEBUG_SYNC = 'now WAIT_FOR stop_waining'; +let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock'; +source include/wait_condition.inc; +let $ignore= `SELECT @id := $ID`; +kill query @id; +--connection con1 +--error ER_QUERY_INTERRUPTED +reap; +--disconnect con1 +--connection default UNLOCK TABLES; DROP TABLE t1; -SET DEBUG_SYNC = 'RESET'; + +# Wait till all disconnects are completed +--source include/wait_until_count_sessions.inc