From fc876457f0f3e43d031e1d3ec42694777bd56270 Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Tue, 23 Apr 2024 09:32:05 +0530 Subject: [PATCH] test: add a failing test Signed-off-by: Manan Gupta --- go/test/endtoend/vtgate/foreignkey/fk_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/go/test/endtoend/vtgate/foreignkey/fk_test.go b/go/test/endtoend/vtgate/foreignkey/fk_test.go index 5a34a2b49c0..f1f5b752307 100644 --- a/go/test/endtoend/vtgate/foreignkey/fk_test.go +++ b/go/test/endtoend/vtgate/foreignkey/fk_test.go @@ -1135,6 +1135,14 @@ func TestFkQueries(t *testing.T) { "delete fk_t11 from fk_t11 join fk_t12 using (id) where fk_t11.id = 4", }, }, + { + name: "Foreign key join rows affected", + queries: []string{ + "insert /*+ SET_VAR(foreign_key_checks=0) */ into fk_t11 (id, col) values (4, '1'), (5, '3'), (7, '22'), (8, '5'), (9, NULL), (10, '3')", + "insert /*+ SET_VAR(foreign_key_checks=0) */ into fk_t12 (id, col) values (4, '1'), (5, '3'), (7, '22'), (8, '5'), (9, NULL), (10, '3')", + "delete fk_t11, fk_t12 from fk_t11 join fk_t12 using (id) where fk_t11.id = 5", + }, + }, } for _, tt := range testcases {