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:
@ -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));
|
||||
|
Reference in New Issue
Block a user