Repository navigation
Commit 980d24a
committed
fix: reject DELETE statements missing a target table
DELETE, DELETE FROM, DELETE FROM WHERE ... and DELETE FROM USING ...
all parsed successfully into a Delete with a null table, and toString()
then printed the literal text "null" (DELETE FROM null WHERE 1 = 1).
The grammar's bare-FROM alternative never required a table to follow.
The production now validates that a target table was supplied in one
of the three supported positions (before FROM, after FROM, or via the
table list) through a requireDeleteSyntax() helper, matching the
existing requireAccessSyntax()/requireReplicationSyntax() pattern.1 parent f6ac257 commit 980d24a
2 files changed
Lines changed: 20 additions & 0 deletions
File tree
- src
- main/jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/statement/delete
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2013 | 2013 | | |
2014 | 2014 | | |
2015 | 2015 | | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
2016 | 2020 | | |
2017 | 2021 | | |
2018 | 2022 | | |
| |||
7193 | 7197 | | |
7194 | 7198 | | |
7195 | 7199 | | |
| 7200 | + | |
| 7201 | + | |
7196 | 7202 | | |
7197 | 7203 | | |
7198 | 7204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
77 | 91 | | |
78 | 92 | | |
79 | 93 | | |
| |||
0 commit comments