sum_distinct-big test fails after resetting max_heap_table_size

Bug #376299 reported by Lee Bieber on 2009-05-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
High
Stewart Smith
7.0
Medium
Stewart Smith
Cherry
High
Stewart Smith

Bug Description

When running the big test suite (make test-big) the sum_distinct-big test fails when it resets the max_heap_table_size to a smaller size then runs several sum distinct commands again. According to the test notes it creates a situation where all the values can not fit in memory and thus must be stored in a temporary table. This was run on x86 OpenSolaris (drizzle-os machine) but I have also seen this fail on other platforms as well.

From the test:
-------------------
# SELECT '++++++++++++++++++++++++++++++++++++++++++++++++++';

SELECT SUM(DISTINCT id) sm FROM t1;
SELECT SUM(DISTINCT id) sm FROM t2;
SELECT SUM(DISTINCT id) sm FROM t1 group by id % 13;

# this limit for max_heap_table_size is set to force testing the case, when
# all distinct sum values can not fit in memory and must be stored in a
# temporary table

SET max_heap_table_size=16384;

# to check that max_heap_table_size was actually set (hard limit for minimum
# max_heap_table_size is set in mysqld.cc):

SHOW variables LIKE 'max_heap_table_size';

SELECT SUM(DISTINCT id) sm FROM t1;
SELECT SUM(DISTINCT id) sm FROM t2;
SELECT SUM(DISTINCT id) sm FROM t1 GROUP BY id % 13;

Test differences:
----------------------
$ diff suite/big/r/sum_distinct-big.result suite/big/r/sum_distinct-big.reject
87c87
< 134225920
---
> 134479903
90c90
< 134225920
---
> 16639377498
93,105c93,105
< 10327590
< 10328851
< 10330112
< 10331373
< 10332634
< 10317510
< 10318770
< 10320030
< 10321290
< 10322550
< 10323810
< 10325070
< 10326330
---
> 10353720
> 10344349
> 10349239
> 10358227
> 10364964
> 10330676
> 10338685
> 10346883
> 10351045
> 10342415
> 10347591
> 10355365
> 10340237

Related branches

Joe Daly (skinny.moey) wrote :

I was able to reproduce this failure. My platform is

opensuse 11.1 x86_64

jdaly@rx8:~/stats> uname -a
Linux rx8 2.6.27.7-9-xen #1 SMP 2008-12-04 18:10:04 +0100 x86_64 x86_64 x86_64 GNU/Linux
jdaly@rx8:~/stats>

Changed in drizzle:
status: New → Confirmed
Lee Bieber (kalebral) wrote :

Test has been commented out for now in sum_distinct-big, please make sure this is uncommented after the bug is fixed

Lee Bieber (kalebral) on 2009-06-08
Changed in drizzle:
importance: Undecided → High
milestone: none → aloha
assignee: nobody → Stewart Smith (stewart-flamingspork)
Lee Bieber (kalebral) on 2009-08-18
Changed in drizzle:
milestone: aloha → bell
Lee Bieber (kalebral) on 2010-01-27
Changed in drizzle:
milestone: bell → cherry
Lee Bieber (kalebral) on 2010-05-21
Changed in drizzle:
milestone: 2010-05-24 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers