-
Notifications
You must be signed in to change notification settings - Fork 6k
ddl: Fix invalid expression index #61135
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
ddl: Fix invalid expression index #61135
Conversation
Signed-off-by: JaySon-Huang <[email protected]>
Hi @JaySon-Huang. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #61135 +/- ##
================================================
+ Coverage 73.1620% 75.2518% +2.0898%
================================================
Files 1724 1746 +22
Lines 477317 489003 +11686
================================================
+ Hits 349215 367984 +18769
+ Misses 106687 98140 -8547
- Partials 21415 22879 +1464
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Signed-off-by: JaySon-Huang <[email protected]>
/test check-dev2 |
@JaySon-Huang: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lance6716, wjhuang2016 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
@JaySon-Huang: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
ref #9891, ref pingcap/tidb#61133 ddl: Fix integration test of expr index TiDB disable the invalid expression index `((null))` from being created by pingcap/tidb#61135. Update the integration test cases Signed-off-by: JaySon-Huang <[email protected]>
What problem does this PR solve?
Issue Number: close #61133
Problem Summary:
TiDB accept this kind of invalid expression index. If tiflash replica is created and new rows inserted, it cause TiFlash crashes becuase unexpectedly need to create a "Nothing" data type in the storage layer. pingcap/tiflash#9891
What changed and how does it work?
For a valid expression, the return value type stored in generated column should never be
TypeNull
. Add a check whethercol.FieldType.GetType() == mysql.TypeNull
is true. If it is true, then refuse to create the expression index.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.