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: set UnionStmt and ShowStmt as readonly (#755) #756

Merged
merged 1 commit into from
Mar 1, 2020

Conversation

djshow832
Copy link
Contributor

Conflicting files:
util.go
util_test.go

What problem does this PR solve?

Fix pingcap/tidb#15050.
UNION statement and SHOW statement are not treated as readonly statement. These statements are executed again in retrying transactions.

What is changed and how it works?

Set UnionStmt and ShowStmt as readonly.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

N/A

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release note

Release Note

  • Treat UNION statement and SHOW statement as readonly statements.

* add UnionStmt and ShowStmt as readonly

* fix UnionStmt
@codecov
Copy link

codecov bot commented Mar 1, 2020

Codecov Report

Merging #756 into release-3.0 will increase coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-3.0     #756      +/-   ##
===============================================
+ Coverage        64.63%   64.76%   +0.12%     
===============================================
  Files               31       31              
  Lines            10892    10897       +5     
===============================================
+ Hits              7040     7057      +17     
+ Misses            3443     3431      -12     
  Partials           409      409
Impacted Files Coverage Δ
ast/util.go 85.18% <100%> (+57.91%) ⬆️

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 73763c7...b54f49d. Read the comment docs.

@djshow832
Copy link
Contributor Author

/run-all-tests

@djshow832 djshow832 requested review from tiancaiamao and kennytm March 1, 2020 13:00
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

@kennytm kennytm added the status/LGT1 LGT1 label Mar 1, 2020
@tiancaiamao
Copy link
Collaborator

LGTM

@kennytm kennytm closed this Mar 1, 2020
@kennytm kennytm reopened this Mar 1, 2020
@kennytm kennytm added status/LGT2 LGT2 and removed status/LGT1 LGT1 labels Mar 1, 2020
@kennytm kennytm merged commit 79ec3de into pingcap:release-3.0 Mar 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants