Skip to content

Commit 64da230

Browse files
committed
add insert_queries
1 parent c65162f commit 64da230

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

enginetest/queries/insert_queries.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3128,4 +3128,24 @@ var InsertBrokenScripts = []ScriptTest{
31283128
},
31293129
},
31303130
},
3131+
{
3132+
Name: "column count mismatch in insert",
3133+
SetUpScript: []string{
3134+
"create table t(i int, j int)",
3135+
},
3136+
Assertions: []ScriptTestAssertion{
3137+
{
3138+
Query: "insert into t(i, j) values (1, 2, 3)",
3139+
ExpectedErr: sql.ErrColumnCountMismatch,
3140+
},
3141+
{
3142+
Query: "insert into t(i, j) values (1)",
3143+
ExpectedErr: sql.ErrColumnCountMismatch,
3144+
},
3145+
{
3146+
Query: "insert into t(i, j) values (1, 2), ()",
3147+
ExpectedErr: sql.ErrColumnCountMismatch,
3148+
},
3149+
},
3150+
},
31313151
}

0 commit comments

Comments
 (0)