fix: fix the compatibility problem of dml operations when has row level triggers
This commit is contained in:
@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user