diff options
author | unknown <igor@rurik.mysql.com> | 2005-10-27 21:37:52 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-10-27 21:37:52 -0700 |
commit | cc57d4ef4e49f78f487a6497949871c0a5e3b158 (patch) | |
tree | 77b9cfe2f48b6462eb7de864b5248d396ab8bba6 /sql/sql_base.cc | |
parent | a397d1f7149dcdeac86e9e4870780dcd8e99a908 (diff) | |
parent | cd49e32407dcc88a86a26b4c8720afd9ef99b7dd (diff) | |
download | mariadb-git-cc57d4ef4e49f78f487a6497949871c0a5e3b158.tar.gz |
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 973fbca12f5..45023892400 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4267,11 +4267,13 @@ bool setup_fields(THD *thd, Item **ref_pointer_array, { reg2 Item *item; bool save_set_query_id= thd->set_query_id; + nesting_map save_allow_sum_func= thd->lex->allow_sum_func; List_iterator<Item> it(fields); DBUG_ENTER("setup_fields"); thd->set_query_id=set_query_id; - thd->allow_sum_func= allow_sum_func; + if (allow_sum_func) + thd->lex->allow_sum_func|= 1 << thd->lex->current_select->nest_level; thd->where= THD::DEFAULT_WHERE; /* @@ -4294,6 +4296,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array, if (!item->fixed && item->fix_fields(thd, it.ref()) || (item= *(it.ref()))->check_cols(1)) { + thd->lex->allow_sum_func= save_allow_sum_func; thd->set_query_id= save_set_query_id; DBUG_RETURN(TRUE); /* purecov: inspected */ } @@ -4304,6 +4307,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array, item->split_sum_func(thd, ref_pointer_array, *sum_func_list); thd->used_tables|= item->used_tables(); } + thd->lex->allow_sum_func= save_allow_sum_func; thd->set_query_id= save_set_query_id; DBUG_RETURN(test(thd->net.report_error)); } |