Skip to content

Commit

Permalink
MDEV-15807: Test failure on galera.galera_lock_table
Browse files Browse the repository at this point in the history
Wait until create tables are replicated to the slave before trying
lock table.
  • Loading branch information
Jan Lindström committed Apr 9, 2018
1 parent 8bb40f2 commit 767d6ce
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion mysql-test/suite/galera/disabled.def
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions mysql-test/suite/galera/r/galera_lock_table.result
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
7 changes: 7 additions & 0 deletions mysql-test/suite/galera/t/galera_lock_table.test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 767d6ce

Please sign in to comment.