Skip to content

Commit

Permalink
replace -1 with types.UnspecifiedLength
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Jul 1, 2024
1 parent 485a33d commit 60a8194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/parser/types/field_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func (ft *FieldType) CompactStr() string {
case mysql.TypeNewDecimal:
suffix = fmt.Sprintf("(%d,%d)", displayFlen, displayDecimal)
case mysql.TypeVarString:
if displayFlen != -1 {
if displayFlen != UnspecifiedLength {
suffix = fmt.Sprintf("(%d)", displayFlen)
}
case mysql.TypeBit, mysql.TypeVarchar, mysql.TypeString:
Expand Down

0 comments on commit 60a8194

Please sign in to comment.