Repository navigation
Commit d4dee07
committed
fix: parse every MySQL character set form of ALTER TABLE CONVERT TO
CONVERT TO accepted only CHARACTER SET followed by an unquoted name, and
COLLATE only an unquoted name. CONVERT TO CHARSET, CHARACTER SET DEFAULT,
the binary character set and quoted names failed, although MySQL accepts
them all and column types already took the same names.
CONVERT TO now reads its character set and collation with the name rule
of column types, which the new CharacterSetName production shares, and
also accepts DEFAULT. AlterExpression.isUseCharsetKeyword() keeps the
CHARSET spelling, so CONVERT TO CHARSET, DEFAULT CHARSET and CHARSET
table options print as written instead of as CHARACTER SET.
Signed-off-by: minleejae <mmj9808@gmail.com>1 parent dd03d6f commit d4dee07
3 files changed
Lines changed: 125 additions & 6 deletions
File tree
- src
- main
- java/net/sf/jsqlparser/statement/alter
- jjtree/net/sf/jsqlparser/parser
- test/java/net/sf/jsqlparser/statement/alter
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
956 | 957 | | |
957 | 958 | | |
958 | 959 | | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
959 | 969 | | |
960 | 970 | | |
961 | 971 | | |
| |||
1485 | 1495 | | |
1486 | 1496 | | |
1487 | 1497 | | |
| 1498 | + | |
1488 | 1499 | | |
1489 | | - | |
| 1500 | + | |
1490 | 1501 | | |
1491 | | - | |
| 1502 | + | |
1492 | 1503 | | |
1493 | 1504 | | |
1494 | 1505 | | |
1495 | 1506 | | |
1496 | | - | |
| 1507 | + | |
1497 | 1508 | | |
1498 | 1509 | | |
1499 | 1510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19131 | 19131 | | |
19132 | 19132 | | |
19133 | 19133 | | |
| 19134 | + | |
19134 | 19135 | | |
19135 | 19136 | | |
19136 | 19137 | | |
| |||
19519 | 19520 | | |
19520 | 19521 | | |
19521 | 19522 | | |
19522 | | - | |
| 19523 | + | |
19523 | 19524 | | |
19524 | 19525 | | |
19525 | 19526 | | |
| 19527 | + | |
| 19528 | + | |
| 19529 | + | |
| 19530 | + | |
| 19531 | + | |
| 19532 | + | |
| 19533 | + | |
| 19534 | + | |
19526 | 19535 | | |
19527 | 19536 | | |
19528 | 19537 | | |
| |||
22081 | 22090 | | |
22082 | 22091 | | |
22083 | 22092 | | |
22084 | | - | |
22085 | | - | |
| 22093 | + | |
| 22094 | + | |
| 22095 | + | |
| 22096 | + | |
| 22097 | + | |
22086 | 22098 | | |
22087 | 22099 | | |
22088 | 22100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
0 commit comments