summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2012-10-01 13:12:38 +0200
committerTor Didriksen <tor.didriksen@oracle.com>2012-10-01 13:12:38 +0200
commit4d29767e6c57198eb4650421f730701b4dd4d2d7 (patch)
tree11f1b961f04ac1c8dd7d85ea69c7a7b7b626695a /sql/sql_lex.cc
parenteff72188b1fe5e4840d0b959d9429ebfa7c8f5e6 (diff)
downloadmariadb-git-4d29767e6c57198eb4650421f730701b4dd4d2d7.tar.gz
Bug#14683676 ENDLESS MEMORY CONSUMPTION IN SETUP_REF_ARRAY WITH MAX IN SUBQUERY
n_child_sum_items kept increasing. Since it is used for calculating the size of ref_pointer_array, we will allocate larger and larger chunks of memory, until we hit some operating system limit. The memory is free()d at disconnect, but is most likely *not* returned to the operating system.
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 fd9367b99f2..e171cf1c06d 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1616,6 +1616,7 @@ void st_select_lex::init_query()
ref_pointer_array= 0;
select_n_where_fields= 0;
select_n_having_items= 0;
+ n_child_sum_items= 0;
subquery_in_having= explicit_limit= 0;
is_item_list_lookup= 0;
first_execution= 1;