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

parser: fix hint parsing in select /*+ max_execution_time */ 1 #366

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

tiancaiamao
Copy link
Collaborator

What problem does this PR solve?

In this query, SELECT /*+ MAX_EXECUTION_TIME(1000) */ 1, the MAX_EXECUTION_TIME hint is not saved to st.TableHints

pingcap/tidb#10955 is caused by this bug.

What is changed and how it works?

Move this line

st.TableHints = st.SelectStmtOpts.TableHints

to SelectStmtBasic will address the problem.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

@tiancaiamao tiancaiamao added the type/bug-fix fix bug label Jun 27, 2019
@codecov
Copy link

codecov bot commented Jun 27, 2019

Codecov Report

Merging #366 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #366   +/-   ##
=======================================
  Coverage   50.51%   50.51%           
=======================================
  Files          31       31           
  Lines        6909     6909           
=======================================
  Hits         3490     3490           
  Misses       3060     3060           
  Partials      359      359
Impacted Files Coverage Δ
parser.go 70.58% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59b67d9...bf39d5e. Read the comment docs.

@tiancaiamao
Copy link
Collaborator Author

PTAL @lysu @jackysp

Copy link
Contributor

@kennytm kennytm 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
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

@jackysp jackysp merged commit e9c4244 into pingcap:master Jun 27, 2019
@tiancaiamao tiancaiamao deleted the max-execution-hint branch June 27, 2019 07:01
tiancaiamao added a commit to tiancaiamao/parser that referenced this pull request Jul 1, 2019
tiancaiamao added a commit to tiancaiamao/parser that referenced this pull request Jul 2, 2019
tiancaiamao added a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants