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

prepare, stmtctx: fix the issue that errors/warnings in parse stage are not cleaned or reported #59276

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

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Feb 6, 2025

What problem does this PR solve?

Issue Number: close #59275, close #59132

Problem Summary:

  1. The errors/warnings are not cleaned because the stmtctx is not reset when Parse returns error.
  2. When Parse returns error, the error is not appended to the stmtctx for the PREPARE binary protocol.

What changed and how does it work?

  1. Reset the warnings in stmtctx if Parse returns error.
  2. Append the error for the PREPARE binary protocol.

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

Fix the issue that errors/warnings in parse stage are not cleaned or reported

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed 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. labels Feb 6, 2025
@YangKeao
Copy link
Member Author

YangKeao commented Feb 6, 2025

/check-issue-triage-complete

Copy link

ti-chi-bot bot commented Feb 6, 2025

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

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/mysql-test 0a83390 link true /test mysql-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.

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.5206%. Comparing base (6673923) to head (0a83390).
Report is 17 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59276        +/-   ##
================================================
+ Coverage   73.0454%   73.5206%   +0.4751%     
================================================
  Files          1689       1689                
  Lines        466983     467137       +154     
================================================
+ Hits         341110     343442      +2332     
+ Misses       104893     102731      -2162     
+ Partials      20980      20964        -16     
Flag Coverage Δ
integration 42.9424% <68.7500%> (?)
unit 72.2988% <100.0000%> (+0.0658%) ⬆️

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

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

Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

LGTM
Please check the MySQL tests.

Copy link

ti-chi-bot bot commented Feb 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zimulala

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 approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 10, 2025
Copy link

ti-chi-bot bot commented Feb 10, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-10 03:07:07.012186391 +0000 UTC m=+239469.408408453: ☑️ agreed by zimulala.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. 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
2 participants