mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
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.
This commit is contained in:
@ -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; }
|
||||
|
Reference in New Issue
Block a user