Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config, changefeed (ticdc): add sql mode config for changefeed #9941

Merged
merged 4 commits into from
Nov 2, 2023

Conversation

asddongmen
Copy link
Contributor

@asddongmen asddongmen commented Oct 23, 2023

What problem does this PR solve?

Issue Number: close #9876

What is changed and how it works?

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

Add sql mode config for changefeed 

@ti-chi-bot ti-chi-bot bot added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. release-note-none Denotes a PR that doesn't merit a release note. labels Oct 23, 2023
@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 23, 2023
@asddongmen asddongmen changed the title config, changefeed (ticdc): add sql config for changefeed config, changefeed (ticdc): add sql mode config for changefeed Oct 23, 2023
@asddongmen
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 27, 2023
@@ -426,7 +427,13 @@ func (s *ddlSinkImpl) close(ctx context.Context) (err error) {

// addSpecialComment translate tidb feature to comment
func (s *ddlSinkImpl) addSpecialComment(ddl *model.DDLEvent) (string, error) {
stms, _, err := parser.New().Parse(ddl.Query, ddl.Charset, ddl.Collate)
p := parser.New()
mode, err := mysql.GetSQLMode(s.info.Config.SQLMode)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please give more comment for the SQLMode here, which type means can handle "" quoted names?

Copy link
Contributor

Choose a reason for hiding this comment

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

Besides "" quoted names, since we introduced SQLMode here, what other cases we can handle for other SQLMode types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add more detail in the TiCDC documentation.

@@ -38,6 +39,7 @@ const (
// minSyncPointRetention is the minimum of SyncPointRetention can be set.
minSyncPointRetention = time.Hour * 1
minChangeFeedErrorStuckDuration = time.Minute * 30
defaultSQLMode = mysql.DefaultSQLMode
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add comment to show what is the DefaultSQLMode's value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Nov 1, 2023
@asddongmen
Copy link
Contributor Author

/test verify

@ti-chi-bot ti-chi-bot bot added lgtm approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 1, 2023
Copy link
Contributor

ti-chi-bot bot commented Nov 1, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-27 08:37:00.935694302 +0000 UTC m=+2596618.522804447: ☑️ agreed by nongfushanquan.
  • 2023-11-01 06:40:21.34505443 +0000 UTC m=+3021618.932164576: ☑️ agreed by sdojjy.

@asddongmen
Copy link
Contributor Author

/test all

@asddongmen
Copy link
Contributor Author

/retest

1 similar comment
@asddongmen
Copy link
Contributor Author

/retest

Copy link
Contributor

ti-chi-bot bot commented Nov 1, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nongfushanquan, sdojjy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@asddongmen asddongmen added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 2, 2023
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Nov 2, 2023
@asddongmen asddongmen removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 2, 2023
@asddongmen
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 365113c into pingcap:master Nov 2, 2023
3 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #9994.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Nov 2, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #9995.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Nov 2, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #9996.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiCDC sql event filter can not handle ddl that using "" as identifier.
5 participants