Repository navigation
Commit 4f23e95
committed
Read MySQL test files in their character sets
The query corpus extractor decoded every MySQL test file as Latin-1. Most test files are UTF-8, so non-ASCII text was double-encoded ("geprüft" became "geprüft"), and 0x85 bytes inside UTF-8 characters split lines. Test sections that select another character set with --character_set were decoded twice.
Each line is now read in the character set of its test section, or in UTF-8 by default. A line that isn't valid in that character set is read as MySQL's latin1. Lines with only ASCII characters don't change. The extractor no longer uses the deprecated utf8_encode() and HTML-ENTITIES conversion, and it passes the fputcsv() escape character that PHP 8.4 requires.
The regenerated MySQL 8.4.10 corpus has 69,068 queries. A few statements that a misread quote used to merge with others are now separate queries. 166 queries fail instead of 167: the failing queries are the same, now with correct text, except for one former failure that was several statements merged into one.1 parent 5cd508e commit 4f23e95
4 files changed
Lines changed: 1360 additions & 1493 deletions
File tree
- packages/mysql-parser
- data/mysql-server-query-corpus
- tests
- data
- tools
0 commit comments