Skip to content

Commit 5664ecf

Browse files
elianddbclaude
andcommitted
Fix additional float/double auto_increment tests in insert_queries.go
- Updated "auto increment on float" test to expect CREATE TABLE error - Updated "auto increment on double" test to expect CREATE TABLE error - Both tests now expect "Incorrect column specifier" matching MySQL 8.4.5 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a437c24 commit 5664ecf

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

enginetest/queries/insert_queries.go

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,32 +1288,22 @@ var InsertScripts = []ScriptTest{
12881288
{
12891289
Name: "auto increment on float",
12901290
Dialect: "mysql",
1291-
SetUpScript: []string{
1292-
"create table auto (pk float primary key auto_increment)",
1293-
"insert into auto values (NULL),(10),(0)",
1294-
},
1291+
SetUpScript: []string{},
12951292
Assertions: []ScriptTestAssertion{
12961293
{
1297-
Query: "select * from auto order by 1",
1298-
Expected: []sql.Row{
1299-
{float64(1)}, {float64(10)}, {float64(11)},
1300-
},
1294+
Query: "create table auto (pk float primary key auto_increment)",
1295+
ExpectedErrStr: "Incorrect column specifier for column 'pk'",
13011296
},
13021297
},
13031298
},
13041299
{
13051300
Name: "auto increment on double",
13061301
Dialect: "mysql",
1307-
SetUpScript: []string{
1308-
"create table auto (pk double primary key auto_increment)",
1309-
"insert into auto values (NULL),(10),(0)",
1310-
},
1302+
SetUpScript: []string{},
13111303
Assertions: []ScriptTestAssertion{
13121304
{
1313-
Query: "select * from auto order by 1",
1314-
Expected: []sql.Row{
1315-
{float64(1)}, {float64(10)}, {float64(11)},
1316-
},
1305+
Query: "create table auto (pk double primary key auto_increment)",
1306+
ExpectedErrStr: "Incorrect column specifier for column 'pk'",
13171307
},
13181308
},
13191309
},

0 commit comments

Comments
 (0)