Bug #29551 Though sort_buffer_size=5GB only 4.28GB are allocated as sort buffer.
Submitted: 4 Jul 2007 14:38 Modified: 30 Jul 2007 21:08
Reporter: Horst Hunger Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.16 OS:Any (64bit, Windows, Solaris)
Assigned to: Assigned Account CPU Architecture:Any

[4 Jul 2007 14:38] Horst Hunger
Description:
The variable sort_buffer_size is set as follows:
SET sort_buffer_size = 5000*1024*1024;

SHOW VARIABLES LIKE '%sort%';  give the following value:
sort_buffer_size       4294967295

and only 4GB memory are used (of course).

See attached log.

How to repeat:
On a machine with 64bit processor, 6GB RAM and free diskspace of about 8GB:

put the attached test into mysql-test/t, create a result file and runthe test with
perl mysql-test-run.pl
[4 Jul 2007 21:22] Sveta Smirnova
Thank you for the report.

Verified as described.
[9 Jul 2007 18:18] Horst Hunger
test program to reporiduce the bug.

Attachment: bug29551sort_buffer.test (application/octet-stream, text), 5.86 KiB.

[28 Jul 2007 8:47] Gleb Shchepa
Can't repeat on 5.1-bk (and on 5.0-bk too).
[30 Jul 2007 21:08] Michael Widenius
Duplicate of #29446 (see comment in it how to fix this for windows)
Fixed in 5.1 tree for 64 bit Unix platforms. 
Windows 64 bit has to wait for 5.2