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

planner: fix create view grammer check #15334

Merged
merged 7 commits into from
Mar 15, 2020

Conversation

AndrewDi
Copy link
Contributor

@AndrewDi AndrewDi commented Mar 12, 2020

What problem does this PR solve?

fix #15329

What is changed and how it works?

  1. If create view's select contains SELECT INTO grammer, following error should return ERROR 1350 (HY000): View's SELECT contains a 'INTO' clause
  2. If create view's select contains FOR UPDATE \ LOCK IN SHARE MODE, we should rewrite it to NONE by default.

Check List

Tests

  • Unit test

@AndrewDi AndrewDi requested a review from a team as a code owner March 12, 2020 08:23
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Mar 12, 2020
@ghost ghost requested review from eurekaka and winoros and removed request for a team March 12, 2020 08:23
@github-actions github-actions bot added the sig/sql-infra SIG: SQL Infra label Mar 12, 2020
@AndrewDi
Copy link
Contributor Author

@bb7133 @winkyao PTAL

@AndrewDi
Copy link
Contributor Author

/run-all-tests

@codecov
Copy link

codecov bot commented Mar 12, 2020

Codecov Report

Merging #15334 into master will decrease coverage by 0.0420%.
The diff coverage is 84.3971%.

@@               Coverage Diff                @@
##             master     #15334        +/-   ##
================================================
- Coverage   80.4691%   80.4271%   -0.0421%     
================================================
  Files           502        502                
  Lines        133732     133455       -277     
================================================
- Hits         107613     107334       -279     
+ Misses        17707      17705         -2     
- Partials       8412       8416         +4     

@AndrewDi
Copy link
Contributor Author

/run-unit-test

@AndrewDi
Copy link
Contributor Author

/run-all-tests

planner/core/preprocess.go Show resolved Hide resolved
planner/core/preprocess.go Outdated Show resolved Hide resolved
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

Rest is ok

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

@bb7133 bb7133 added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 13, 2020
Copy link
Contributor

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

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added sig/planner SIG: Planner status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 15, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Mar 15, 2020

Your auto merge job has been accepted, waiting for 15248

@sre-bot
Copy link
Contributor

sre-bot commented Mar 15, 2020

/run-all-tests

@sre-bot sre-bot merged commit 1e32b49 into pingcap:master Mar 15, 2020
@AndrewDi AndrewDi deleted the fix_view_select_info branch February 1, 2021 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. sig/planner SIG: Planner sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiDB-Server panic when creating views with SELECT ... INTO syntax
6 participants