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

MDEV-13458: Wrong result for aggregate function with distinct clause when the value for tmp_table_size is small

Fixed by making sure that the sort buffer would have atleast MERGEBUFF2 keys.
Also fixed MDEV-13457 by making sure that an empty tree is never dumped to the disk
This commit is contained in:
Varun Gupta
2017-08-08 21:13:45 +05:30
parent c8a0244e95
commit 0739179857
4 changed files with 63 additions and 5 deletions

View File

@ -3919,7 +3919,7 @@ public:
{
DBUG_ENTER("unique_add");
DBUG_PRINT("info", ("tree %u - %lu", tree.elements_in_tree, max_elements));
if (!(tree.flag & TREE_ONLY_DUPS) &&
if (!(tree.flag & TREE_ONLY_DUPS) &&
tree.elements_in_tree >= max_elements && flush())
DBUG_RETURN(1);
DBUG_RETURN(!tree_insert(&tree, ptr, 0, tree.custom_arg));