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 compatibility issue that update subquery table should be forbidden #7783

Merged
merged 3 commits into from
Sep 26, 2018

Conversation

CodeRushing
Copy link
Contributor

@CodeRushing CodeRushing commented Sep 26, 2018

What problem does this PR solve?

fix #7237

What is changed and how it works?

in buildUpdate function, extract the AsName list when TableSource is ast.SelectStmt and check the table name of Assign in UpdateStmt.List is in the AsName list

Check List

Tests

  • Integration test

@sre-bot
Copy link
Contributor

sre-bot commented Sep 26, 2018

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

Thanks!
Could you add a test in planner package since this is a error generated in planner?

@winoros winoros changed the title Fix compatibility issue that update subquery table should be forbidden planner: fix compatibility issue that update subquery table should be forbidden Sep 26, 2018
Copy link
Contributor

@zhexuany zhexuany left a comment

Choose a reason for hiding this comment

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

LGTM

@imtbkcat imtbkcat added the sig/planner SIG: Planner label Sep 26, 2018
@eurekaka eurekaka added the contribution This PR is from a community contributor. label Sep 26, 2018
@imtbkcat
Copy link

/run-all-tests

Copy link

@imtbkcat imtbkcat left a comment

Choose a reason for hiding this comment

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

LGTM

@imtbkcat imtbkcat merged commit af3b782 into pingcap:master Sep 26, 2018
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update subquery table should be forbidden
6 participants