Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#50134
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
lcwangchao authored and ti-chi-bot committed Jan 8, 2024
1 parent 29df3c8 commit 3f406fa
Show file tree
Hide file tree
Showing 4 changed files with 2,360 additions and 2 deletions.
6 changes: 4 additions & 2 deletions executor/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,17 @@ func updateRecord(
memBuffer.Release(sh)
return true, nil
}(); err != nil {
if terr, ok := errors.Cause(err).(*terror.Error); sctx.GetSessionVars().StmtCtx.IgnoreNoPartition && ok && terr.Code() == errno.ErrNoPartitionForGivenValue {
if terr, ok := errors.Cause(err).(*terror.Error); sctx.GetSessionVars().StmtCtx.IgnoreNoPartition && ok && (terr.Code() == errno.ErrNoPartitionForGivenValue || terr.Code() == errno.ErrRowDoesNotMatchGivenPartitionSet) {
sctx.GetSessionVars().StmtCtx.AppendWarning(err)
return false, nil
}
return updated, err
}
} else {
// Update record to new value and update index.
if err := t.UpdateRecord(ctx, sctx, h, oldData, newData, modified); err != nil {
if terr, ok := errors.Cause(err).(*terror.Error); sctx.GetSessionVars().StmtCtx.IgnoreNoPartition && ok && terr.Code() == errno.ErrNoPartitionForGivenValue {
if terr, ok := errors.Cause(err).(*terror.Error); sctx.GetSessionVars().StmtCtx.IgnoreNoPartition && ok && (terr.Code() == errno.ErrNoPartitionForGivenValue || terr.Code() == errno.ErrRowDoesNotMatchGivenPartitionSet) {
sctx.GetSessionVars().StmtCtx.AppendWarning(err)
return false, nil
}
return false, err
Expand Down

0 comments on commit 3f406fa

Please sign in to comment.