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: disallow subquery without table alias (#19102) #20367

Merged
merged 10 commits into from
Nov 12, 2020

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Oct 9, 2020

cherry-pick #19102 to release-4.0


What problem does this PR solve?

Issue Number: close pingcap/parser#963

Parser PR: pingcap/parser#968

What is changed and how it works?

Proposal: xxx

What's Changed:
Add table alias validation in preprocess.go.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test

Side effects
N/A

Release note

  • SQL statements that omit table aliases in subquery will be parsed as the error 1248("Every derived table must have its own alias") instead of a syntax error.

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

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.

@tangenta please resolve conflicts.

@ti-srebot
Copy link
Contributor Author

@ti-srebot, please update your pull request.

1 similar comment
@ti-srebot
Copy link
Contributor Author

@ti-srebot, please update your pull request.

@bb7133 bb7133 modified the milestones: v4.0.8, v4.0.9 Nov 4, 2020
@ti-srebot
Copy link
Contributor Author

@ti-srebot, please update your pull request.

Copy link
Member

@wjhuang2016 wjhuang2016 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 11, 2020
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

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 12, 2020
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

@ti-srebot ti-srebot added status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Nov 12, 2020
@zz-jason
Copy link
Member

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 12, 2020
@ti-srebot
Copy link
Contributor Author

Your auto merge job has been accepted, waiting for:

  • 20712
  • 20907
  • 20954
  • 20921
  • 20829
  • 20696
  • 20632
  • 20406
  • 20343
  • 20814

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot merged commit 5304eff into pingcap:release-4.0 Nov 12, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/executor component/parser sig/execution SIG execution sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT3 The PR has already had 3 LGTM. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants