[CP] [to #54116671] fix serval pl bugs

This commit is contained in:
obdev
2024-01-03 16:12:58 +00:00
committed by ob-robot
parent 5c4d416a56
commit fe6691dbdd
4 changed files with 12 additions and 5 deletions

View File

@ -1571,7 +1571,8 @@ int ObSql::handle_pl_execute(const ObString &sql,
#endif
if (OB_SUCC(ret) && session.get_in_transaction()) {
if (ObStmt::is_dml_write_stmt(result.get_stmt_type()) ||
ObStmt::is_savepoint_stmt(result.get_stmt_type())) {
ObStmt::is_savepoint_stmt(result.get_stmt_type()) ||
(ObStmt::is_select_stmt(result.get_stmt_type()) && OB_NOT_NULL(result.get_physical_plan()) && result.get_physical_plan()->has_for_update())) {
session.set_has_exec_inner_dml(true);
}
}