Skip to content

Commit

Permalink
增加内存分配失败的异常处理
Browse files Browse the repository at this point in the history
  • Loading branch information
yibantianxia committed Sep 23, 2021
1 parent 1b61c95 commit ef25dca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sql/pq_clone_item.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ PQ_CLONE_RETURN

PQ_CLONE_DEF(Item_cache_int) {
new_item = new (thd->pq_mem_root) Item_cache_int();
if (new_item == nullptr) {
return nullptr;
}
if (origin_item) {
new_item->example = origin_item->pq_clone(thd, select);
if (new_item->example == nullptr) {
Expand Down

0 comments on commit ef25dca

Please sign in to comment.