fix reroute check for single sql in trans

This commit is contained in:
dimstars
2023-08-03 09:42:38 +00:00
committed by ob-robot
parent f5622e50de
commit 0b9aa70ad4
3 changed files with 11 additions and 16 deletions

View File

@ -5146,8 +5146,7 @@ int ObSql::check_need_reroute(ObPlanCacheCtx &pc_ctx, ObSQLSessionInfo &session,
if (should_reroute && !session.is_inner() && session.is_in_transaction()) {
auto stmt_type = plan->get_stmt_type();
bool fixed_route = true;
if (pc_ctx.sql_ctx_.multi_stmt_item_.is_part_of_multi_stmt()
&& !pc_ctx.sql_ctx_.multi_stmt_item_.is_single_stmt()) {
if (pc_ctx.sql_ctx_.multi_stmt_item_.is_part_of_multi_stmt()) {
// current is multi-stmt
} else if (!STMT_SUPPORT_BY_TXN_FREE_ROUTE(stmt_type, false)) {
// stmt is not DML