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

*: fix panic for create view using prepare #10651

Merged
merged 5 commits into from Jun 4, 2019

Conversation

Projects
None yet
3 participants
@lamxTyler
Copy link
Member

commented May 30, 2019

What problem does this PR solve?

Create view using prepare will panic.

What is changed and how it works?

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

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • Need to cherry-pick to the release branch
@codecov

This comment has been minimized.

Copy link

commented Jun 3, 2019

Codecov Report

Merging #10651 into master will decrease coverage by 0.0067%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##             master    #10651        +/-   ##
===============================================
- Coverage   78.3547%   78.348%   -0.0068%     
===============================================
  Files           414       414                
  Lines         87719     87701        -18     
===============================================
- Hits          68732     68712        -20     
- Misses        13845     13848         +3     
+ Partials       5142      5141         -1
@zz-jason
Copy link
Member

left a comment

LGTM

@zz-jason zz-jason added the status/LGT1 label Jun 3, 2019

@lamxTyler

This comment has been minimized.

Copy link
Member Author

commented Jun 4, 2019

/run-all-tests

@lamxTyler

This comment has been minimized.

Copy link
Member Author

commented Jun 4, 2019

/rebuild

@winoros

winoros approved these changes Jun 4, 2019

Copy link
Member

left a comment

lgtm

@lamxTyler lamxTyler added status/LGT2 and removed status/LGT1 labels Jun 4, 2019

@lamxTyler lamxTyler merged commit ce91d25 into pingcap:master Jun 4, 2019

5 of 6 checks passed

ci/circleci CircleCI is running your tests
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/build_check_race Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev_2 Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@lamxTyler lamxTyler deleted the lamxTyler:create-view branch Jun 4, 2019

lamxTyler added a commit to lamxTyler/tidb that referenced this pull request Jun 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.