Galera test fixes.
This commit is contained in:
parent
77a8ae07a9
commit
08683a7267
@ -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;
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||||
SET SESSION wsrep_on = OFF;
|
SET SESSION wsrep_on = OFF;
|
||||||
SET SESSION wsrep_on = ON;
|
SET SESSION wsrep_on = ON;
|
||||||
|
connection node_3;
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
include/wait_for_slave_param.inc [Slave_IO_Running]
|
include/wait_for_slave_param.inc [Slave_IO_Running]
|
||||||
|
connection node_1;
|
||||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||||
|
connection node_3;
|
||||||
include/wait_for_slave_to_start.inc
|
include/wait_for_slave_to_start.inc
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
|
connection node_3;
|
||||||
|
connection node_1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
connection node_3;
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE ALL;
|
RESET SLAVE ALL;
|
||||||
CALL mtr.add_suppression('failed registering on master');
|
CALL mtr.add_suppression('failed registering on master');
|
||||||
|
@ -1,25 +1,37 @@
|
|||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
connection node_2;
|
||||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
|
connection node_2;
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
SET SESSION wsrep_on = 0;
|
SET SESSION wsrep_on = 0;
|
||||||
SET SESSION wsrep_on = 1;
|
SET SESSION wsrep_on = 1;
|
||||||
SELECT COUNT(*) = 0 FROM t1;
|
SELECT COUNT(*) = 0 FROM t1;
|
||||||
COUNT(*) = 0
|
COUNT(*) = 0
|
||||||
1
|
1
|
||||||
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||||
|
connection node_2a;
|
||||||
FLUSH TABLES WITH READ LOCK;;
|
FLUSH TABLES WITH READ LOCK;;
|
||||||
|
connection node_2;
|
||||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
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 lock_wait_timeout = 1;
|
||||||
SET SESSION innodb_lock_wait_timeout=1;
|
SET SESSION innodb_lock_wait_timeout=1;
|
||||||
SET SESSION wait_timeout=1;
|
SET SESSION wait_timeout=1;
|
||||||
INSERT INTO t2 VALUES (2);
|
INSERT INTO t2 VALUES (2);
|
||||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
connection node_2a;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
connection node_2;
|
||||||
SELECT COUNT(*) = 1 FROM t1;
|
SELECT COUNT(*) = 1 FROM t1;
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
INSERT INTO t1 VALUES (3);
|
INSERT INTO t1 VALUES (3);
|
||||||
|
connection node_1;
|
||||||
SELECT COUNT(*) = 2 FROM t1;
|
SELECT COUNT(*) = 2 FROM t1;
|
||||||
COUNT(*) = 2
|
COUNT(*) = 2
|
||||||
1
|
1
|
||||||
|
@ -1,22 +1,31 @@
|
|||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(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');
|
INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'),(6, 'a');
|
||||||
|
connection node_2;
|
||||||
Unloading wsrep provider ...
|
Unloading wsrep provider ...
|
||||||
SET GLOBAL wsrep_provider = 'none';
|
SET GLOBAL wsrep_provider = 'none';
|
||||||
|
connection node_1;
|
||||||
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
|
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
|
||||||
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
|
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
|
||||||
|
connection node_2;
|
||||||
SET GLOBAL wsrep_provider_options = 'dbug=d,recv_IST_after_apply_trx';
|
SET GLOBAL wsrep_provider_options = 'dbug=d,recv_IST_after_apply_trx';
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
Loading wsrep_provider ...
|
Loading wsrep_provider ...
|
||||||
SHOW STATUS LIKE 'wsrep_debug_sync_waiters';
|
SHOW STATUS LIKE 'wsrep_debug_sync_waiters';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
wsrep_debug_sync_waiters recv_IST_after_apply_trx
|
wsrep_debug_sync_waiters recv_IST_after_apply_trx
|
||||||
|
connection node_1;
|
||||||
|
connection node_1;
|
||||||
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
|
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
|
||||||
CREATE TABLE t2 (f1 INTEGER);
|
CREATE TABLE t2 (f1 INTEGER);
|
||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
UPDATE t1 SET f2 = 'e' WHERE f1 > 4;
|
UPDATE t1 SET f2 = 'e' WHERE f1 > 4;
|
||||||
CREATE TABLE t3 (f1 INTEGER);
|
CREATE TABLE t3 (f1 INTEGER);
|
||||||
|
connection node_2;
|
||||||
Performing --wsrep-recover ...
|
Performing --wsrep-recover ...
|
||||||
Starting server ...
|
Starting server ...
|
||||||
Using --wsrep-start-position when starting mysqld ...
|
Using --wsrep-start-position when starting mysqld ...
|
||||||
|
connection node_1;
|
||||||
UPDATE t1 SET f2 = 'f' WHERE f1 > 5;
|
UPDATE t1 SET f2 = 'f' WHERE f1 > 5;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
f1 f2
|
f1 f2
|
||||||
@ -26,6 +35,7 @@ f1 f2
|
|||||||
4 d
|
4 d
|
||||||
5 e
|
5 e
|
||||||
6 f
|
6 f
|
||||||
|
connection node_2;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
f1 f2
|
f1 f2
|
||||||
1 a
|
1 a
|
||||||
@ -40,4 +50,5 @@ COUNT(*) = 0
|
|||||||
SELECT COUNT(*) = 0 FROM t3;
|
SELECT COUNT(*) = 0 FROM t3;
|
||||||
COUNT(*) = 0
|
COUNT(*) = 0
|
||||||
1
|
1
|
||||||
|
connection node_1;
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
|
@ -1,20 +1,28 @@
|
|||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
|
||||||
INSERT INTO t1 VALUES (1, 'a');
|
INSERT INTO t1 VALUES (1, 'a');
|
||||||
INSERT INTO t1 VALUES (2, 'a');
|
INSERT INTO t1 VALUES (2, 'a');
|
||||||
|
connection node_1;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||||
SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
|
SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
|
||||||
f1 f2
|
f1 f2
|
||||||
2 a
|
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';
|
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
|
||||||
|
connection node_1;
|
||||||
COMMIT;;
|
COMMIT;;
|
||||||
|
connection node_1a;
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
SET SESSION wsrep_on = 0;
|
SET SESSION wsrep_on = 0;
|
||||||
SET SESSION wsrep_on = 1;
|
SET SESSION wsrep_on = 1;
|
||||||
|
connection node_2;
|
||||||
UPDATE t1 SET f2 = 'c' WHERE f1 = 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 = 'dbug=';
|
||||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
|
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
|
||||||
|
connection node_1;
|
||||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
@ -23,6 +31,7 @@ COUNT(*) = 1
|
|||||||
1
|
1
|
||||||
wsrep_local_replays
|
wsrep_local_replays
|
||||||
1
|
1
|
||||||
|
connection node_2;
|
||||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
|
@ -40,7 +40,7 @@ UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
|
|||||||
|
|
||||||
# Wait for both transactions to be blocked
|
# Wait for both transactions to be blocked
|
||||||
--connection node_1a
|
--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
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user