Bug #10473 Can't set 'key_buffer_size' system variable to ZERO.
Submitted: 9 May 2005 12:37 Modified: 8 Aug 2005 15:59
Reporter: Disha Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.5-beta pre-release OS:Windows (Windows Server 2003)
Assigned to: Ingo Strüwing CPU Architecture:Any

[9 May 2005 12:37] Disha
Description:
If tried to set system variable 'key_buffer_size' is equal to zero, it can't set to zero. 

How to repeat:
1. delimiter //
2. create database test//
3. use test
4. set @@global.key_buffer_size=0//
5. select @@global.key_buffer_size//
6. The execution of step (5) displays the result as follows,
	+--------------------------+
	| @@global.key_buffer_size |
	+--------------------------+
	|                                8   |
	+--------------------------+

7. Expected Results: As mentioned in the manual the system  
             variable 'key_buffer_size' should be set to zero.

8. Actual Results  : The execution displays the value of 'key_buffer_size' is equal 
             to 8.
[9 May 2005 13:09] Hartmut Holzgraefe
The minimal value for this MALLOC_OVERHEAD which is defined in my_global.h

Setting a variable to a value out of range should issue a warning
[5 Aug 2005 14:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/27923
[5 Aug 2005 14:46] Ingo Strüwing
There are several system variables (if not most of them, or even all), which are silently truncated into their limits. This is standard behaviour. One might prefer exact messages, but this is more a feature request than a bug report.

It is not possible to destroy the default keycache. This is now documented.

My patch gives the user a note, if he tries.
[7 Aug 2005 18:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/27978
[7 Aug 2005 20:43] Ingo Strüwing
Pushed to 5.0.12.
[8 Aug 2005 15:59] Mike Hillyer
Documented in 5.0.12 changelog:

 <para>Trying to drop the default keycache by setting <literal>@@global.key_buffer_size</literal> to zero now returns a warning that the default keycache cannot be dropped. (Bug #10473)</para>