Commit fa2e9a1
committed
fix(set): comma-separated assignments after SET NAMES/CHARSET, ON keyword values, empty-result detection
Issue #34: SET NAMES/CHARSET branches returned immediately without
checking for comma-separated variable assignments. Added comma loops
to all three branches (NAMES, CHARACTER SET, CHARSET).
Issue #35: ON is a keyword (TK_ON) not recognized as an identifier
by the expression parser's is_keyword_as_identifier() allowlist.
Added TK_ON to the allowlist so SET sql_auto_is_null = ON works.
Issue #36: SetParser::parse() always returned a NODE_SET_STMT root
even when nothing was parsed, causing parse_set() to report OK for
invalid input. Added empty-AST guards (return nullptr if no children)
to all branches, plus defense-in-depth check in parse_set() for
ast->first_child. parse_variable_assignment() now returns nullptr
when no RHS expression was parsed.
All 1213 tests pass.1 parent 7646c38 commit fa2e9a1
4 files changed
Lines changed: 50 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
| 636 | + | |
636 | 637 | | |
637 | 638 | | |
638 | 639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | | - | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
44 | 55 | | |
45 | 56 | | |
46 | 57 | | |
47 | 58 | | |
48 | 59 | | |
49 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
| |||
56 | 73 | | |
57 | 74 | | |
58 | 75 | | |
| 76 | + | |
59 | 77 | | |
60 | 78 | | |
61 | 79 | | |
| |||
65 | 83 | | |
66 | 84 | | |
67 | 85 | | |
| 86 | + | |
68 | 87 | | |
69 | 88 | | |
70 | 89 | | |
| |||
77 | 96 | | |
78 | 97 | | |
79 | 98 | | |
| 99 | + | |
80 | 100 | | |
81 | 101 | | |
82 | 102 | | |
| |||
86 | 106 | | |
87 | 107 | | |
88 | 108 | | |
| 109 | + | |
89 | 110 | | |
90 | 111 | | |
91 | 112 | | |
| |||
99 | 120 | | |
100 | 121 | | |
101 | 122 | | |
| 123 | + | |
102 | 124 | | |
103 | 125 | | |
104 | 126 | | |
| |||
234 | 256 | | |
235 | 257 | | |
236 | 258 | | |
237 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
238 | 264 | | |
239 | 265 | | |
240 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
0 commit comments