diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-04-25 17:22:25 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-04-25 17:22:25 +0200 |
commit | 9182079c5ff5081f6889a765e16a102610a77863 (patch) | |
tree | bdf0738c29dc1f57fbfba3a1754524e238f15b52 /sql/item_sum.cc | |
parent | 03182956403680ffaf5b94d8230ec21de359d397 (diff) | |
download | mariadb-git-9182079c5ff5081f6889a765e16a102610a77863.tar.gz |
lots of post-merge changes
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index a9c77e2fea5..4a7f2a54659 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -539,6 +539,11 @@ void Item_sum::update_used_tables () args[i]->update_used_tables(); used_tables_cache|= args[i]->used_tables(); } + + used_tables_cache&= PSEUDO_TABLE_BITS; + + /* the aggregate function is aggregated into its local context */ + used_tables_cache |= (1 << aggr_sel->join->tables) - 1; } } @@ -762,7 +767,7 @@ bool Aggregator_distinct::setup(THD *thd) if (!(table= create_tmp_table(thd, tmp_table_param, list, (ORDER*) 0, 1, 0, (select_lex->options | thd->variables.option_bits), - HA_POS_ERROR, ""))) + HA_POS_ERROR, const_cast<char*>("")))) return TRUE; table->file->extra(HA_EXTRA_NO_ROWS); // Don't update rows table->no_rows=1; |