summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/galera/r/galera_fk_mismatch.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/galera/r/galera_fk_mismatch.result')
-rw-r--r--mysql-test/suite/galera/r/galera_fk_mismatch.result30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/r/galera_fk_mismatch.result b/mysql-test/suite/galera/r/galera_fk_mismatch.result
new file mode 100644
index 00000000..a030b121
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_fk_mismatch.result
@@ -0,0 +1,30 @@
+connection node_2;
+connection node_1;
+CREATE TABLE parent (
+id1 INT,
+id2 INT,
+PRIMARY KEY (id1, id2) /* Multipart PK */
+) ENGINE=InnoDB;
+CREATE TABLE child (
+id INT PRIMARY KEY,
+parent_id1 INT,
+FOREIGN KEY (parent_id1)
+REFERENCES parent(id1) /* FK is subset of PK above */
+ON UPDATE CASCADE
+ON DELETE CASCADE
+) ENGINE=InnoDB;
+INSERT INTO parent VALUES (1, 2);
+INSERT INTO child VALUES (1, 1);
+connection node_2;
+UPDATE parent SET id1 = 3 WHERE id1 = 1;
+connection node_1;
+SELECT COUNT(*) = 1 FROM child WHERE parent_id1 = 3;
+COUNT(*) = 1
+1
+DELETE FROM parent WHERE id1 = 3;
+connection node_2;
+SELECT COUNT(*) = 0 FROM child WHERE parent_id1 = 3;
+COUNT(*) = 0
+1
+DROP TABLE child;
+DROP TABLE parent;