Commit a88dfce
authored
fix(mysql): support SHOW TABLES IN <schema> parsing (#7537)
MariaDB and MySQL both accept `SHOW TABLES IN schema` as a synonym
for `SHOW TABLES FROM schema`, but the parser only handled `FROM`.
The `IN` token was being consumed as a potential log-file specifier
(for BINLOG/RELAYLOG EVENTS) and then lost, leaving the schema
identifier unconsumed and raising a ParseError.
Save the parser index before consuming `IN`; if no string literal
follows, retreat so the schema-name branch can match `IN` as an
alias for `FROM`. BINLOG/RELAYLOG EVENTS behavior is preserved by
the existing test_show_events coverage.1 parent 68861d9 commit a88dfce
2 files changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
412 | 418 | | |
413 | 419 | | |
414 | 420 | | |
| |||
417 | 423 | | |
418 | 424 | | |
419 | 425 | | |
420 | | - | |
| 426 | + | |
421 | 427 | | |
422 | 428 | | |
423 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1411 | 1411 | | |
1412 | 1412 | | |
1413 | 1413 | | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
1414 | 1422 | | |
1415 | 1423 | | |
1416 | 1424 | | |
| |||
0 commit comments