-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
ddl:fix type bit could have null as its default value #7604
Conversation
@jackysp @zimulala @winkyao @crazycs520 PTAL . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -96,6 +96,9 @@ func (c *ColumnInfo) SetDefaultValue(value interface{}) error { | |||
if c.Tp == mysql.TypeBit { | |||
// For mysql.TypeBit type, the default value storage format must be a string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to update the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@jackysp PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
38f3483
to
f5b9713
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -96,6 +96,10 @@ func (c *ColumnInfo) SetDefaultValue(value interface{}) error { | |||
if c.Tp == mysql.TypeBit { | |||
// For mysql.TypeBit type, the default value storage format must be a string. | |||
// Other value such as int must convert to string format first. | |||
// The mysql.TypeBit type supports the null default value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is conflicted with the first sentence of this comment block. Maybe we can merge this two sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@winoros This is a special case, it is better to separate comments.
What problem does this PR solve?
What is changed and how it works?
bit-default-value
branchmysql
Check List
Tests