diff --git a/executor/insert_common.go b/executor/insert_common.go index b43655279ca60..57112bcf5d5c3 100644 --- a/executor/insert_common.go +++ b/executor/insert_common.go @@ -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