Skip to content

Commit

Permalink
types/data: the bit operation didn't parse correctly (pingcap#11895)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoxingliang authored and root committed Sep 26, 2019
1 parent a68a052 commit cbf2e25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions types/datum.go
Original file line number Diff line number Diff line change
Expand Up @@ -1218,8 +1218,7 @@ func (d *Datum) convertToMysqlBit(sc *stmtctx.StatementContext, target *FieldTyp
case KindInt64:
// if input kind is int64 (signed), when trans to bit, we need to treat it as unsigned
d.k = KindUint64
uintDatum, err1 := d.convertToUint(sc, target)
uintValue, err = uintDatum.GetUint64(), err1
fallthrough
default:
uintDatum, err1 := d.convertToUint(sc, target)
uintValue, err = uintDatum.GetUint64(), err1
Expand Down

0 comments on commit cbf2e25

Please sign in to comment.