fix show trace cannot find root span while adaptting upstream

This commit is contained in:
obdev
2023-03-02 15:30:59 +00:00
committed by ob-robot
parent 292fabfee1
commit 6979025cf4
3 changed files with 30 additions and 10 deletions

View File

@ -709,6 +709,9 @@ int ObShowResolver::resolve(const ParseNode &parse_tree)
if (OB_UNLIKELY(parse_tree.num_child_ != 2 || NULL == parse_tree.children_)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("parse tree is wrong", K(ret), K(parse_tree.num_child_), K(parse_tree.children_));
} else if (!session_info_->get_control_info().is_valid()) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "If full link tracing is not enabled, show trace is");
} else {
show_resv_ctx.condition_node_ = parse_tree.children_[0];
show_resv_ctx.stmt_type_ = stmt::T_SHOW_TRACE;