Skip to content

Commit be71ca2

Browse files
macneale4claude
andcommitted
Fix TestCreateForeignKeys to expect OkResult for SET statements
- Updated foreign_key_queries.go test expectations for SET FOREIGN_KEY_CHECKS statements - Changed from expecting empty rows {} to types.NewOkResult(0) - Fixed 3 failing test assertions in foreign key tests - All TestCreateForeignKeys tests now pass with the new SET statement behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 7a4d0e6 commit be71ca2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

enginetest/queries/foreign_key_queries.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,7 @@ var ForeignKeyTests = []ScriptTest{
14851485
},
14861486
{
14871487
Query: "SET FOREIGN_KEY_CHECKS=0;",
1488-
Expected: []sql.Row{{}},
1488+
Expected: []sql.Row{{types.NewOkResult(0)}},
14891489
},
14901490
{
14911491
Query: "TRUNCATE parent;",
@@ -1497,7 +1497,7 @@ var ForeignKeyTests = []ScriptTest{
14971497
},
14981498
{
14991499
Query: "SET FOREIGN_KEY_CHECKS=1;",
1500-
Expected: []sql.Row{{}},
1500+
Expected: []sql.Row{{types.NewOkResult(0)}},
15011501
},
15021502
{
15031503
Query: "INSERT INTO child VALUES (4, 5, 6);",
@@ -2777,7 +2777,7 @@ var CreateForeignKeyTests = []ScriptTest{
27772777
Assertions: []ScriptTestAssertion{
27782778
{
27792779
Query: "SET FOREIGN_KEY_CHECKS=0;",
2780-
Expected: []sql.Row{{}},
2780+
Expected: []sql.Row{{types.NewOkResult(0)}},
27812781
},
27822782
{
27832783
Query: "CREATE TABLE child4 (pk BIGINT PRIMARY KEY, CONSTRAINT fk_child4 FOREIGN KEY (pk) REFERENCES delayed_parent4 (pk))",

0 commit comments

Comments
 (0)