fix: fix the compatibility problem of dml operations when has row level triggers

This commit is contained in:
obdev
2023-03-15 12:13:41 +00:00
committed by ob-robot
parent 5d0186e152
commit 9e1730c42d
12 changed files with 99 additions and 0 deletions

View File

@ -94,6 +94,23 @@ OB_DEF_SERIALIZE_SIZE(ObTableReplaceSpec)
return len;
}
int ObTableReplaceOp::check_need_exec_single_row()
{
int ret = OB_SUCCESS;
ObReplaceCtDef *replace_ctdef = MY_SPEC.replace_ctdefs_.at(0);
const ObInsCtDef *ins_ctdef = replace_ctdef->ins_ctdef_;
const ObDelCtDef *del_ctdef = replace_ctdef->del_ctdef_;
if (OB_NOT_NULL(ins_ctdef) || OB_NOT_NULL(del_ctdef)) {
if (has_before_row_trigger(*ins_ctdef) || has_after_row_trigger(*ins_ctdef)
|| has_before_row_trigger(*del_ctdef) || has_after_row_trigger(*del_ctdef)) {
execute_single_row_ = true;
}
} else {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("ins_ctdef or del_ctdef of primary table is nullptr", K(ret));
}
return ret;
}
int ObTableReplaceOp::inner_open()
{