Skip to content

fix(osc): validate input ddl throw syntax exception when contain comment#1597

Merged
yhilmare merged 4 commits intodev/4.2.3from
yaobin_fix_osc_remove_comment_new
Feb 22, 2024
Merged

fix(osc): validate input ddl throw syntax exception when contain comment#1597
yhilmare merged 4 commits intodev/4.2.3from
yaobin_fix_osc_remove_comment_new

Conversation

@krihy
Copy link
Copy Markdown
Contributor

@krihy krihy commented Feb 22, 2024

What type of PR is this?

type-bug
module-online schema change

What this PR does / why we need it:

parse sql exception when when user input new ddl, so we remove comment before parse, case 1 and case 2 test passed.
case1:
origin sql:
ALTER TABLE "WUZHUJIANBIAO" MODIFY C2 VARCHAR2(20);-- some comment
after remove comment:
ALTER TABLE "WUZHUJIANBIAO" MODIFY C2 VARCHAR2(20);

case 2:
origin sql:
ALTER TABLE "WUZHUJIANBIAO" MODIFY C2 VARCHAR2(20) -- some comment
after remove comment:
ALTER TABLE "WUZHUJIANBIAO" MODIFY C2 VARCHAR2(20) -- some comment

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Additional documentation e.g., usage docs, etc.:


@krihy krihy added type-bug Something isn't working module-Online schema change Online schema change labels Feb 22, 2024
@krihy krihy added this to the ODC 4.2.3-bp milestone Feb 22, 2024
@krihy krihy self-assigned this Feb 22, 2024
@krihy krihy changed the title fix(osc): validate input ddl contain comment throw syntax exception fix(osc): validate input ddl throw syntax exception when contain comment Feb 22, 2024
Copy link
Copy Markdown
Contributor

@yhilmare yhilmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@yhilmare yhilmare merged commit 53f49b1 into dev/4.2.3 Feb 22, 2024
@yhilmare yhilmare deleted the yaobin_fix_osc_remove_comment_new branch February 22, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module-Online schema change Online schema change type-bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants