summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2018-04-09 07:28:13 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2018-04-09 07:28:13 +0300
commit767d6ce38cafd735aa70fcd6d6e4fa682d5548af (patch)
tree9e4c23f0f96899510c93583304415848ddff228c
parent8bb40f2404909fc9c8070008f8a6e86180f2d74b (diff)
downloadmariadb-git-767d6ce38cafd735aa70fcd6d6e4fa682d5548af.tar.gz
MDEV-15807: Test failure on galera.galera_lock_table
Wait until create tables are replicated to the slave before trying lock table.
-rw-r--r--mysql-test/suite/galera/disabled.def1
-rw-r--r--mysql-test/suite/galera/r/galera_lock_table.result4
-rw-r--r--mysql-test/suite/galera/t/galera_lock_table.test7
3 files changed, 11 insertions, 1 deletions
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 13bb2d01ffb..4861223ba4b 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -31,7 +31,6 @@ galera_var_retry_autocommit : MDEV-15794 Test failure on galera.galera_var_retry
galera_var_auto_inc_control_on : MDEV-15803 Test failure on galera.galera_var_auto_inc_control_on
pxc-421 : MDEV-15804 Test failure on galera.pxc-421
query_cache : MDEV-15805 Test failure on galera.query_cache
-galera.galera_lock_table : MDEV-15807
galera.galera_gra_log : MDEV-15808 Test failure on galera.galera_gra_log
galera.MW-44 : MDEV-15809 Test failure on galera.MW-44
galera.lp1376747 : MDEV-15810 Test failure on galera.lp1376747
diff --git a/mysql-test/suite/galera/r/galera_lock_table.result b/mysql-test/suite/galera/r/galera_lock_table.result
index 16e9037a4de..0d40ac16565 100644
--- a/mysql-test/suite/galera/r/galera_lock_table.result
+++ b/mysql-test/suite/galera/r/galera_lock_table.result
@@ -1,5 +1,9 @@
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
+NAME
+test/t1
+test/t2
LOCK TABLE t1 READ;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
diff --git a/mysql-test/suite/galera/t/galera_lock_table.test b/mysql-test/suite/galera/t/galera_lock_table.test
index bd581842f6f..2745bfe5faf 100644
--- a/mysql-test/suite/galera/t/galera_lock_table.test
+++ b/mysql-test/suite/galera/t/galera_lock_table.test
@@ -12,6 +12,13 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
+
+# Wait until above DDL's are replicated
+--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
+--source include/wait_condition.inc
+
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
+
LOCK TABLE t1 READ;
--connection node_1