VDiff: fix panic for tables with a unicode_loose_md5 vindex#6640
Merged
systay merged 3 commits intovitessio:masterfrom Sep 1, 2020
Merged
VDiff: fix panic for tables with a unicode_loose_md5 vindex#6640systay merged 3 commits intovitessio:masterfrom
systay merged 3 commits intovitessio:masterfrom
Conversation
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Collaborator
|
We should add a test or two to |
systay
reviewed
Aug 28, 2020
go/vt/wrangler/vdiff.go
Outdated
| log.Warningf("Unhandled type found for column in vdiff: %v(%v)", selExpr, ct) | ||
| colname = "" | ||
| } | ||
| if strings.EqualFold(pk, colname) { |
Collaborator
There was a problem hiding this comment.
the weight_string() can't be the PK, right? shouldn't we do this only for ColNames?
Member
Author
There was a problem hiding this comment.
- I had added the e2e earlier by adding collation to a table in the existing vreplication e2e.
- Refactored the code to isolate the logic that was changed and added unit tests.
- I was not sure if there were FuncExprs other than weight_string() that could serve as a PK in MySQL. So just to confirm: only ColNames can be PKs, right? I updated the code to only allow ColNames
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
systay
approved these changes
Sep 1, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A customer had an issue while running VDiff after MoveTables. VDiff panic-ed due to an invalid cast while dealing with the weight_string() that is generated as part of the vdiff plan, which is a FuncExpr type and not a Colname.
Signed-off-by: Rohit Nayak rohit@planetscale.com