Commit 2877163
committed
Parse signed/unsigned integer data type in MySQL CAST
MySQL doesn't have the same set of possible CAST types as for e.g.
column definitions. For example, it raises a syntax error for `CAST(1 AS
INTEGER SIGNED)` and instead expects `CAST(1 AS SIGNED INTEGER)`.
We retain the current somewhat permissive datatype parsing behavior
(e.g. allowing `CAST(1 AS BIGINT)` even though MySQL would raise a
syntax error), and add two datatypes for this specific case (`SIGNED
[INTEGER]` and `UNSIGNED [INTEGER]`).
Closes #15891 parent 3ace97c commit 2877163
File tree
5 files changed
+56
-2
lines changed- src
- ast
- parser
- tests
5 files changed
+56
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
241 | 261 | | |
242 | 262 | | |
243 | 263 | | |
| |||
515 | 535 | | |
516 | 536 | | |
517 | 537 | | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
518 | 544 | | |
519 | 545 | | |
520 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
798 | 798 | | |
799 | 799 | | |
800 | 800 | | |
801 | | - | |
802 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
803 | 804 | | |
804 | 805 | | |
805 | 806 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| 793 | + | |
793 | 794 | | |
794 | 795 | | |
795 | 796 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9110 | 9110 | | |
9111 | 9111 | | |
9112 | 9112 | | |
| 9113 | + | |
| 9114 | + | |
| 9115 | + | |
| 9116 | + | |
| 9117 | + | |
| 9118 | + | |
| 9119 | + | |
| 9120 | + | |
9113 | 9121 | | |
9114 | 9122 | | |
9115 | 9123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3255 | 3255 | | |
3256 | 3256 | | |
3257 | 3257 | | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
0 commit comments