diff options
author | Igor Babaev <igor@askmonty.org> | 2013-01-21 11:47:45 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-01-21 11:47:45 -0800 |
commit | fade3647ecb18a90d9c89a924a076d714ec45888 (patch) | |
tree | 1cdd64f9b996aa56df1993d3ea319075124ec5c4 /sql/sql_class.h | |
parent | 2e11ca36f28133c18b72351d176ee2fd7fcbc465 (diff) | |
download | mariadb-git-fade3647ecb18a90d9c89a924a076d714ec45888.tar.gz |
Fixed bug mdev-4063 (bug #56927).
This bug could result in returning 0 for the expressions of the form
<aggregate_function>(distinct field) when the system variable
max_heap_table_size was set to a small enough number.
It happened because the method Unique::walk() did not support
the case when more than one pass was needed to merge the trees
of distinct values saved in an external file.
Backported a fix in grant_lowercase.test from mariadb 5.5.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index fb4e13ad9c6..2fd8e8cd04b 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3008,6 +3008,8 @@ class Unique :public Sql_alloc bool flush(); uint size; + bool merge(TABLE *table, uchar *buff, bool without_last_merge); + public: ulong elements; Unique(qsort_cmp2 comp_func, void *comp_func_fixed_arg, @@ -3035,7 +3037,7 @@ public: } void reset(); - bool walk(tree_walk_action action, void *walk_action_arg); + bool walk(TABLE *table, tree_walk_action action, void *walk_action_arg); uint get_size() const { return size; } ulonglong get_max_in_memory_size() const { return max_in_memory_size; } |