diff options
author | igor@rurik.mysql.com <> | 2005-08-19 01:57:22 -0700 |
---|---|---|
committer | igor@rurik.mysql.com <> | 2005-08-19 01:57:22 -0700 |
commit | 2d32b77693de4ec6fdd4df9a8b7736000920d88e (patch) | |
tree | 73ceffa736474b55dc22f451cee6db62f980d384 /sql/sql_select.cc | |
parent | 7c99cf1af05aebdae1f44d6df3f4751b4cdb933a (diff) | |
download | mariadb-git-2d32b77693de4ec6fdd4df9a8b7736000920d88e.tar.gz |
distinct.test, distinct.result:
Added test cases for bug #12625.
sql_select.cc:
Fixed bug #12625.
Fixed invalid removal of constant items from the DISTINCT
list in the function create_distinct_group.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 9984cb4138f..3b67af8eea7 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -8517,9 +8517,7 @@ create_distinct_group(THD *thd, Item **ref_pointer_array, li.rewind(); while ((item=li++)) { - if (item->const_item() || item->with_sum_func) - continue; - if (!item->marker) + if (!item->const_item() && !item->with_sum_func && !item->marker) { ORDER *ord=(ORDER*) thd->calloc(sizeof(ORDER)); if (!ord) |