提交 82aa6bab 编写于 作者: L LiuYoung00 提交者: ob-robot

[to #47301287]get external cursor by name

上级 0c9d5353
......@@ -3067,14 +3067,14 @@ int ObPLBlockNS::get_cursor_by_name(const ObExprResolveContext &ctx,
CK (OB_NOT_NULL(get_symbol_table()));
for (int64_t i = 0; OB_SUCC(ret) && i < get_cursor_table()->get_count() && !found; i++) {
const ObPLCursor *cur = get_cursor_table()->get_cursor(i);
CK (OB_NOT_NULL(cur));
CK (OB_NOT_NULL(get_symbol_table()->get_symbol(cur->get_index())));
if (OB_SUCC(ret) && 0 == get_symbol_table()->get_symbol(cur->get_index())
->get_name().case_compare(cursor_name)) {
if (OB_NOT_NULL(cur)) {
const ObPLVar *var = get_symbol_table()->get_symbol(cur->get_index());
if (OB_NOT_NULL(var) && 0 == var->get_name().case_compare(cursor_name)) {
cursor = cur;
found = true;
}
}
}
if (OB_SUCC(ret) && !found && NULL != pre_ns_) {
OZ (pre_ns_->get_cursor_by_name(ctx, database_name, package_name, cursor_name, cursor));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册