diff --git a/src/sql/engine/dml/ob_dml_service.cpp b/src/sql/engine/dml/ob_dml_service.cpp index 9e27471b71..631c09a10f 100644 --- a/src/sql/engine/dml/ob_dml_service.cpp +++ b/src/sql/engine/dml/ob_dml_service.cpp @@ -1026,6 +1026,13 @@ int ObDMLService::lock_row(const ObDASLockCtDef &dlock_ctdef, stored_row); } +/* + * Note: During the update process, + * ObDMLService::check_row_whether_changed() and ObDMLService::update_row() must be executed together + * within a single iteration, + * because the update_row process relies on check_row_whether_changed to determine + * whether the new and old values of the row being updated have changed. + **/ int ObDMLService::update_row(const ObUpdCtDef &upd_ctdef, ObUpdRtDef &upd_rtdef, const ObDASTabletLoc *old_tablet_loc, diff --git a/src/sql/engine/pdml/static/ob_px_multi_part_update_op.cpp b/src/sql/engine/pdml/static/ob_px_multi_part_update_op.cpp index eee919ab46..07fdffb76e 100644 --- a/src/sql/engine/pdml/static/ob_px_multi_part_update_op.cpp +++ b/src/sql/engine/pdml/static/ob_px_multi_part_update_op.cpp @@ -100,7 +100,16 @@ int ObPxMultiPartUpdateOp::update_row_to_das(const ObDASTabletLoc *tablet_loc) { int ret = OB_SUCCESS; ObChunkDatumStore::StoredRow* stored_row = nullptr; - if (OB_FAIL(ObDMLService::update_row(MY_SPEC.upd_ctdef_, upd_rtdef_, tablet_loc, tablet_loc, dml_rtctx_, stored_row, stored_row, stored_row))) { + if (OB_FAIL(ObDMLService::check_row_whether_changed(MY_SPEC.upd_ctdef_, upd_rtdef_, eval_ctx_))) { + LOG_WARN("check row whether changed failed", K(ret)); + } else if (OB_FAIL(ObDMLService::update_row(MY_SPEC.upd_ctdef_, + upd_rtdef_, + tablet_loc, + tablet_loc, + dml_rtctx_, + stored_row, + stored_row, + stored_row))) { LOG_WARN("insert row with das failed", K(ret)); } return ret;