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

mysql, errno: Unify the mysql error codes and related error messages. #58790

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

wddevries
Copy link
Contributor

@wddevries wddevries commented Jan 8, 2025

What problem does this PR solve?

Issue Number: close #29026

Problem Summary:

There are two copies of most error codes and error messages. This pull request:

  • moves the struct mysql.ErrMessage to pkg/errno/errname.go,
  • moves the function mysql.Message to pkg/errno/errname.go,
  • adds any missing error codes from pkg/parser/mysql/errcode.go to pkg/errno/errcode.go,
  • updates all references to error codes defined in pkg/parser/mysql/errcode.go to the versions defined in pkg/errno/errcode.go,
  • removes the file pkg/parser/mysql/errcode.go,
  • adds any missing error messages from pkg/parser/mysql/errname.go to pkg/errno/errname.go,
  • updates all references to the messages in pkg/parser/mysql/errname.go to the versions in pkg/errno/errname.go,
  • removes the file pkg/parser/mysql/errname.go,

The error messages in both the mysql package and errno were compared to insure compatibility.

What changed and how does it work?

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 do-not-merge/invalid-title do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. sig/planner SIG: Planner labels Jan 8, 2025
Copy link

tiprow bot commented Jan 8, 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.

@wddevries wddevries changed the title Unify the mysql error codes and related error messages. mysql, errno: Unify the mysql error codes and related error messages. Jan 8, 2025
@wddevries wddevries marked this pull request as draft January 8, 2025 06:32
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 8, 2025
Copy link

ti-chi-bot bot commented Jan 8, 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 gmhdbjd, leavrth, qw4990, tangenta, xuhuaiyu for approval, ensuring that each of them provides their approval before proceeding. 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

@wddevries wddevries marked this pull request as ready for review January 9, 2025 02:11
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 9, 2025
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 74.19355% with 8 lines in your changes missing coverage. Please review.

Project coverage is 74.7454%. Comparing base (8390fc4) to head (e2d5931).
Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58790        +/-   ##
================================================
+ Coverage   73.4645%   74.7454%   +1.2808%     
================================================
  Files          1676       1722        +46     
  Lines        464424     472516      +8092     
================================================
+ Hits         341187     353184     +11997     
+ Misses       102397      97068      -5329     
- Partials      20840      22264      +1424     
Flag Coverage Δ
integration 48.5050% <23.0769%> (?)
unit 72.3479% <74.1935%> (+0.0641%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 60.9596% <0.0000%> (+15.2393%) ⬆️

Copy link

ti-chi-bot bot commented Jan 9, 2025

@wddevries: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-lightning-integration-test e2d5931 link true /test pull-lightning-integration-test
pull-br-integration-test e2d5931 link true /test pull-br-integration-test

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner 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.

De-duplicate error code definitions
1 participant