提交 d01e355c 编写于 作者: L lf0 提交者: LINGuanRen

Fix stack overflow of recursive get_name

上级 7c7749fb
......@@ -265,7 +265,12 @@ void ObRawExpr::reset()
int ObRawExpr::get_name(char* buf, const int64_t buf_len, int64_t& pos, ExplainType type) const
{
int ret = OB_SUCCESS;
if (OB_NOT_NULL(orig_expr_) && EXPLAIN_DBLINK_STMT == type) {
bool is_stack_overflow = false;
if (OB_FAIL(check_stack_overflow(is_stack_overflow))) {
LOG_WARN("fail to check stack overflow", K(ret), K(is_stack_overflow));
} else if (is_stack_overflow) {
LOG_DEBUG("too deep recursive", K(ret), K(is_stack_overflow));
} else if (OB_NOT_NULL(orig_expr_) && EXPLAIN_DBLINK_STMT == type) {
if (OB_FAIL(orig_expr_->get_name(buf, buf_len, pos, type))) {
LOG_WARN("fail to get name for orig expr", K(ret));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册