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,parser: make MAX_EXECUTION_TIME sql hint and global variable work #10963

Merged
merged 3 commits into from
Jun 28, 2019

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Fix #10955

What is changed and how it works?

update go.mod to use the latest parser which fixes the SQL hint for MAX_EXECUTION_TIME
put max_execution_time into the auto loaded system variable list so it's correctly initialized

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

…work

update go.mod to use the latest parser which fix the sql hint for MAX_EXECUTION_TIME
put max_execution_time into the auto load system variable list so it's correctly initialized
Fix issue pingcap#10955
@jackysp
Copy link
Member

jackysp commented Jun 28, 2019

go mod tidy failed. PTAL @tiancaiamao

@codecov
Copy link

codecov bot commented Jun 28, 2019

Codecov Report

Merging #10963 into master will decrease coverage by 0.016%.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             master     #10963        +/-   ##
================================================
- Coverage   80.9317%   80.9157%   -0.0161%     
================================================
  Files           418        418                
  Lines         89253      89220        -33     
================================================
- Hits          72234      72193        -41     
- Misses        11785      11789         +4     
- Partials       5234       5238         +4

@tiancaiamao
Copy link
Contributor Author

/run-all-tests

@tiancaiamao
Copy link
Contributor Author

CI fixed. PTAL @jackysp @lysu

@@ -43,7 +43,7 @@ require (
github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e
github.com/pingcap/kvproto v0.0.0-20190619024611-a4759dfe3753
github.com/pingcap/log v0.0.0-20190307075452-bd41d9273596
github.com/pingcap/parser v0.0.0-20190613082312-d2cf6071823d
github.com/pingcap/parser v0.0.0-20190627064259-e9c42442aa72
Copy link
Contributor

Choose a reason for hiding this comment

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

Why need to change parser?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To include this fix pingcap/parser#366
The SQL hint is not successful parsed in select /*+ MAX_EXECUTION_TIME(1000) */ SLEEP(5);
@crazycs520

Copy link
Contributor

@lysu lysu left a comment

Choose a reason for hiding this comment

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

LGTM

@lysu lysu added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 28, 2019
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/session status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug. type/compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MAX_EXECUTION_TIME behavior differences from MySQL
4 participants