to issue<53790417>:fix bug about using cursor-for-loop index name as package routine argument
This commit is contained in:
@ -3047,10 +3047,12 @@ int ObPLBlockNS::resolve_routine(const ObPLResolveCtx &resolve_ctx,
|
|||||||
}
|
}
|
||||||
if (OB_SUCC(ret) && routine_infos.empty()) {
|
if (OB_SUCC(ret) && routine_infos.empty()) {
|
||||||
if (OB_NOT_NULL(external_ns_)) {
|
if (OB_NOT_NULL(external_ns_)) {
|
||||||
bool need_clear = false;
|
bool need_restore = false;
|
||||||
if (OB_ISNULL(external_ns_->get_resolve_ctx().params_.secondary_namespace_)
|
pl::ObPLBlockNS *second_ns = nullptr;
|
||||||
&& OB_NOT_NULL(resolve_ctx.params_.secondary_namespace_)) {
|
if (OB_NOT_NULL(resolve_ctx.params_.secondary_namespace_) &&
|
||||||
need_clear = true;
|
external_ns_->get_resolve_ctx().params_.secondary_namespace_ != resolve_ctx.params_.secondary_namespace_) {
|
||||||
|
need_restore = true;
|
||||||
|
second_ns = external_ns_->get_resolve_ctx().params_.secondary_namespace_;
|
||||||
(const_cast<ObPLResolveCtx &>(external_ns_->get_resolve_ctx())).params_.secondary_namespace_
|
(const_cast<ObPLResolveCtx &>(external_ns_->get_resolve_ctx())).params_.secondary_namespace_
|
||||||
= resolve_ctx.params_.secondary_namespace_;
|
= resolve_ctx.params_.secondary_namespace_;
|
||||||
}
|
}
|
||||||
@ -3064,8 +3066,8 @@ int ObPLBlockNS::resolve_routine(const ObPLResolveCtx &resolve_ctx,
|
|||||||
LOG_WARN("resolve routine failed", K(db_name), K(package_name), K(routine_name),
|
LOG_WARN("resolve routine failed", K(db_name), K(package_name), K(routine_name),
|
||||||
K(expr_params), K(ret));
|
K(expr_params), K(ret));
|
||||||
}
|
}
|
||||||
if (need_clear) {
|
if (need_restore) {
|
||||||
(const_cast<ObPLResolveCtx &>(external_ns_->get_resolve_ctx())).params_.secondary_namespace_ = NULL;
|
(const_cast<ObPLResolveCtx &>(external_ns_->get_resolve_ctx())).params_.secondary_namespace_ = second_ns;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user