summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2013-03-19 15:08:19 +0100
committerTor Didriksen <tor.didriksen@oracle.com>2013-03-19 15:08:19 +0100
commit3d10d7d12414efa077d0721bc8a6166d420b8110 (patch)
treee5c90dd1296d8f3cf1981e1de364270f5a464e44 /sql/sql_lex.cc
parent8afe262ae5ab3ba2bc8f440c67341ce2ad8ad544 (diff)
downloadmariadb-git-3d10d7d12414efa077d0721bc8a6166d420b8110.tar.gz
Bug#16359402 CRASH WITH AGGREGATES: ASSERTION FAILED: N < M_SIZE
Post push fix: setup_ref_array() now uses n_sum_items to determine size of ref_pointer_array. The problem was that n_sum_items kept growing, it wasn't reset for each query. A similar memory leak was fixed with the patch for: Bug 14683676 ENDLESS MEMORY CONSUMPTION IN SETUP_REF_ARRAY WITH MAX IN SUBQUERY sql/sql_yacc.yy: Reset parsing_place when we're done parsing SHOW commands, to prevent Item::Item incrementing select_n_having_items (which is also used in setup_ref_array())
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index ac5ec1ba1e4..b013a4219f2 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1761,6 +1761,7 @@ void st_select_lex::init_query()
ref_pointer_array_size= 0;
select_n_where_fields= 0;
select_n_having_items= 0;
+ n_sum_items= 0;
n_child_sum_items= 0;
subquery_in_having= explicit_limit= 0;
is_item_list_lookup= 0;