Browse Source
Refs: MW-369 * fixed sync point usage in MW-369.inc, which made it impossible to run this test with --repeat option * moved all MW-369*.test tests into MW-369.test file, each as one separate test phase * added two more test phases, in MW-369.test file * tests MW-369A, MW-369B and MW-369C are obsolete after this commit
pull/458/head
Refs: MW-369 * fixed sync point usage in MW-369.inc, which made it impossible to run this test with --repeat option * moved all MW-369*.test tests into MW-369.test file, each as one separate test phase * added two more test phases, in MW-369.test file * tests MW-369A, MW-369B and MW-369C are obsolete after this commit
pull/458/head
committed by
Jan Lindström
3 changed files with 370 additions and 44 deletions
-
155mysql-test/suite/galera/r/MW-369.result
-
11mysql-test/suite/galera/t/MW-369.inc
-
248mysql-test/suite/galera/t/MW-369.test
@ -0,0 +1,155 @@ |
|||
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; |
|||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, |
|||
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; |
|||
INSERT INTO p VALUES (1, 0); |
|||
INSERT INTO p VALUES (2, 0); |
|||
SET AUTOCOMMIT=ON; |
|||
START TRANSACTION; |
|||
DELETE FROM p WHERE f1 = 1; |
|||
SET SESSION wsrep_sync_wait = 0; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; |
|||
INSERT INTO c VALUES (1, 1); |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; |
|||
COMMIT; |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; |
|||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
|||
SELECT * FROM p; |
|||
f1 f2 |
|||
1 0 |
|||
2 0 |
|||
SELECT * FROM c; |
|||
f1 p_id |
|||
1 1 |
|||
DROP TABLE c; |
|||
DROP TABLE p; |
|||
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; |
|||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, |
|||
f2 INTEGER, |
|||
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; |
|||
INSERT INTO p VALUES (1, 0); |
|||
INSERT INTO p VALUES (2, 0); |
|||
INSERT INTO c VALUES (1, 1, 0); |
|||
SET AUTOCOMMIT=ON; |
|||
START TRANSACTION; |
|||
UPDATE p SET f2 = 1 WHERE f1 = 1; |
|||
SET SESSION wsrep_sync_wait = 0; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; |
|||
UPDATE c SET f2 = 1 WHERE f1 = 1; |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; |
|||
COMMIT; |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; |
|||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
SELECT * FROM p; |
|||
f1 f2 |
|||
1 1 |
|||
2 0 |
|||
SELECT * FROM c; |
|||
f1 p_id f2 |
|||
1 1 1 |
|||
DROP TABLE c; |
|||
DROP TABLE p; |
|||
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; |
|||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, |
|||
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; |
|||
INSERT INTO p VALUES (1, 0); |
|||
INSERT INTO p VALUES (2, 0); |
|||
INSERT INTO c VALUES (1, 1); |
|||
SET AUTOCOMMIT=ON; |
|||
START TRANSACTION; |
|||
UPDATE p SET f2 = 1 WHERE f1 = 1; |
|||
SET SESSION wsrep_sync_wait = 0; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; |
|||
DELETE FROM c WHERE f1 = 1; |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; |
|||
COMMIT; |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; |
|||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
SELECT * FROM p; |
|||
f1 f2 |
|||
1 1 |
|||
2 0 |
|||
SELECT * FROM c; |
|||
f1 p_id |
|||
DROP TABLE c; |
|||
DROP TABLE p; |
|||
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER UNIQUE KEY) ENGINE=INNODB; |
|||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, |
|||
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f2)) ; |
|||
INSERT INTO p VALUES (1, 0); |
|||
SET AUTOCOMMIT=ON; |
|||
START TRANSACTION; |
|||
UPDATE p SET f2 = 1 WHERE f1 = 1; |
|||
SET SESSION wsrep_sync_wait = 0; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; |
|||
INSERT INTO c VALUES (1, 0);; |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; |
|||
COMMIT; |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; |
|||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
|||
SELECT * FROM p; |
|||
f1 f2 |
|||
1 0 |
|||
SELECT * FROM c; |
|||
f1 p_id |
|||
1 0 |
|||
DROP TABLE c; |
|||
DROP TABLE p; |
|||
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; |
|||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, |
|||
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) |
|||
ON DELETE CASCADE) ; |
|||
INSERT INTO p VALUES (1, 0); |
|||
INSERT INTO p VALUES (2, 0); |
|||
INSERT INTO c VALUES (1, 1, 0); |
|||
SET AUTOCOMMIT=ON; |
|||
START TRANSACTION; |
|||
DELETE FROM p WHERE f1 = 1; |
|||
SET SESSION wsrep_sync_wait = 0; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; |
|||
UPDATE c SET f2 = 1 WHERE f1 = 1; |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; |
|||
COMMIT; |
|||
SET SESSION wsrep_on = 0; |
|||
SET SESSION wsrep_on = 1; |
|||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; |
|||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; |
|||
SET GLOBAL wsrep_provider_options = 'dbug='; |
|||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
|||
SELECT * FROM p; |
|||
f1 f2 |
|||
1 0 |
|||
2 0 |
|||
SELECT * FROM c; |
|||
f1 p_id f2 |
|||
1 1 1 |
|||
DROP TABLE c; |
|||
DROP TABLE p; |
Write
Preview
Loading…
Cancel
Save
Reference in new issue