Skip to content

Commit

Permalink
fixed date value
Browse files Browse the repository at this point in the history
  • Loading branch information
ou-bing committed Nov 6, 2020
1 parent 18396db commit db7bd3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion executor/insert_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (e *InsertValues) handleErr(col *table.Column, val *types.Datum, rowIdx int
err = types.ErrWarnDataOutOfRange.GenWithStackByArgs(colName, rowIdx+1)
} else if types.ErrTruncated.Equal(err) {
err = types.ErrTruncated.GenWithStackByArgs(colName, rowIdx+1)
} else if types.ErrTruncatedWrongVal.Equal(err) && (colTp == mysql.TypeDuration || colTp == mysql.TypeDatetime) {
} else if types.ErrTruncatedWrongVal.Equal(err) && (colTp == mysql.TypeDuration || colTp == mysql.TypeDatetime || colTp == mysql.TypeDate) {
valStr, err1 := val.ToString()
if err1 != nil {
// do nothing
Expand Down

0 comments on commit db7bd3d

Please sign in to comment.