diff options
Diffstat (limited to 'sql/sql_window.cc')
-rw-r--r-- | sql/sql_window.cc | 4 |
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; |