Bug #36392 no warning when key_buffer_size set too high?
Submitted: 29 Apr 2008 9:26 Modified: 5 May 2008 12:25
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:5.1.24-win32 OS:Microsoft Windows
Assigned to: CPU Architecture:Any
Tags: key_buffer_size
Triage: Triaged: D4 (Minor)

[29 Apr 2008 9:26] Shane Bester
Description:
I started 32-bit version of mysqld and specified a 4095M key_buffer_size, which is too large for a 32-bit process to allocate.

E:\mysql-5.1.24-rc-win32\bin>mysqld --console --skip-grant-tables --skip-name-resolve --key_buffer_size=4095M --log-warn=2
080426 10:34:35  InnoDB: Started; log sequence number 0 46409
080426 10:34:35 [Note] mysqld: ready for connections.
Version: '5.1.24-rc-community'  socket: ''  port: 3306  MySQL Community Server (GPL)

Why is there no error or warning?

mysql> show global status like '%key%';
+------------------------+-----------+
| Variable_name          | Value     |
+------------------------+-----------+
| Com_assign_to_keycache | 4805      |
| Com_preload_keys       | 5         |
| Com_show_keys          | 1         |
| Handler_read_key       | 9005232   |
| Key_blocks_not_flushed | 35306     |
| Key_blocks_unused      | 268918    |
| Key_blocks_used        | 897278    |
| Key_read_requests      | 418183673 |
| Key_reads              | 1420543   |
| Key_write_requests     | 103367402 |
| Key_writes             | 57003844  |
+------------------------+-----------+
11 rows in set (0.01 sec)

mysql> select @@global.key_buffer_size;
+--------------------------+
| @@global.key_buffer_size |
+--------------------------+
|               4293918720 |
+--------------------------+
1 row in set (0.05 sec)

Task manager showed 1.3G of memory used up.

How to repeat:
mysqld --console --skip-grant-tables --skip-name-resolve --key_buffer_size=4095M --log-warn=2
[29 Apr 2008 11:13] Miguel Solorzano
Thank you for the bug report.