summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorunknown <serg@sergbook.mysql.com>2003-02-10 12:01:47 +0100
committerunknown <serg@sergbook.mysql.com>2003-02-10 12:01:47 +0100
commit7910884c5cbb59e89041506a12b9a3a567a97067 (patch)
tree6eed7ec5d21e357462e4f4346568d6c2c68654eb /sql/item_sum.h
parentc89666266228fbfc9582a6b28b8dc93acb4acebe (diff)
downloadmariadb-git-7910884c5cbb59e89041506a12b9a3a567a97067.tar.gz
count(distint) on an empty table crash fixed
BitKeeper/etc/ignore: Added support-files/MacOSX/Description.plist support-files/MacOSX/Info.plist to the ignore list
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r--sql/item_sum.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h
index 04f95dfd778..62cb5974388 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -185,7 +185,8 @@ class Item_sum_count_distinct :public Item_sum_int
:Item_sum_int(list),table(0),used_table_cache(~(table_map) 0),
tmp_table_param(0),use_tree(0),always_null(0)
{ quick_group=0; }
- ~Item_sum_count_distinct();
+ ~Item_sum_count_distinct() { no_rows_in_result(); }
+
table_map used_tables() const { return used_table_cache; }
enum Sumfunctype sum_func () const { return COUNT_DISTINCT_FUNC; }
void reset();
@@ -195,7 +196,8 @@ class Item_sum_count_distinct :public Item_sum_int
void update_field(int offset) { return ; } // Never called
const char *func_name() const { return "count_distinct"; }
bool setup(THD *thd);
- unsigned int size_of() { return sizeof(*this);}
+ void no_rows_in_result();
+ unsigned int size_of() { return sizeof(*this);}
};