summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorVarun Gupta <varunraiko1803@gmail.com>2017-08-08 21:13:45 +0530
committerVarun Gupta <varunraiko1803@gmail.com>2017-08-09 18:09:04 +0530
commit0739179857699d68758ff2e56e9414735546ded6 (patch)
tree53568b508da617154d5cb0747e21a4400bdcd421 /sql/sql_class.h
parentc8a0244e957bc4beff453f09c881bb51752d682c (diff)
downloadmariadb-git-0739179857699d68758ff2e56e9414735546ded6.tar.gz
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
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 5dd7cd18a5d..f4be996c9a9 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -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));