[CP] to issue<57878473>:fix memory leak about signal stmt in mysql mode
This commit is contained in:
parent
11eb878dd8
commit
aff2232ed0
@ -707,6 +707,10 @@ int ObPLResolver::resolve(const ObStmtNodeTree *parse_tree, ObPLFunctionAST &fun
|
|||||||
&& lib::is_mysql_mode()) {
|
&& lib::is_mysql_mode()) {
|
||||||
ObPLSignalStmt *signal_stmt = NULL;
|
ObPLSignalStmt *signal_stmt = NULL;
|
||||||
int save_ret = ret;
|
int save_ret = ret;
|
||||||
|
if (NULL != stmt) {
|
||||||
|
stmt->~ObPLStmt();
|
||||||
|
stmt = NULL;
|
||||||
|
}
|
||||||
if (OB_FAIL(stmt_factory_.allocate(PL_SIGNAL, current_block_, stmt))) {
|
if (OB_FAIL(stmt_factory_.allocate(PL_SIGNAL, current_block_, stmt))) {
|
||||||
LOG_WARN("failed to alloc stmt", K(ret));
|
LOG_WARN("failed to alloc stmt", K(ret));
|
||||||
} else if (OB_ISNULL(signal_stmt = static_cast<ObPLSignalStmt*>(stmt))) {
|
} else if (OB_ISNULL(signal_stmt = static_cast<ObPLSignalStmt*>(stmt))) {
|
||||||
|
@ -2962,7 +2962,7 @@ public:
|
|||||||
inline void set_is_signal_null() { is_signal_null_ = true; }
|
inline void set_is_signal_null() { is_signal_null_ = true; }
|
||||||
inline bool is_signal_null() const { return is_signal_null_; }
|
inline bool is_signal_null() const { return is_signal_null_; }
|
||||||
inline int create_item_to_expr_idx(int64_t capacity) {
|
inline int create_item_to_expr_idx(int64_t capacity) {
|
||||||
return item_to_expr_idx_.create(capacity, ObModIds::OB_PL_TEMP);
|
return item_to_expr_idx_.create(capacity, "PlStmtHashMap", ObModIds::OB_HASH_NODE, MTL_ID());
|
||||||
}
|
}
|
||||||
inline const int64_t *get_expr_idx(const int64_t item) const { return item_to_expr_idx_.get(item); }
|
inline const int64_t *get_expr_idx(const int64_t item) const { return item_to_expr_idx_.get(item); }
|
||||||
inline const hash::ObHashMap<int64_t, int64_t>& get_item_to_expr_idx() const
|
inline const hash::ObHashMap<int64_t, int64_t>& get_item_to_expr_idx() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user