Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

fix unique key null bug #119

Merged
merged 2 commits into from
Jul 14, 2020
Merged

Conversation

lichunzhu
Copy link
Contributor

What problem does this PR solve?

Fix the problem that when picked up field is unique index NULL but dumpling skipped the NULL value.

What is changed and how it works?

Add nullValueCondition to check for the first file like mydumper. A related integration is also added.

Check List

Tests

  • Unit test
  • Integration test

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Fix the bug that dumpling omit the NULL value when --r is specified.

@codecov
Copy link

codecov bot commented Jul 10, 2020

Codecov Report

Merging #119 into master will decrease coverage by 0.19%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
- Coverage   51.67%   51.48%   -0.20%     
==========================================
  Files          17       17              
  Lines        1850     1853       +3     
==========================================
- Hits          956      954       -2     
- Misses        826      830       +4     
- Partials       68       69       +1     

Copy link
Collaborator

@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 but IMO it's better to avoid using a nullable unique key at all (since multiple NULL can exist)

@lichunzhu
Copy link
Contributor Author

lichunzhu commented Jul 10, 2020

LGTM but IMO it's better to avoid using a nullable unique key at all (since multiple NULL can exist)

Yes. This is used for the extreme situation.

@kennytm kennytm added status/LGT1 One reviewer approved (LGTM1) and removed status/PTAL labels Jul 14, 2020
@kennytm kennytm merged commit 539f93b into pingcap:master Jul 14, 2020
@lichunzhu lichunzhu deleted the fixUniqueKeyNullProblem branch July 14, 2020 08:15
tisonkun pushed a commit to tisonkun/dumpling that referenced this pull request Oct 20, 2021
tisonkun pushed a commit to tisonkun/dumpling that referenced this pull request Oct 20, 2021
tisonkun pushed a commit to tisonkun/dumpling that referenced this pull request Oct 20, 2021
tisonkun pushed a commit to tisonkun/dumpling that referenced this pull request Oct 20, 2021
tisonkun pushed a commit to tisonkun/tidb that referenced this pull request Oct 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/LGT1 One reviewer approved (LGTM1)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants