From 08683a726773f8cdf16a4a3dfb3920e5f7842481 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Sat, 30 Jul 2016 14:42:49 -0400 Subject: [PATCH] Galera test fixes. --- mysql-test/suite/galera/r/MW-284.result | 9 +++++++++ mysql-test/suite/galera/r/galera_ftwrl_drain.result | 12 ++++++++++++ .../suite/galera/r/galera_ist_restart_joiner.result | 11 +++++++++++ .../suite/galera/r/galera_transaction_replay.result | 9 +++++++++ .../suite/galera/t/galera_transaction_replay.test | 2 +- 5 files changed, 42 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/galera/r/MW-284.result b/mysql-test/suite/galera/r/MW-284.result index 8b5119663ce..ad227390526 100644 --- a/mysql-test/suite/galera/r/MW-284.result +++ b/mysql-test/suite/galera/r/MW-284.result @@ -1,13 +1,22 @@ +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; SET SESSION wsrep_on = OFF; SET SESSION wsrep_on = ON; +connection node_3; START SLAVE; include/wait_for_slave_param.inc [Slave_IO_Running] +connection node_1; SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +connection node_3; include/wait_for_slave_to_start.inc +connection node_1; INSERT INTO t1 VALUES (1); +connection node_3; +connection node_1; DROP TABLE t1; +connection node_3; STOP SLAVE; RESET SLAVE ALL; CALL mtr.add_suppression('failed registering on master'); diff --git a/mysql-test/suite/galera/r/galera_ftwrl_drain.result b/mysql-test/suite/galera/r/galera_ftwrl_drain.result index d704699925b..751811b88fd 100644 --- a/mysql-test/suite/galera/r/galera_ftwrl_drain.result +++ b/mysql-test/suite/galera/r/galera_ftwrl_drain.result @@ -1,25 +1,37 @@ +connection node_1; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; +connection node_2; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_1; INSERT INTO t1 VALUES (1); +connection node_2; SET SESSION wsrep_sync_wait = 0; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2a; FLUSH TABLES WITH READ LOCK;; +connection node_2; SET GLOBAL wsrep_provider_options = 'dbug='; SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +connection node_2a; +connection node_2; SET SESSION lock_wait_timeout = 1; SET SESSION innodb_lock_wait_timeout=1; SET SESSION wait_timeout=1; INSERT INTO t2 VALUES (2); ERROR HY000: Lock wait timeout exceeded; try restarting transaction +connection node_2a; UNLOCK TABLES; +connection node_2; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 INSERT INTO t1 VALUES (3); +connection node_1; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 diff --git a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result index f7a1386e7f8..01544843d2d 100644 --- a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result +++ b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result @@ -1,22 +1,31 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'),(6, 'a'); +connection node_2; Unloading wsrep provider ... SET GLOBAL wsrep_provider = 'none'; +connection node_1; UPDATE t1 SET f2 = 'b' WHERE f1 > 1; UPDATE t1 SET f2 = 'c' WHERE f1 > 2; +connection node_2; SET GLOBAL wsrep_provider_options = 'dbug=d,recv_IST_after_apply_trx'; SET SESSION wsrep_sync_wait = 0; Loading wsrep_provider ... SHOW STATUS LIKE 'wsrep_debug_sync_waiters'; Variable_name Value wsrep_debug_sync_waiters recv_IST_after_apply_trx +connection node_1; +connection node_1; UPDATE t1 SET f2 = 'd' WHERE f1 > 3; CREATE TABLE t2 (f1 INTEGER); +connection node_2; +connection node_1; UPDATE t1 SET f2 = 'e' WHERE f1 > 4; CREATE TABLE t3 (f1 INTEGER); +connection node_2; Performing --wsrep-recover ... Starting server ... Using --wsrep-start-position when starting mysqld ... +connection node_1; UPDATE t1 SET f2 = 'f' WHERE f1 > 5; SELECT * FROM t1; f1 f2 @@ -26,6 +35,7 @@ f1 f2 4 d 5 e 6 f +connection node_2; SELECT * FROM t1; f1 f2 1 a @@ -40,4 +50,5 @@ COUNT(*) = 0 SELECT COUNT(*) = 0 FROM t3; COUNT(*) = 0 1 +connection node_1; DROP TABLE t1, t2, t3; diff --git a/mysql-test/suite/galera/r/galera_transaction_replay.result b/mysql-test/suite/galera/r/galera_transaction_replay.result index bfafa506fe6..d2c9a6b357a 100644 --- a/mysql-test/suite/galera/r/galera_transaction_replay.result +++ b/mysql-test/suite/galera/r/galera_transaction_replay.result @@ -1,20 +1,28 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)); INSERT INTO t1 VALUES (1, 'a'); INSERT INTO t1 VALUES (2, 'a'); +connection node_1; SET AUTOCOMMIT=ON; START TRANSACTION; UPDATE t1 SET f2 = 'b' WHERE f1 = 1; SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE; f1 f2 2 a +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync'; +connection node_1; COMMIT;; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; +connection node_2; UPDATE t1 SET f2 = 'c' WHERE f1 = 2; +connection node_1a; +connection node_1a; SET GLOBAL wsrep_provider_options = 'dbug='; SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync'; +connection node_1; SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b'; COUNT(*) = 1 1 @@ -23,6 +31,7 @@ COUNT(*) = 1 1 wsrep_local_replays 1 +connection node_2; SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b'; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/t/galera_transaction_replay.test b/mysql-test/suite/galera/t/galera_transaction_replay.test index bd5288a51c6..f99c0b1979f 100644 --- a/mysql-test/suite/galera/t/galera_transaction_replay.test +++ b/mysql-test/suite/galera/t/galera_transaction_replay.test @@ -40,7 +40,7 @@ UPDATE t1 SET f2 = 'c' WHERE f1 = 2; # Wait for both transactions to be blocked --connection node_1a ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'System lock'; +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event::find_row%'; --source include/wait_condition.inc --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';