summaryrefslogtreecommitdiff
path: root/sql/sql_window.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2017-11-14 07:47:58 +0200
committerMichael Widenius <monty@mariadb.org>2017-11-17 07:30:05 +0200
commit87933d52619c3f0df84922e23d5a8b03fa050133 (patch)
tree6e495d5f9bf731b055a4d7a582fa092d19c5929f /sql/sql_window.cc
parent31bd86c8df63a4d9e98d67541e136456bd6d9cc2 (diff)
downloadmariadb-git-87933d52619c3f0df84922e23d5a8b03fa050133.tar.gz
Handle failures from malloc
Most "new" failures fixed in the following files: - sql_select.cc - item.cc - item_func.cc - opt_subselect.cc Other things: - Allocate udf_handler strings in mem_root - Required changes in sql_string.h - Add mem_root as argument to some new [] calls - Mark udf_handler strings as thread specific - Removed some comment blocks with code
Diffstat (limited to 'sql/sql_window.cc')
-rw-r--r--sql/sql_window.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_window.cc b/sql/sql_window.cc
index 4bcdca3ca11..bf393ab1c4d 100644
--- a/sql/sql_window.cc
+++ b/sql/sql_window.cc
@@ -3093,10 +3093,14 @@ Window_funcs_computation::save_explain_plan(MEM_ROOT *mem_root,
Explain_aggr_window_funcs *xpl= new Explain_aggr_window_funcs;
List_iterator<Window_funcs_sort> it(win_func_sorts);
Window_funcs_sort *srt;
+ if (!xpl)
+ return 0;
while ((srt = it++))
{
Explain_aggr_filesort *eaf=
new Explain_aggr_filesort(mem_root, is_analyze, srt->filesort);
+ if (!eaf)
+ return 0;
xpl->sorts.push_back(eaf, mem_root);
}
return xpl;