Skip to content

Handle bit types properly so that UPDATE and DELETE work as expected during replication#4167

Merged
sougou merged 8 commits intovitessio:masterfrom
planetscale:ds-filtered-replication-bit-type
Sep 5, 2018
Merged

Handle bit types properly so that UPDATE and DELETE work as expected during replication#4167
sougou merged 8 commits intovitessio:masterfrom
planetscale:ds-filtered-replication-bit-type

Conversation

@deepthi
Copy link
Copy Markdown
Collaborator

@deepthi deepthi commented Aug 29, 2018

This is for #4145.
Changed how bit literals are handled in vitess so that BIT fields are matched correctly for UPDATE / DELETE.
Instead of converting them to '\x0...' format, we will convert them to b'...' format.

… literals

Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
…n't fail tests on string field table

Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
@deepthi deepthi changed the title #4145 Handle bit types properly so that UPDATE and DELETE work as expected during replication Handle bit types properly so that UPDATE and DELETE work as expected during replication Aug 29, 2018
Copy link
Copy Markdown
Contributor

@sougou sougou left a comment

Choose a reason for hiding this comment

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

Very nice work, especially for a first PR. This was a tough one :).

I reviewed the code by looking at all use cases of IsQuoted:

  • In type.go, there is a comment that says: the following conditions are non-overlapping.... Bit should be added to this list. This is also what triggered my review of all places where IsQuoted is used.
  • Although not critical, String and MarshalJSON could be improved.
  • I checked the Cast function in arithmetic.go. No change was needed there. So, we're good.

In other words, there are a few minor things to fix, and this PR can be merged.

Signed-off-by: deepthi <deepthi@planetscale.com>
Copy link
Copy Markdown
Contributor

@sougou sougou left a comment

Choose a reason for hiding this comment

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

👍

@sougou sougou merged commit 6f8bf2b into vitessio:master Sep 5, 2018
@tirsen
Copy link
Copy Markdown
Collaborator

tirsen commented Sep 6, 2018

YAY!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants