Skip to content

Commit

Permalink
executor: set OverflowAsWarning for insert statement in non-strict sq…
Browse files Browse the repository at this point in the history
…l mode (#49383) (#49458)

close #49369
  • Loading branch information
ti-chi-bot committed Dec 22, 2023
1 parent 7bcef4f commit 1cc4f87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2086,6 +2086,8 @@ func ResetContextOfStmt(ctx sessionctx.Context, s ast.StmtNode) (err error) {
// but should not make DupKeyAsWarning.
sc.DupKeyAsWarning = stmt.IgnoreErr
sc.BadNullAsWarning = !vars.StrictSQLMode || stmt.IgnoreErr
// see https://dev.mysql.com/doc/refman/8.0/en/out-of-range-and-overflow.html
sc.OverflowAsWarning = !vars.StrictSQLMode || stmt.IgnoreErr
sc.IgnoreNoPartition = stmt.IgnoreErr
sc.ErrAutoincReadFailedAsWarning = stmt.IgnoreErr
sc.TruncateAsWarning = !vars.StrictSQLMode || stmt.IgnoreErr
Expand Down

0 comments on commit 1cc4f87

Please sign in to comment.