2014-10-01 00:06:15 +02:00
|
|
|
|
|
|
|
--source include/big_test.inc
|
|
|
|
--source include/galera_cluster.inc
|
|
|
|
--source include/have_innodb.inc
|
|
|
|
|
2015-03-31 15:43:38 +02:00
|
|
|
--connection node_1
|
2015-07-07 15:01:00 +02:00
|
|
|
SET SESSION innodb_lock_wait_timeout=600;
|
|
|
|
SET SESSION lock_wait_timeout=600;
|
2015-03-31 15:43:38 +02:00
|
|
|
|
2015-04-21 19:17:17 +02:00
|
|
|
CREATE TABLE ten (f1 INTEGER);
|
2014-10-01 00:06:15 +02:00
|
|
|
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
|
|
|
|
|
|
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
|
|
|
|
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
|
|
|
|
|
|
|
|
--connection node_2
|
2015-08-12 10:03:21 +02:00
|
|
|
SET SESSION wsrep_sync_wait = 0;
|
|
|
|
--let $wsrep_provider_options_node2 = `SELECT @@wsrep_provider_options`
|
|
|
|
SET SESSION wsrep_sync_wait = 7;
|
|
|
|
|
|
|
|
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
|
|
|
|
|
2014-10-01 00:06:15 +02:00
|
|
|
SELECT COUNT(*) = 100000 FROM t1;
|
|
|
|
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
|
|
|
|
|
|
|
|
--connection node_1
|
|
|
|
SELECT COUNT(*) = 200000 FROM t1;
|
|
|
|
UPDATE t1 SET f2 = 1;
|
|
|
|
|
|
|
|
--connection node_2
|
|
|
|
SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
|
|
|
|
|
|
|
|
--connection node_1
|
|
|
|
START TRANSACTION;
|
|
|
|
SELECT COUNT(*) = 200000 FROM t1;
|
|
|
|
UPDATE t1 SET f2 = 3;
|
|
|
|
|
|
|
|
--connection node_2
|
|
|
|
START TRANSACTION;
|
|
|
|
UPDATE t1 SET f2 = 4;
|
|
|
|
|
|
|
|
--connection node_1
|
|
|
|
COMMIT;
|
|
|
|
|
|
|
|
--connection node_2
|
|
|
|
--error ER_LOCK_DEADLOCK
|
|
|
|
COMMIT;
|
|
|
|
|
2015-08-11 13:22:38 +02:00
|
|
|
--disable_query_log
|
|
|
|
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node2';
|
|
|
|
--enable_query_log
|
|
|
|
|
2014-10-01 00:06:15 +02:00
|
|
|
DROP TABLE t1;
|
|
|
|
DROP TABLE ten;
|