Skip to content

Commit 8bf943a

Browse files
elianddbclaude
andcommitted
Update enum error tests to expect correct MySQL-compatible error messages
The enum validation tests were expecting the old error message "value X is not valid for this Enum" but now correctly return "Data truncated for column ''" in strict mode, which matches MySQL's actual behavior. Updated affected tests: - enum_errors test cases for values 500 and -1 - enums_with_default case-sensitive collation test for invalid 'ABC' 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 0a764ce commit 8bf943a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

enginetest/queries/script_queries.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ CREATE TABLE tab3 (
12021202
{
12031203
// enum values must match EXACTLY for case-sensitive collations
12041204
Query: "INSERT INTO enumtest1 VALUES (10, 'ABC'), (11, 'aBc'), (12, 'xyz');",
1205-
ExpectedErrStr: "value ABC is not valid for this Enum",
1205+
ExpectedErrStr: "Data truncated for column ''",
12061206
},
12071207
{
12081208
Query: "SHOW CREATE TABLE enumtest1;",
@@ -8053,11 +8053,11 @@ where
80538053
Assertions: []ScriptTestAssertion{
80548054
{
80558055
Query: "insert into t values (1, 500)",
8056-
ExpectedErrStr: "value 500 is not valid for this Enum",
8056+
ExpectedErrStr: "Data truncated for column ''",
80578057
},
80588058
{
80598059
Query: "insert into t values (1, -1)",
8060-
ExpectedErrStr: "value -1 is not valid for this Enum",
8060+
ExpectedErrStr: "Data truncated for column ''",
80618061
},
80628062
},
80638063
},

0 commit comments

Comments
 (0)