Commit 11447f1
fix: strip trailing semicolon from ALTER statement options
A trailing semicolon in the ALTER statement was carried into
alterStatementOptions by the greedy (.*$) capture and never trimmed.
When those options are spliced into a larger statement (e.g. appending
", ALGORITHM=INSTANT" in generateInstantDDLQuery) the semicolon lands
mid-statement. With multiStatements=true on the applier connection this
turns one INSTANT DDL into two statements, silently degrading to a
native online DDL and, on error, falling back to the full copy.
Trim the trailing terminator once in ParseAlterStatement so the options
stay a clean fragment.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent c231272 commit 11447f1
2 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
29 | 50 | | |
30 | 51 | | |
31 | 52 | | |
| |||
0 commit comments