Skip to content
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

column: fix zero value for binary type #6213

Merged
merged 2 commits into from
Apr 3, 2018

Conversation

coocood
Copy link
Member

@coocood coocood commented Apr 3, 2018

Zero value for BINARY type should be byte slice with length.

Zero value for BINARY type should be byte slice with length.
@coocood coocood added the type/bugfix This PR fixes a bug. label Apr 3, 2018
@coocood
Copy link
Member Author

coocood commented Apr 3, 2018

/run-all-tests

@coocood
Copy link
Member Author

coocood commented Apr 3, 2018

@tiancaiamao @zimulala @zz-jason PTAL

@zimulala
Copy link
Contributor

zimulala commented Apr 3, 2018

LGTM

@zimulala zimulala added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 3, 2018
} else {
d.SetString("")
}
case mysql.TypeVarString, mysql.TypeVarchar:
Copy link
Member

Choose a reason for hiding this comment

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

should we consider TypeVarString ?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, VarString is not fixed length type, does not padding to the length.

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 3, 2018
@coocood coocood merged commit 42f9dda into pingcap:master Apr 3, 2018
@coocood coocood deleted the binary-zero-value branch April 3, 2018 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants