Repository navigation
Commit beaa411
committed
Add queries that are expected to fail to the query corpus
The extractor skipped every query that a MySQL test expects to fail, but most
of them parse, because errors like a missing table come after parsing. The
corpus grows from 69,370 to 77,319 rows.
A query that the tests only ever expect to fail with a syntax error (1064) has
"syntax_error" in a third column. The parser should reject these rows, and any
other row should parse. A failure is now a row where it does the opposite.
ER_SYNTAX_ERROR (1149) isn't marked, because it comes from semantic checks on
queries that parse.
The pinned failures grow from 43 to 226:
- 14 regular rows have a syntax error that MySQL doesn't reach, because a
semantic check during parsing reports another error first.
- 169 marked rows are accepted by the parser. MySQL 8.4.10 rejects 90 of them
with checks in grammar actions and parse tree classes, which this parser
doesn't have, and parses the other 79 when they're prepared.
The benchmark skips marked rows, because the parser stops early on them.1 parent 837da1d commit beaa411
6 files changed
Lines changed: 13816 additions & 450 deletions
File tree
- packages/mysql-parser
- data/mysql-server-query-corpus
- tests
- data
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
0 commit comments