Skip to content

Commit 0a01d07

Browse files
elianddbclaude
andcommitted
Remove redundant charset validation test
The "charset validation UTF-8 multibyte sequence validation" test was duplicating functionality already covered by existing tests: - "charset validation ASCII range tests" already tests é, €, 🍕 multibyte sequences - "charset validation edge cases" already covers invalid UTF-8 sequence rejection This cleanup reduces test redundancy while maintaining full coverage of the formatInvalidByteForError fix for proper UTF-8 validation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent ad070af commit 0a01d07

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

enginetest/queries/script_queries.go

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7228,39 +7228,6 @@ where
72287228
},
72297229
},
72307230
},
7231-
{
7232-
Name: "charset validation UTF-8 multibyte sequence validation",
7233-
SetUpScript: []string{
7234-
"create table utf8_validation_test (c char(10), v varchar(20), t text) character set utf8mb4;",
7235-
},
7236-
Assertions: []ScriptTestAssertion{
7237-
{
7238-
Query: "set sql_mode = 'STRICT_TRANS_TABLES';",
7239-
Expected: []sql.Row{{types.OkResult{RowsAffected: 0}}},
7240-
},
7241-
// Test that valid multibyte sequences > 127 are accepted (fixes the b > asciiMax bug)
7242-
{
7243-
Query: "insert into utf8_validation_test(c, v, t) values (UNHEX('C3A9'), UNHEX('E282AC'), UNHEX('F09F8D95'));", // é, €, 🍕 - valid UTF-8 sequences with bytes > 127
7244-
Expected: []sql.Row{{types.OkResult{RowsAffected: 1}}},
7245-
},
7246-
// Test that actual invalid UTF-8 sequences are still rejected
7247-
{
7248-
Query: "insert into utf8_validation_test(c) values (UNHEX('C0C1'));", // Invalid overlong sequence
7249-
ExpectedErrStr: "Incorrect string value: '\\xC0\\xC1' for column 'c' at row 1",
7250-
},
7251-
{
7252-
Query: "insert into utf8_validation_test(v) values (UNHEX('FE'));", // Invalid UTF-8 byte
7253-
ExpectedErrStr: "Incorrect string value: '\\xFE' for column 'v' at row 1",
7254-
},
7255-
// Verify the valid multibyte data was stored correctly
7256-
{
7257-
Query: "select HEX(c), HEX(v), HEX(t) from utf8_validation_test where c is not null and v is not null and t is not null;",
7258-
Expected: []sql.Row{
7259-
{"C3A9", "E282AC", "F09F8D95"}, // é, €, 🍕
7260-
},
7261-
},
7262-
},
7263-
},
72647231
{
72657232
Name: "charset validation issue #8893 - customer scenario",
72667233
SetUpScript: []string{

0 commit comments

Comments
 (0)