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

Add missing error codes to pkg/errno from pkg/parser/mysql. #59237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wddevries
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #29026

Problem Summary:

There are two copies of most error codes and error messages.

What changed and how does it work?

This pull request:

  • adds missing error codes from pkg/parser/mysql/errcode.go to pkg/errno/errcode.go
  • adds missing error messages from pkg/parser/mysql/errname.go to pkg/errno/errname.go

This pull request is the first step in removing the mysql error codes and error messages from the parser.

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.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/invalid-title labels Feb 1, 2025
Copy link

ti-chi-bot bot commented Feb 1, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ehco1996 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

ti-chi-bot bot commented Feb 1, 2025

[FORMAT CHECKER NOTIFICATION]

Notice: To remove the do-not-merge/invalid-title label, please follow title format, for example pkg [, pkg2, pkg3]: what is changed or *: what is changed.

📖 For more info, you can check the "Contribute Code" section in the development guide.

@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 1, 2025
Copy link

tiprow bot commented Feb 1, 2025

Hi @wddevries. 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-sigs/prow repository.

Copy link

codecov bot commented Feb 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.4956%. Comparing base (43f2fb9) to head (de78f80).

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59237        +/-   ##
================================================
+ Coverage   73.0585%   73.4956%   +0.4371%     
================================================
  Files          1689       1689                
  Lines        467012     467052        +40     
================================================
+ Hits         341192     343263      +2071     
+ Misses       104846     102831      -2015     
+ Partials      20974      20958        -16     
Flag Coverage Δ
integration 42.7862% <ø> (?)
unit 72.2619% <ø> (+0.0265%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.4803% <ø> (+0.0086%) ⬆️

@lance6716
Copy link
Contributor

Hi, after checking the linked issue I see most of the missing error codes are features that TiDB does not implemented. And the package pkg/parser/mysql can be served as library to other MySQL toolkit but pkg/errno is only a TiDB package. So we don't bother to add the missing error codes? Can you explain your plan a bit more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/invalid-title release-note-none Denotes a PR that doesn't merit a release note. 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.

2 participants