Commit 902823e
* Support row alias on INSERT ... VALUES/SET (#22)
MySQL 8.0.19 added a row alias on the inserted row
(`INSERT ... VALUES (...) AS new ON DUPLICATE KEY UPDATE col = new.col`)
to replace the deprecated `VALUES(col)` function inside the update list.
Extend `InsertStmt` with `RowAlias` and `ColumnAliases`, and add the
optional `AS row_alias [(col_alias_list)]` slot to the `VALUES` and `SET`
forms of `InsertValues`. The `SELECT` form is intentionally left out:
attaching the alias there propagates `AS` into the column-alias FOLLOW
set inside `SELECT` and yields a shift/reduce conflict that goyacc
rejects.
REPLACE is left unchanged; it has no ON DUPLICATE KEY UPDATE, so a row
alias is meaningless there.
* Ignore parser/genkeyword build artifact
The Makefile's genkeyword target produces a Go binary at parser/genkeyword
that's used by `go generate`. It's a build output, not source.
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 845ca69 commit 902823e
5 files changed
Lines changed: 7716 additions & 7582 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2399 | 2399 | | |
2400 | 2400 | | |
2401 | 2401 | | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
2402 | 2408 | | |
2403 | 2409 | | |
2404 | 2410 | | |
| |||
2516 | 2522 | | |
2517 | 2523 | | |
2518 | 2524 | | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
2519 | 2539 | | |
2520 | 2540 | | |
2521 | 2541 | | |
| |||
0 commit comments