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

(DNM) expression: remove ctx from ParamMarker #53487

Closed
wants to merge 1 commit into from

Conversation

YangKeao
Copy link
Member

What problem does this PR solve?

Issue Number: close #53485

Problem Summary:

As every execution will set the correct Constant.Value, there is no need to read the value from session context again.

What changed and how does it work?

Remove the ctx field from ParamMarker. Remove the GetUserVar function, and use Constant.Value as a replacement.

Check List

TODO

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

Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
Copy link

ti-chi-bot bot commented May 22, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

ti-chi-bot bot commented May 22, 2024

[FORMAT CHECKER NOTIFICATION]

Notice: To remove the do-not-merge/needs-tests-checked label, please finished the tests then check the finished items in description.

For example:

Tests

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

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

@ti-chi-bot ti-chi-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner labels May 22, 2024
Copy link

tiprow bot commented May 22, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@YangKeao
Copy link
Member Author

/retest

Copy link

ti-chi-bot bot commented May 22, 2024

[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 fixdb, windtalker 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

@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 22, 2024
Copy link

codecov bot commented May 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 73.9423%. Comparing base (6928519) to head (5babb90).
Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #53487        +/-   ##
================================================
+ Coverage   72.5278%   73.9423%   +1.4144%     
================================================
  Files          1505       1505                
  Lines        429901     429889        -12     
================================================
+ Hits         311798     317870      +6072     
+ Misses        98809      92082      -6727     
- Partials      19294      19937       +643     
Flag Coverage Δ
integration 23.3806% <0.0000%> (?)

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 50.4028% <ø> (+8.9988%) ⬆️

Copy link

tiprow bot commented May 22, 2024

@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
fast_test_tiprow 5babb90 link true /test fast_test_tiprow

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.

@@ -130,20 +129,13 @@ type Constant struct {

// ParamMarker indicates param provided by COM_STMT_EXECUTE.
type ParamMarker struct {
ctx variable.SessionVarsProvider
Copy link
Member Author

Choose a reason for hiding this comment

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

When the statement is using plan cache, the Value is not set. Therefore, this PR is not correct. It's only an experiment to see what will happen if I removed it.

Copy link

ti-chi-bot bot commented May 22, 2024

@YangKeao: 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-mysql-client-test 5babb90 link true /test pull-mysql-client-test
idc-jenkins-ci-tidb/unit-test 5babb90 link true /test unit-test
idc-jenkins-ci-tidb/mysql-test 5babb90 link true /test mysql-test
idc-jenkins-ci-tidb/check_dev_2 5babb90 link true /test check-dev2
idc-jenkins-ci-tidb/check_dev 5babb90 link true /test check-dev

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

@YangKeao YangKeao closed this May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/needs-tests-checked do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve the chaos usage of Constant
1 participant