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

session: load variables before parsing SQL #51466

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Mar 4, 2024

What problem does this PR solve?

Issue Number: close #51387

Problem Summary:

The session variables are not loaded before parsing the SQL statements, which makes SQLMode incorrect.

What changed and how does it work?

Load session variables before parsing the statements.

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.

Release note

Fix the issue that SQLMode doesn't have effect on the first statement in a session.

@YangKeao YangKeao requested a review from hawkingrei March 4, 2024 06:42
@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. labels Mar 4, 2024
@YangKeao YangKeao requested a review from xhebox March 4, 2024 06:42
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 4, 2024
Copy link

tiprow bot commented Mar 4, 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 89a9b4b 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/test-infra repository. I understand the commands that are listed here.

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Merging #51466 (89a9b4b) into master (1d24b1c) will increase coverage by 2.2015%.
Report is 37 commits behind head on master.
The diff coverage is 91.4285%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51466        +/-   ##
================================================
+ Coverage   70.6992%   72.9007%   +2.2015%     
================================================
  Files          1462       1463         +1     
  Lines        435224     442691      +7467     
================================================
+ Hits         307700     322725     +15025     
+ Misses       108234      99748      -8486     
- Partials      19290      20218       +928     
Flag Coverage Δ
integration 49.3121% <50.0000%> (?)
unit 70.4547% <91.4285%> (-0.0451%) ⬇️

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

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

@YangKeao
Copy link
Member Author

YangKeao commented Mar 4, 2024

/run-check-issue-triage-complete

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 4, 2024
Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Mar 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, xhebox

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 5, 2024
Copy link

ti-chi-bot bot commented Mar 5, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-04 09:01:47.216310997 +0000 UTC m=+71334.238557385: ☑️ agreed by xhebox.
  • 2024-03-05 17:29:31.347643036 +0000 UTC m=+188198.369889424: ☑️ agreed by bb7133.

@ti-chi-bot ti-chi-bot bot merged commit 5e6cb16 into pingcap:master Mar 5, 2024
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

global sql_mode NO_BACKSLASH_ESCAPES doesn't behave as expected
3 participants