Commit 59ca318
fix: resolve critical nil pointer dereferences in ALTER parser
Fixes three critical nil pointer dereference bugs discovered during
comprehensive error recovery testing:
1. ALTER TABLE DROP COLUMN - missing column name check (line 61)
2. ALTER TABLE DROP CONSTRAINT - missing constraint name check (line 72)
3. ALTER TABLE ALTER COLUMN - missing column name check (line 109)
All three cases now properly check if parseIdent() returns nil before
accessing the Name field, returning appropriate error messages instead
of crashing.
These bugs would have caused production crashes when parsing invalid
ALTER statements missing required identifier tokens.
Fixes issues discovered in TEST-013: Parser Error Recovery Tests1 parent 265cf4f commit 59ca318
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
| |||
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
103 | 112 | | |
104 | 113 | | |
105 | 114 | | |
| |||
0 commit comments