1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Fixed bug mdev-4369.

The function was adjusted to be able to aggregate
the counters of the merged elements. 
Before this change it was not possible to guarantee the correctness
of the counters passed to the the call-back parameter walk_action.
As a result, when some elements of a Unique object were flushed into
disk the function passed to merge_walk() as the call-back parameter
could return wrong counters of elements. This could lead to building
wrong histograms.
This commit is contained in:
Igor Babaev
2013-04-06 15:36:28 -07:00
parent 1c30fb2a15
commit 10f0530b22
5 changed files with 121 additions and 6 deletions

View File

@ -1348,7 +1348,7 @@ public:
tree_key_length= field->pack_length();
tree= new Unique((qsort_cmp2) simple_str_key_cmp, (void*) field,
tree_key_length, max_heap_table_size);
tree_key_length, max_heap_table_size, 1);
}
virtual ~Count_distinct_field()
@ -1435,7 +1435,7 @@ public:
tree= new Unique((qsort_cmp2) simple_ulonglong_key_cmp,
(void*) &tree_key_length,
tree_key_length, max_heap_table_size);
tree_key_length, max_heap_table_size, 1);
}
bool add()