-
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
Changes from 1 commit
50a49b2
96c9f8a
f5b9713
9ac506b
29e9f7f
9708292
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,7 +96,7 @@ 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. | ||
// For mysql.TypeBit type, the default value is null is supported. | ||
// The mysql.TypeBit type supports the null default value. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. @winoros This is a special case, it is better to separate comments. |
||
if value == nil { | ||
return nil | ||
} | ||
|
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.