[to #47901724] fix package free ref cursor core

This commit is contained in:
obdev
2023-02-24 12:33:46 +00:00
committed by ob-robot
parent 1b9cc5948a
commit a366348a12

View File

@ -573,10 +573,14 @@ int ObPLDataType::free_session_var(const ObPLResolveCtx &resolve_ctx, ObIAllocat
obj.set_null(); obj.set_null();
} }
} else if (is_cursor_type()) { } else if (is_cursor_type()) {
ObPLCursorInfo *cursor = reinterpret_cast<ObPLCursorInfo *>(obj.get_ext()); if (is_cursor_var()) {
if (OB_NOT_NULL(cursor)) { ObPLCursorInfo *cursor = reinterpret_cast<ObPLCursorInfo *>(obj.get_ext());
cursor->~ObPLCursorInfo(); if (OB_NOT_NULL(cursor)) {
cursor = NULL; cursor->~ObPLCursorInfo();
cursor = NULL;
}
} else {
// do nothing .. package ref cursor only use for cursor parameters, it will close by geneteror.
} }
} else { } else {
ObPL *pl_engine = NULL; ObPL *pl_engine = NULL;