diff options
author | Igor Babaev <igor@askmonty.org> | 2013-03-27 19:17:32 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-03-27 19:17:32 -0700 |
commit | 323fdd7ac6e6541a6cc3ab7c48e330805c67d4f3 (patch) | |
tree | 6e66f251d147e7daa6a78ce88a8e41d8bf1d871c /sql/item_sum.h | |
parent | 495fd27c0e3781013904666f302a3d3e4f011e50 (diff) | |
download | mariadb-git-323fdd7ac6e6541a6cc3ab7c48e330805c67d4f3.tar.gz |
Fixed bug mdev-4311 (bug #68749).
This bug was introduced by the patch for WL#3220.
If the memory allocated for the tree to store unique elements
to be counted is not big enough to include all of them then
an external file is used to store the elements.
The unique elements are guaranteed not to be nulls. So, when
reading them from the file we don't have to care about the null
flags of the read values. However, we should remove the flag
at the very beginning of the process. If we don't do it and
if the last value written into the record buffer for the field
whose distinct values needs to be counted happens to be null,
then all values read from the file are considered to be nulls
and are not counted in.
The fix does not remove a possible null flag for the read values.
Rather it just counts the values in the same way it was done
before WL #3220.
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index 40a28d8beae..a954b0f65c1 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -642,6 +642,7 @@ public: virtual bool arg_is_null(); bool unique_walk_function(void *element); + bool unique_walk_function_for_count(void *element); static int composite_key_cmp(void* arg, uchar* key1, uchar* key2); }; |