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

ast: add new field in create view stmt #343

Merged
merged 3 commits into from
Jun 3, 2019
Merged

Conversation

alivxxx
Copy link
Contributor

@alivxxx alivxxx commented May 30, 2019

What problem does this PR solve?

Fix panic when create view using prepare.

What is changed and how it works?

For pingcap/tidb#10651

Previously, when we build the create view statement, the Fields of select statement will be rewritten with only name info, so the Expr will be nil when we try to execute the prepare statement, which will cause panic. This PR adds a new field in CreateViewStmt to record the select schema.

Check List

Tests

  • No code

Code changes

  • None

Side effects

  • None

Related changes

  • None

@alivxxx alivxxx added the type/bug-fix fix bug label May 30, 2019
@alivxxx alivxxx requested review from zz-jason, eurekaka and winoros May 30, 2019 07:44
@codecov

This comment has been minimized.

@codecov

This comment has been minimized.

ast/ddl.go Outdated Show resolved Hide resolved
@alivxxx alivxxx requested a review from kennytm May 31, 2019 02:48
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, provided pingcap/tidb#10651 also has an LGTM.

@kennytm kennytm added the status/LGT1 LGT1 label May 31, 2019
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 status/LGT2 LGT2 and removed status/LGT1 LGT1 labels Jun 3, 2019
@CLAassistant
Copy link

CLAassistant commented Jun 3, 2019

CLA assistant check
All committers have signed the CLA.

@zz-jason zz-jason merged commit 7cb252e into pingcap:master Jun 3, 2019
@alivxxx alivxxx deleted the view branch June 3, 2019 12:03
tiancaiamao pushed 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.

4 participants