Skip to content

mysql.go: data may not consistent when no pk but has uk (#421)#446

Merged
WangXiangUSTC merged 2 commits intorelease-2.1from
xiang/cherry-pick-1
Jan 22, 2019
Merged

mysql.go: data may not consistent when no pk but has uk (#421)#446
WangXiangUSTC merged 2 commits intorelease-2.1from
xiang/cherry-pick-1

Conversation

@WangXiangUSTC
Copy link
Copy Markdown
Contributor

@WangXiangUSTC WangXiangUSTC commented Jan 21, 2019

  • mysql.go: data may not consistent when no pk but has uk

cause by drainer using uk as where to update (where a1 = * and a3 is
NULL), may update the wrong row
when any column is null, it will not be index, so we can't use it unless
all column of index is not null

What problem does this PR solve?

fix a bug when no pk but has uk

What is changed and how it works?

git cherry-pick

* mysql.go: data may not consistent when no pk but has uk

cause by drainer using uk as where to update (where a1 = * and a3 is
	NULL), may update the wrong row
when any column is null, it will not be index, so we can't use it unless
all column of index is not null
@WangXiangUSTC
Copy link
Copy Markdown
Contributor Author

/run-all-tests

@IANTHEREAL
Copy link
Copy Markdown
Collaborator

IANTHEREAL commented Jan 21, 2019

fix CI, and it's better to let author pick self's PR

@WangXiangUSTC
Copy link
Copy Markdown
Contributor Author

/run-all-tests

@WangXiangUSTC
Copy link
Copy Markdown
Contributor Author

/run-all-tests

@IANTHEREAL
Copy link
Copy Markdown
Collaborator

LGTM

Copy link
Copy Markdown
Contributor

@july2993 july2993 left a comment

Choose a reason for hiding this comment

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

LGTM

@WangXiangUSTC WangXiangUSTC merged commit 77d805b into release-2.1 Jan 22, 2019
@WangXiangUSTC WangXiangUSTC deleted the xiang/cherry-pick-1 branch January 22, 2019 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants