fix print global hint bug for set stmt

This commit is contained in:
chimyue
2023-05-12 04:11:25 +00:00
committed by ob-robot
parent 3674a6668d
commit 40e9a1b569
8 changed files with 19 additions and 8 deletions

View File

@ -34,6 +34,7 @@ ObDMLStmtPrinter::ObDMLStmtPrinter(char *buf, int64_t buf_len, int64_t *pos, con
pos_(pos),
stmt_(stmt),
is_root_(false),
is_first_stmt_for_hint_(false),
print_cte_(false),
schema_guard_(schema_guard),
print_params_(print_params),
@ -75,7 +76,7 @@ int ObDMLStmtPrinter::print_hint()
plan_text.type_ = print_params_.for_dblink_
? EXPLAIN_DBLINK_STMT
: EXPLAIN_UNINITIALIZED; // just for print hint, ExplainType set as invalid type
if (OB_FAIL(query_hint.print_stmt_hint(plan_text, *stmt_, is_root_))) {
if (OB_FAIL(query_hint.print_stmt_hint(plan_text, *stmt_, is_first_stmt_for_hint_))) {
LOG_WARN("failed to print stmt hint", K(ret));
} else if (plan_text.pos_ == *pos_) {
// no hint, roolback buffer!