[to #51362102] fix affected rows in PL

This commit is contained in:
0xacc
2023-08-09 09:18:41 +00:00
committed by ob-robot
parent 3b3ec369be
commit f5d4e78343
2 changed files with 6 additions and 1 deletions

View File

@ -557,7 +557,10 @@ OB_INLINE void ObResultSet::store_affected_rows(ObPhysicalPlanCtx &plan_ctx)
&& (lib::is_oracle_mode() || !is_pl_stmt(get_stmt_type()))) {
affected_row = 0;
} else if (stmt::T_SELECT == get_stmt_type()) {
affected_row = lib::is_oracle_mode() ? plan_ctx.get_affected_rows() : -1;
affected_row = plan_ctx.get_affected_rows();
if (lib::is_mysql_mode() && 0 == affected_row) {
affected_row = -1;
}
} else {
affected_row = get_affected_rows();
}