Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
windtalker committed Apr 30, 2020
1 parent 198e313 commit fe118f4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions types/field_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,7 @@ func MergeFieldType(a byte, b byte) byte {
// currently only NotNullFlag is checked
// todo more flag need to be checked, for example: UnsignedFlag
func mergeTypeFlag(a, b uint) uint {
ret := a
ret &= (a & b & mysql.NotNullFlag) | ^mysql.NotNullFlag
return ret
return a & (b&mysql.NotNullFlag | ^mysql.NotNullFlag)
}

func getFieldTypeIndex(tp byte) int {
Expand Down

0 comments on commit fe118f4

Please sign in to comment.