diff options
author | igor@rurik.mysql.com <> | 2005-10-17 13:35:51 -0700 |
---|---|---|
committer | igor@rurik.mysql.com <> | 2005-10-17 13:35:51 -0700 |
commit | f4fd1c882e5990042e024f4489e9cd1a2d7eeb39 (patch) | |
tree | 699479e75cace8563f10bd5674f4e0b0d569104c /sql/item_subselect.cc | |
parent | cb034d23cbf799149a61742304e07be7d218341e (diff) | |
parent | 0be47473be6e3ba415af15be4cccc175e9669dfe (diff) | |
download | mariadb-git-f4fd1c882e5990042e024f4489e9cd1a2d7eeb39.tar.gz |
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 8afc885e59b..b78b7d64430 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -803,6 +803,7 @@ Item_in_subselect::single_value_transformer(JOIN *join, !(select_lex->next_select())) { Item_sum_hybrid *item; + nesting_map save_allow_sum_func; if (func->l_op()) { /* @@ -828,6 +829,8 @@ Item_in_subselect::single_value_transformer(JOIN *join, it.replace(item); } + save_allow_sum_func= thd->lex->allow_sum_func; + thd->lex->allow_sum_func|= 1 << thd->lex->current_select->nest_level; /* Item_sum_(max|min) can't substitute other item => we can use 0 as reference, also Item_sum_(max|min) can't be fixed after creation, so @@ -835,6 +838,7 @@ Item_in_subselect::single_value_transformer(JOIN *join, */ if (item->fix_fields(thd, 0)) DBUG_RETURN(RES_ERROR); + thd->lex->allow_sum_func= save_allow_sum_func; /* we added aggregate function => we have to change statistic */ count_field_types(&join->tmp_table_param, join->all_fields, 0); |