diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-10-13 09:22:37 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-10-13 09:22:37 +0300 |
commit | c62aa5c795ac766f8272971a2f4ccf1ddae2d60c (patch) | |
tree | 83a5668f985a1af0253fe8b7048a95a7fb5311ed /sql/item_sum.cc | |
parent | 6c974c673f9d432e95220012bf43ab7133d43e63 (diff) | |
parent | c9141ac580ec8a53becc7b0fdcee78f546040b4b (diff) | |
download | mariadb-git-c62aa5c795ac766f8272971a2f4ccf1ddae2d60c.tar.gz |
Merge magare.gmz:/home/kgeorge/mysql/autopush/B31156-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B31156-5.1-opt
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 2684cce16ac..ca1e9db7475 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -915,7 +915,9 @@ bool Item_sum_distinct::setup(THD *thd) List<Create_field> field_list; Create_field field_def; /* field definition */ DBUG_ENTER("Item_sum_distinct::setup"); - DBUG_ASSERT(tree == 0); + /* It's legal to call setup() more than once when in a subquery */ + if (tree) + return FALSE; /* Virtual table and the tree are created anew on each re-execution of @@ -2462,6 +2464,7 @@ bool Item_sum_count_distinct::setup(THD *thd) /* Setup can be called twice for ROLLUP items. This is a bug. Please add DBUG_ASSERT(tree == 0) here when it's fixed. + It's legal to call setup() more than once when in a subquery */ if (tree || table || tmp_table_param) return FALSE; |