Skip to content

Commit

Permalink
Merge pull request pingcap#15 from rebelice/dev_timestamp
Browse files Browse the repository at this point in the history
delete microsecond for timestamp
  • Loading branch information
crazycs520 authored Jan 7, 2022
2 parents 5c04525 + cedb6e4 commit 4cd2d20
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion expression/explain.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,12 @@ func (expr *Constant) format4S3(dt types.Datum) string {
case types.KindNull:
return "NULL"
case types.KindString, types.KindBytes, types.KindMysqlEnum, types.KindMysqlSet,
types.KindMysqlJSON, types.KindBinaryLiteral, types.KindMysqlBit, types.KindMysqlTime:
types.KindMysqlJSON, types.KindBinaryLiteral, types.KindMysqlBit:
return fmt.Sprintf("'%v'", dt.GetValue())
case types.KindMysqlTime:
t := dt.Clone().GetMysqlTime()
t.SetFsp(0)
return fmt.Sprintf("'%v'", t)
}
return fmt.Sprintf("%v", dt.GetValue())
}
Expand Down

0 comments on commit 4cd2d20

Please sign in to comment.