summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2007-02-24 23:04:15 +0300
committerunknown <evgen@moonbone.local>2007-02-24 23:04:15 +0300
commitb1e1f77f1ffcbd1f3f9d07d8da598061ea2cb75c (patch)
tree93f5cf3f07b92e41d92bd82d3ed9a39abb068a5d /sql/sql_yacc.yy
parenta1234294c6344e648a60c7b0489985f5c16cd8a6 (diff)
downloadmariadb-git-b1e1f77f1ffcbd1f3f9d07d8da598061ea2cb75c.tar.gz
item.cc:
Post fix for bug#23800. The Item_field constructor now increases the select_n_where_fields counter. sql_yacc.yy: Post fix for bug#23800. Take into account fields that might be added by subselects. sql_lex.h: Post fix for bug#23800. Added the select_n_where_fields variable to the st_select_lex class. sql_lex.cc: Post fix for bug#23800. Initialization of the select_n_where_fields variable. sql/sql_lex.cc: Post fix for bug#23800. Initialization of the select_n_where_fields variable. sql/sql_lex.h: Post fix for bug#23800. Added the select_n_where_fields variable to the st_select_lex class. sql/item.cc: Post fix for bug#23800. The Item_field constructor now increases the select_n_where_fields counter. sql/sql_yacc.yy: Post fix for bug#23800. Take into account fields that might be added by subselects.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index d5b3aadbf39..2e9cc662ba8 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -9275,6 +9275,12 @@ subselect_end:
lex->current_select = lex->current_select->return_after_parsing();
lex->nest_level--;
lex->current_select->n_child_sum_items += child->n_sum_items;
+ /*
+ A subselect can add fields to an outer select. Reserve space for
+ them.
+ */
+ lex->current_select->select_n_where_fields+=
+ child->select_n_where_fields;
};
/**************************************************************************