Repository navigation
Commit 32a7949
authored
fix: allow UNIQUE INDEX in CREATE TABLE (#2457)
Accept an optional UNIQUE prefix on the INDEX branch of CreateTableConstraint, so MySQL-style CREATE TABLE ... UNIQUE INDEX name (cols) ... parses and round-trips. UNIQUE INDEX is disambiguated from UNIQUE KEY and the bare UNIQUE constraint by the LOOKAHEAD.
Fixes #1893
Signed-off-by: 付典 <fudianchn@gmail.com>1 parent d51ee1c commit 32a7949
2 files changed
Lines changed: 15 additions & 3 deletions
File tree
- src
- main/jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/statement/create
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10561 | 10561 | | |
10562 | 10562 | | |
10563 | 10563 | | |
10564 | | - | |
10565 | | - | |
| 10564 | + | |
| 10565 | + | |
| 10566 | + | |
10566 | 10567 | | |
10567 | 10568 | | |
10568 | 10569 | | |
10569 | 10570 | | |
10570 | 10571 | | |
10571 | | - | |
| 10572 | + | |
10572 | 10573 | | |
10573 | 10574 | | |
10574 | 10575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1206 | 1206 | | |
1207 | 1207 | | |
1208 | 1208 | | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1209 | 1220 | | |
0 commit comments