Bug #39634 128K in my.cnf wont be 128 kbyte once mysql has been loaded
Submitted: 24 Sep 2008 19:50 Modified: 24 Sep 2008 20:19
Reporter: Apachez Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:4.x and 5.x OS:Any (Verified on Win2k and Debian 4.x)
Assigned to: CPU Architecture:Any

[24 Sep 2008 19:50] Apachez
Description:
When I set the following in my my.cnf:

key_buffer_size = 256M
sort_buffer_size = 128K
read_buffer_size = 128K
read_rnd_buffer_size = 128K
join_buffer_size = 128K
myisam_sort_buffer_size = 128K

The result will be (using "SHOW VARIABLES LIKE ‘%buffer%';"):

key_buffer_size 268435456
sort_buffer_size 131064
read_buffer_size 126976
read_rnd_buffer_size 126976
join_buffer_size 126976
myisam_sort_buffer_size 131072

Shouldnt all the buffers above except key_buffer be 131072 in size in the above case?

How to repeat:
Add/change the buffer settings in my.cnf into following:

key_buffer_size = 256M
sort_buffer_size = 128K
read_buffer_size = 128K
read_rnd_buffer_size = 128K
join_buffer_size = 128K
myisam_sort_buffer_size = 128K

then restart the mysql process and run:

SHOW VARIABLES LIKE ‘%buffer%';

Take a look at the output. The output for all buffers (except the key_buffer) should read 131072 and not 131064 or 126976.
[24 Sep 2008 20:14] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior with current version 5.0.67, although bug is repeatable with version 5.0.51a. Please consider to upgrade.

Bug still exists in version 4.1, but it most likely would not be fixed, because version 4.1 is in  	Extended Support state which means only critical bugs would be fixed.
[24 Sep 2008 20:19] Apachez
Ok...

The 4.x was 4.1.12 on Win2k and the 5.x was 5.0.32-7etch6 on Debian etch (current stable).