Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#41786
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
SeaRise authored and ti-chi-bot committed Mar 2, 2023
1 parent 36a9810 commit 27323a5
Show file tree
Hide file tree
Showing 2 changed files with 720 additions and 1 deletion.
6 changes: 5 additions & 1 deletion expression/builtin_time.go
Original file line number Diff line number Diff line change
Expand Up @@ -3049,7 +3049,11 @@ func (du *baseDateArithmetical) vecGetDateFromString(b *baseBuiltinFunc, input *
}
result.SetNull(i, true)
} else if b.ctx.GetSessionVars().SQLMode.HasNoZeroDateMode() && (date.Year() == 0 || date.Month() == 0 || date.Day() == 0) {
return handleInvalidTimeError(b.ctx, types.ErrWrongValue.GenWithStackByArgs(types.DateTimeStr, dateStr))
err = handleInvalidTimeError(b.ctx, types.ErrWrongValue.GenWithStackByArgs(types.DateTimeStr, dateStr))
if err != nil {
return err
}
result.SetNull(i, true)
} else {
dates[i] = date
}
Expand Down

0 comments on commit 27323a5

Please sign in to comment.