Commit aa542c0
fix: accept VISIBLE/INVISIBLE index and column attributes in CREATE TABLE and CREATE INDEX (#2449)
MySQL 8.0 invisible indexes (KEY idx (col) INVISIBLE) and invisible columns
failed to parse inside CREATE TABLE, and CREATE INDEX ... INVISIBLE failed
too, because CreateParameter() did not accept the K_VISIBLE/K_INVISIBLE
tokens. The ALTER TABLE productions already support them (#2076 was fixed
for ALTER TABLE only, via #2234); this covers the CREATE statements, which
share CreateParameter(). Tests cover index and column visibility, mixing
visibility with other index options in either order, and quoted columns
named visible/invisible.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 3997ba4 commit aa542c0
3 files changed
Lines changed: 51 additions & 0 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 | |
|---|---|---|---|
| |||
11056 | 11056 | | |
11057 | 11057 | | |
11058 | 11058 | | |
| 11059 | + | |
11059 | 11060 | | |
11060 | 11061 | | |
11061 | 11062 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
171 | 177 | | |
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1162 | 1162 | | |
1163 | 1163 | | |
1164 | 1164 | | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
1165 | 1209 | | |
0 commit comments