Commit 08683a72 authored by Nirbhay Choubey's avatar Nirbhay Choubey

Galera test fixes.

parent 77a8ae07
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');
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
......
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;
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
......
......@@ -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';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment