Bug #42104 Setting key_buffer_size to TRUE or FALSE will not be rejected.
Submitted: 14 Jan 2009 9:46 Modified: 8 Oct 2009 20:02
Reporter: Horst Hunger Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.1.31 OS:Linux (suse-linux-gnu on i686)
Assigned to: Sergei Golubchik CPU Architecture:Any

[14 Jan 2009 9:46] Horst Hunger
Description:
The assignment of TRUE, FALSE has the effect that the variable get the minimum value, while ON is rejected with an error. I would prefer a consistent behavior.
Look at "key_buffer_size_basic.inc" in "suite/sys_vars/inc", line 139. Don't forget to change the result files after the bug fix.

How to repeat:
Look at the subtests in the test mentioned below (line 139) and execute on 32 bit machines
 
./mtr --suite=sys_vars key_buffer_size_basic_32

and on 64 bit machines

./mtr --suite=sys_vars key_buffer_size_basic_64

Actually, these assignments are accepted by the test.

Suggested fix:
Reject the assignment for TRUE and FALSE (as done for ON).
[14 Jan 2009 10:26] Sveta Smirnova
Thank you for the report.

Verified as described.
[8 Oct 2009 20:02] Sergei Golubchik
Expected behavior. TRUE in the server is 1 in any numeric context, FALSE is 0.
Setting key_buffer_size to 1 or 0 is not an error.