mirror of
https://github.com/MariaDB/server.git
synced 2025-12-01 17:39:21 +03:00
MW-369 Fixed test MW-369D, recorded MW-369C, MW-369D
This commit is contained in:
committed by
Jan Lindström
parent
396770fb67
commit
0d5c605b60
@@ -16,6 +16,7 @@ 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 = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
|
||||
@@ -18,6 +18,7 @@ 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 = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SELECT * FROM p;
|
||||
|
||||
30
mysql-test/suite/galera/r/MW-369C.result
Normal file
30
mysql-test/suite/galera/r/MW-369C.result
Normal file
@@ -0,0 +1,30 @@
|
||||
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 = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SELECT * FROM p;
|
||||
f1 f2
|
||||
1 1
|
||||
2 0
|
||||
SELECT * FROM c;
|
||||
f1 p_id
|
||||
DROP TABLE c;
|
||||
DROP TABLE p;
|
||||
31
mysql-test/suite/galera/r/MW-369D.result
Normal file
31
mysql-test/suite/galera/r/MW-369D.result
Normal file
@@ -0,0 +1,31 @@
|
||||
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;
|
||||
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, 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 = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
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;
|
||||
@@ -61,6 +61,7 @@ SET SESSION wsrep_sync_wait = 0;
|
||||
--connection node_1a
|
||||
--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_enter_sync
|
||||
--source include/galera_wait_sync_point.inc
|
||||
--source include/galera_clear_sync_point.inc
|
||||
--let $galera_sync_point = apply_monitor_slave_enter_sync
|
||||
--source include/galera_signal_sync_point.inc
|
||||
--let $galera_sync_point = local_monitor_enter_sync
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
#
|
||||
# Expected Outcome:
|
||||
# ================
|
||||
#
|
||||
# Both operations on node_1 and node_2 should succeed without conflicts.
|
||||
# The parent table should contain values (1, 1), (2, 0) and the child
|
||||
# table should be empty.
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
@@ -15,9 +15,10 @@
|
||||
#
|
||||
# Expected Outcome:
|
||||
# ================
|
||||
# Both operations on node_1 and node_2 should succeed without conflicts.
|
||||
# The parent table should contain values (1, 1), (2, 0) and the child
|
||||
# table should contain a row (1, 1)
|
||||
#
|
||||
# The parent operation on connection node_1 will conflict with an insert
|
||||
# to node_2. The parent table will contain rows (1, 0), (2, 0) and
|
||||
# the child table will contain row (1, 1).
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
@@ -38,6 +39,7 @@ INSERT INTO p VALUES (2, 0);
|
||||
|
||||
# Commit succeeds
|
||||
--connection node_1
|
||||
--error ER_LOCK_DEADLOCK
|
||||
--reap
|
||||
|
||||
--connection node_2
|
||||
|
||||
Reference in New Issue
Block a user