Skip to content

Commit

Permalink
Galera test fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirbhay Choubey committed Jul 30, 2016
1 parent 77a8ae0 commit 08683a7
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
9 changes: 9 additions & 0 deletions mysql-test/suite/galera/r/MW-284.result
Original file line number Diff line number Diff line change
@@ -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');
12 changes: 12 additions & 0 deletions mysql-test/suite/galera/r/galera_ftwrl_drain.result
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 11 additions & 0 deletions mysql-test/suite/galera/r/galera_ist_restart_joiner.result
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -26,6 +35,7 @@ f1 f2
4 d
5 e
6 f
connection node_2;
SELECT * FROM t1;
f1 f2
1 a
Expand All @@ -40,4 +50,5 @@ COUNT(*) = 0
SELECT COUNT(*) = 0 FROM t3;
COUNT(*) = 0
1
connection node_1;
DROP TABLE t1, t2, t3;
9 changes: 9 additions & 0 deletions mysql-test/suite/galera/r/galera_transaction_replay.result
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/galera/t/galera_transaction_replay.test
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 08683a7

Please sign in to comment.