Commit cabfedc
committed
fix: allow UNIQUE INDEX in CREATE TABLE
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 18b12f1 commit cabfedc
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 | |
|---|---|---|---|
| |||
10456 | 10456 | | |
10457 | 10457 | | |
10458 | 10458 | | |
10459 | | - | |
10460 | | - | |
| 10459 | + | |
| 10460 | + | |
| 10461 | + | |
10461 | 10462 | | |
10462 | 10463 | | |
10463 | 10464 | | |
10464 | 10465 | | |
10465 | 10466 | | |
10466 | | - | |
| 10467 | + | |
10467 | 10468 | | |
10468 | 10469 | | |
10469 | 10470 | | |
| |||
Lines changed: 11 additions & 0 deletions
| 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