diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-11-17 16:24:46 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-11-17 16:24:46 +0100 |
commit | e6d02a127e9ba439bc6afba885678b51a523210c (patch) | |
tree | 27a931a0f906af3a48a72b7e95e79e1bf3b7329a /sql/sql_partition.cc | |
parent | c4584fc6d40a6a673e7a46750b575effddef6207 (diff) | |
parent | b35feb1ed0aa934ea244163ecea54b5e45157138 (diff) | |
download | mariadb-git-e6d02a127e9ba439bc6afba885678b51a523210c.tar.gz |
merge
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r-- | sql/sql_partition.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 04d22174c8e..ca707cf7dfe 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -905,6 +905,8 @@ bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table, char* db_name; char db_name_string[FN_REFLEN]; bool save_use_only_table_context; + uint8 saved_full_group_by_flag; + nesting_map saved_allow_sum_func; DBUG_ENTER("fix_fields_part_func"); if (part_info->fixed) @@ -974,9 +976,19 @@ bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table, save_use_only_table_context= thd->lex->use_only_table_context; thd->lex->use_only_table_context= TRUE; thd->lex->current_select->cur_pos_in_select_list= UNDEF_POS; + saved_full_group_by_flag= thd->lex->current_select->full_group_by_flag; + saved_allow_sum_func= thd->lex->allow_sum_func; + thd->lex->allow_sum_func= 0; error= func_expr->fix_fields(thd, (Item**)&func_expr); + /* + Restore full_group_by_flag and allow_sum_func, + fix_fields should not affect mysql_select later, see Bug#46923. + */ + thd->lex->current_select->full_group_by_flag= saved_full_group_by_flag; + thd->lex->allow_sum_func= saved_allow_sum_func; + thd->lex->use_only_table_context= save_use_only_table_context; context->table_list= save_table_list; |