Commit 5d7e067c authored by Jan Lindström's avatar Jan Lindström

MDEV-22125 : galera.galera_drop_multi MTR failed: InnoDB: MySQL is trying to...

MDEV-22125 : galera.galera_drop_multi MTR failed: InnoDB: MySQL is trying to drop database `fts`.`` though there are still open handles

MDEV-22140 galera.galera_drop_database MTR failed: InnoDB: MySQL is trying to drop database `fts`.`` though there are still open handles

Add wait conditions to wait that all operations are done in both
nodes.
parent 319886ec
......@@ -11,9 +11,33 @@ INSERT INTO fts_t2 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
DROP TABLE ten;
UPDATE fts_t1 SET f2 = 'abcd';
UPDATE fts_t2 SET f2 = 'efjh';
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t1;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t2;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t1 where f2 = 'abcd';
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t2 where f2 = 'efjh';
EXPECT_1000
1000
connection node_2;
connection node_1;
connection node_2;
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t1;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t2;
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t1 where f2 = 'abcd';
EXPECT_1000
1000
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t2 where f2 = 'efjh';
EXPECT_1000
1000
connection node_1;
USE fts;
DROP TABLE fts_t1;
......@@ -21,3 +45,4 @@ DROP TABLE fts_t2;
SHOW TABLES;
Tables_in_fts
DROP DATABASE fts;
connection node_2;
......@@ -23,6 +23,10 @@ INSERT INTO fts_t2 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
DROP TABLE ten;
UPDATE fts_t1 SET f2 = 'abcd';
UPDATE fts_t2 SET f2 = 'efjh';
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t1;
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t2;
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t1 where f2 = 'abcd';
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t2 where f2 = 'efjh';
# Restart the second node:
--connection node_2
......@@ -34,6 +38,14 @@ UPDATE fts_t2 SET f2 = 'efjh';
--connection node_2
--source include/wait_until_ready.inc
--let $wait_condition = SELECT COUNT(*) = 1000 FROM fts_t1 where f2 = 'abcd';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 1000 FROM fts_t2 where f2 = 'efjh';
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t1;
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t2;
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t1 where f2 = 'abcd';
SELECT COUNT(*) AS EXPECT_1000 FROM fts_t2 where f2 = 'efjh';
# Drop the tables and database after nodes restarted:
--connection node_1
......@@ -43,5 +55,13 @@ DROP TABLE fts_t2;
SHOW TABLES;
DROP DATABASE fts;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'fts_t1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'fts_t2';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'fts';
--source include/wait_condition.inc
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
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