fix dblink transaction bug

This commit is contained in:
cqliang1995
2024-03-15 17:15:43 +00:00
committed by ob-robot
parent 4de78f3ba5
commit 43c435fe20
50 changed files with 1287 additions and 453 deletions

View File

@ -675,11 +675,11 @@ int ObQueryHint::print_stmt_hint(PlanText &plan_text, const ObDMLStmt &stmt,
if (OB_FAIL(print_outline_data(plan_text))) {
LOG_WARN("failed to print outline data", K(ret));
}
} else if (!has_outline_data() || OB_INVALID_ID != stmt.get_dblink_id()) {
} else if (!has_outline_data()) {
// Not outline data, print current stmt hint here.
// If stmt is the first stmt can add hint, print global hint and hint with qb name.
// For query "select_1 union all select_2", root stmt is "union all" and the first stmt to print hint is select_1
if ((is_first_stmt_for_hint || OB_INVALID_ID != stmt.get_dblink_id()) &&
if (is_first_stmt_for_hint &&
OB_FAIL(get_global_hint().print_global_hint(plan_text))) {
LOG_WARN("failed to print global hint", K(ret));
} else if (OB_FAIL(stmt.get_stmt_hint().print_stmt_hint(plan_text))) {