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

[to #47301287]get external cursor by name

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