diff options
author | monty@narttu.mysql.fi <> | 2000-12-05 16:14:52 +0200 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2000-12-05 16:14:52 +0200 |
commit | 402e8e5c780cb4b2f72861b5cf55f5db2cf1997e (patch) | |
tree | 3778f67cd21c1d02d9d2a51d27cfa481b4bd1677 /sql | |
parent | a2fc71d313772b33e481d8ae9309592ef7c56039 (diff) | |
download | mariadb-git-402e8e5c780cb4b2f72861b5cf55f5db2cf1997e.tar.gz |
Fix for core dump in DISTINCT
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_select.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 8856d31645c..31fc3f28099 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5218,8 +5218,10 @@ remove_duplicates(JOIN *join, TABLE *entry,List<Item> &fields) List_iterator<Item> it(fields); Item *item; while ((item=it++)) - if (item->tmp_table_field()) + { + if (item->tmp_table_field() && ! item->const_item()) field_count++; + } if (!field_count) { // only const items |