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

parser: add support [NO_WRITE_TO_BINLOG | LOCAL] syntax in the ANALYZE statement #49482

Merged
merged 3 commits into from Dec 21, 2023

Conversation

ub-3
Copy link
Contributor

@ub-3 ub-3 commented Dec 14, 2023

What problem does this PR solve?

Issue Number: close #49235

Problem Summary: There is no support for the [NO_WRITE_TO_BINLOG | LOCAL] parameter in the ANALYZE statement

What changed and how does it work?

Parsing of the ANALYZE statement with the [NO_WRITE_TO_BINLOG | LOCAL] parameter is now supported.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

Add support [NO_WRITE_TO_BINLOG | LOCAL] syntax in the ANALYZE statement.

@ti-chi-bot ti-chi-bot bot added do-not-merge/invalid-title release-note needs-ok-to-test size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 14, 2023
Copy link

ti-chi-bot bot commented Dec 14, 2023

Hi @ub-3. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

tiprow bot commented Dec 14, 2023

Hi @ub-3. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@lance6716 lance6716 changed the title Add support [NO_WRITE_TO_BINLOG | LOCAL] syntax in the ANALYZE statement. parser: Add support [NO_WRITE_TO_BINLOG | LOCAL] syntax in the ANALYZE statement Dec 15, 2023
@lance6716
Copy link
Contributor

/ok-to-test

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Merging #49482 (ea8ded7) into master (074af10) will increase coverage by 0.5635%.
Report is 44 commits behind head on master.
The diff coverage is 4.1666%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #49482        +/-   ##
================================================
+ Coverage   70.9977%   71.5612%   +0.5634%     
================================================
  Files          1368       1418        +50     
  Lines        399517     415243     +15726     
================================================
+ Hits         283648     297153     +13505     
- Misses        96068      99291      +3223     
+ Partials      19801      18799      -1002     
Flag Coverage Δ
integration 43.6645% <4.1666%> (?)
unit 71.0008% <ø> (+0.0030%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 47.7771% <ø> (-5.1177%) ⬇️

@ub-3
Copy link
Contributor Author

ub-3 commented Dec 15, 2023

/cc

Copy link

ti-chi-bot bot commented Dec 15, 2023

@ub-3: GitHub didn't allow me to request PR reviews from the following users: ub-3.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ub-3
Copy link
Contributor Author

ub-3 commented Dec 15, 2023

@ub-3 ub-3 changed the title parser: Add support [NO_WRITE_TO_BINLOG | LOCAL] syntax in the ANALYZE statement parser: add support [NO_WRITE_TO_BINLOG | LOCAL] syntax in the ANALYZE statement Dec 15, 2023
@ub-3
Copy link
Contributor Author

ub-3 commented Dec 18, 2023

/cc @Defined2014 @mjonss @bb7133

@ub-3 ub-3 requested a review from lance6716 December 21, 2023 00:04
@lance6716
Copy link
Contributor

ptal @Defined2014 @mjonss @bb7133

@ti-chi-bot ti-chi-bot bot added the lgtm label Dec 21, 2023
Copy link

ti-chi-bot bot commented Dec 21, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-12-16 02:49:23.368743362 +0000 UTC m=+670054.405970274: ☑️ agreed by lance6716.
  • 2023-12-21 01:54:21.004960951 +0000 UTC m=+1098752.042187863: ☑️ agreed by Defined2014.

@lance6716
Copy link
Contributor

/assign @bb7133 @easonn7

Copy link

ti-chi-bot bot commented Dec 21, 2023

@lance6716: GitHub didn't allow me to assign the following users: easonn7.

Note that only pingcap members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @bb7133 @easonn7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@easonn7
Copy link

easonn7 commented Dec 21, 2023

/approve

The parser correctly parses "ANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE," and it aligns with MySQL syntax. Meanwhile, the planner can generate an error message to inform the client that TiDB does not currently support this feature, preventing any misunderstanding. So LGTM

Copy link

ti-chi-bot bot commented Dec 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, easonn7, lance6716, tangenta

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

@ti-chi-bot ti-chi-bot bot added the approved label Dec 21, 2023
@ti-chi-bot ti-chi-bot bot merged commit 76a2f0d into pingcap:master Dec 21, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test release-note size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid parsing of the ANALYZE statement with [NO_WRITE_TO_BINLOG | LOCAL]
6 participants