diff options
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index 50375fbf77c..ffc9558822d 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -156,7 +156,8 @@ class Item_sum_count_distinct :public Item_sum_int TMP_TABLE_PARAM *tmp_table_param; TREE tree; uint key_length; - + CHARSET_INFO *key_charset; + // calculated based on max_heap_table_size. If reached, // walk the tree and dump it into MyISAM table uint max_elements_in_tree; @@ -175,6 +176,8 @@ class Item_sum_count_distinct :public Item_sum_int int tree_to_myisam(); friend int composite_key_cmp(void* arg, byte* key1, byte* key2); + friend int simple_str_key_cmp(void* arg, byte* key1, byte* key2); + friend int simple_raw_key_cmp(void* arg, byte* key1, byte* key2); friend int dump_leaf(byte* key, uint32 count __attribute__((unused)), Item_sum_count_distinct* item); @@ -481,7 +484,8 @@ public: double val() { String *res; res=val_str(&str_value); - return res ? my_strntod(res->charset(),res->ptr(),res->length(),(char**) 0) : 0.0; + return res ? my_strntod(res->charset(),(char*) res->ptr(),res->length(), + (char**) 0) : 0.0; } longlong val_int() { |