fix: fix the compatibility problem of dml operations when has row level triggers
This commit is contained in:
@ -88,6 +88,24 @@ OB_DEF_SERIALIZE_SIZE(ObTableInsertUpSpec)
|
||||
return len;
|
||||
}
|
||||
|
||||
int ObTableInsertUpOp::check_need_exec_single_row()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObInsertUpCtDef *insert_up_ctdef = MY_SPEC.insert_up_ctdefs_.at(0);
|
||||
const ObInsCtDef *ins_ctdef = insert_up_ctdef->ins_ctdef_;
|
||||
const ObUpdCtDef *upd_ctdef = insert_up_ctdef->upd_ctdef_;
|
||||
if (OB_NOT_NULL(ins_ctdef) && OB_NOT_NULL(upd_ctdef)) {
|
||||
if (has_before_row_trigger(*ins_ctdef) || has_after_row_trigger(*ins_ctdef) ||
|
||||
has_before_row_trigger(*upd_ctdef) || has_after_row_trigger(*upd_ctdef)) {
|
||||
execute_single_row_ = true;
|
||||
}
|
||||
} else {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("ins_ctdef or upd_ctdef of primary table is nullptr", K(ret));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObTableInsertUpOp::inner_open()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user