diff options
Diffstat (limited to 'mysql-test/suite/galera/r/galera_fk_conflict.result')
-rw-r--r-- | mysql-test/suite/galera/r/galera_fk_conflict.result | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/r/galera_fk_conflict.result b/mysql-test/suite/galera/r/galera_fk_conflict.result new file mode 100644 index 00000000..f9f151ab --- /dev/null +++ b/mysql-test/suite/galera/r/galera_fk_conflict.result @@ -0,0 +1,29 @@ +connection node_2; +connection node_1; +CREATE TABLE parent ( +id INT PRIMARY KEY, +KEY (id) +) ENGINE=InnoDB; +CREATE TABLE child ( +id INT PRIMARY KEY, +parent_id INT, +FOREIGN KEY (parent_id) +REFERENCES parent(id) +) ENGINE=InnoDB; +INSERT INTO parent VALUES (1), (2); +INSERT INTO child VALUES (1,1); +connection node_1; +SET AUTOCOMMIT = OFF; +START TRANSACTION; +DELETE FROM parent WHERE id = 2; +connection node_2; +SET AUTOCOMMIT = OFF; +START TRANSACTION; +INSERT INTO child VALUES (2, 2); +connection node_1; +COMMIT; +connection node_2; +COMMIT; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +DROP TABLE child; +DROP TABLE parent; |