| 1 |
--source include/galera_cluster.inc |
| 2 |
--source include/have_innodb.inc |
| 3 |
|
| 4 |
# |
| 5 |
# At this time, issing a FLUSH TABLES WITH READ LOCK causes SELECT and SHOW to |
| 6 |
# hang if causality can not be ensured because another node issued a statement |
| 7 |
# in the meantime which could not be applied because FTWRL blocks the applier |
| 8 |
# as well |
| 9 |
# |
| 10 |
# See LP bug 1271177 |
| 11 |
# |
| 12 |
|
| 13 |
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; |
| 14 |
|
| 15 |
--connection node_2 |
| 16 |
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options;` |
| 17 |
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; |
| 18 |
FLUSH TABLES WITH READ LOCK; |
| 19 |
|
| 20 |
--connection node_1 |
| 21 |
INSERT INTO t1 VALUES (1); |
| 22 |
|
| 23 |
--connection node_2 |
| 24 |
--error ER_LOCK_WAIT_TIMEOUT |
| 25 |
SHOW TABLES; |
| 26 |
|
| 27 |
--error ER_LOCK_WAIT_TIMEOUT |
| 28 |
SELECT * FROM t1; |
| 29 |
|
| 30 |
UNLOCK TABLES; |
| 31 |
|
| 32 |
--disable_query_log |
| 33 |
--eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig"; |
| 34 |
--enable_query_log |
| 35 |
|
| 36 |
SHOW TABLES; |
| 37 |
SELECT COUNT(*) = 1 FROM t1; |
| 38 |
|
| 39 |
DROP TABLE t1; |