summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2006-09-01 13:23:43 +0400
committerunknown <sergefp@mysql.com>2006-09-01 13:23:43 +0400
commitdd6dc7adea58d3a325c9a00d92c3ebfe038aa3ae (patch)
tree810129f480963d677f8bdab92d41e2fcd2dd0bd6 /sql/sql_yacc.yy
parentf40b6c273cb782bd3fd4563518eb5d57c010f13d (diff)
downloadmariadb-git-dd6dc7adea58d3a325c9a00d92c3ebfe038aa3ae.tar.gz
BUG#21477 "memory overruns for certain kinds of subqueries":
make st_select_lex::setup_ref_array() take into account that Item_sum-descendant objects located within descendant SELECTs may be added into ref_pointer_array. sql/item_sum.cc: BUG#21477 "memory overruns for certain kinds of subqueries": Make SELECT_LEX::n_sum_items contain # of Item_sum-derived objects that exist within this SELECT. sql/sql_lex.h: BUG#21477 "memory overruns for certain kinds of subqueries": Add SELECT_LEX::n_sum_items and SELECT_LEXT::n_child_sum_items. sql/sql_yacc.yy: BUG#21477 "memory overruns for certain kinds of subqueries": Make SELECT_LEX::n_sum_items contain # of Item_sum-derived objects that exist within this SELECT.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index d2aca27c836..43204a33d70 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -8927,8 +8927,10 @@ subselect_end:
{
LEX *lex=Lex;
lex->pop_context();
+ SELECT_LEX *child= lex->current_select;
lex->current_select = lex->current_select->return_after_parsing();
lex->nest_level--;
+ lex->current_select->n_child_sum_items += child->n_sum_items;
};
/**************************************************************************