Description:
5.0 docs say this:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#option_mysqld_key_buff...
"The maximum allowable setting for key_buffer_size is 4GB on 32-bit platforms. As of
MySQL 5.0.52, values larger than 4GB are allowed for 64-bit platforms (except 64-bit
Windows, for which large values are truncated to 4GB with a warning)."
5.1 and 6.0 docs say this:
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#option_mysqld_key_buff...
"The maximum allowable setting for key_buffer_size is 4GB on 32-bit platforms. As of
MySQL 5.1.23, values larger than 4GB are allowed for 64-bit platforms."
5.1 and 6.0 say nothing about windows limitations.
However, there is a glaring problem in the handling of >4GB on 5.1.26-rc-x64:
This allocates 0 for key_buffer_size:
E:\mysql-5.1.26-rc-winx64\bin>mysqld --key_buffer_size=4096M --console
--skip-grant-tables --skip-name-resolve
This allocates 4095M for key_buffer_size:
E:\mysql-5.1.26-rc-winx64\bin>mysqld --key_buffer_size=4095M --console
--skip-grant-tables --skip-name-resolve
This allocates 1G for key_buffer_size
E:\mysql-5.1.26-rc-winx64\bin>mysqld --key_buffer_size=5G --console --skip-grant-tables
--skip-name-resolve
How to repeat:
Try set a larger than 4G key_buffer_size on 64-bit windows builds. Notice memory
consumption in task manager. Notice there are no warnings in the error log.
Suggested fix:
If the limit of 4G really applies to windows 64-bit builds:
1) add a warning during server startup.
2) document the limit.
3) remove the limit in future version since 64-bit windows is a major platform.