Bug #16059 the startup variables like "sort_buffer_size" has an empty unit
Submitted: 29 Dec 2005 6:49 Modified: 29 Dec 2005 13:34
Reporter: ming lu Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.1.2 OS:Linux (red hat9)
Assigned to: CPU Architecture:Any

[29 Dec 2005 6:49] ming lu
Description:
Many startup variables like "sort_buffer_size"  has three units: ' ', 'K', 'M'.  The meanings of 'K' and 'M' are very clear, but the empty unit baffles me. I think many mysql users cannot understand it easily. Does it stand for 'Byte'?

How to repeat:
see the description

Suggested fix:
Why don't you use 'B' stand by Byte unit?
[29 Dec 2005 7:36] Aleksey Kishkin
I dont think it's a bug. K and M - are just prefixes for unit. And unit is the same for all prefixes - its byte. So in the full form : bytes, Kilobytes,Megabytes. And it looks reasonable for me if we have short form as ' ', 'K' and 'M'

Probably we should change help files for reflect it more clear. Please let me know what you think.
[29 Dec 2005 7:58] ming lu
How about marking them as 'B', 'KB' and 'MB' ?  
Or you can modify the reference manual to clarify it.
[29 Dec 2005 13:34] Valeriy Kravchuk
Current way (no _suffix_ for values in bytes, K and M for kilobytes and megabytes) is consistent with other means to set variables. Please, read http://dev.mysql.com/doc/refman/5.0/en/program-variables.html:

"Many MySQL programs have internal variables that can be set at runtime. Program variables are set the same way as any other long option that takes a value. For example, mysql has a max_allowed_packet variable that controls the maximum size of its communication buffer. To set the max_allowed_packet variable for mysql to a value of 16MB, use either of the following commands:

shell> mysql --max_allowed_packet=16777216
shell> mysql --max_allowed_packet=16M

The first command specifies the value in bytes. The second specifies the value in megabytes. Variable values can have a suffix of K, M, or G (either uppercase or lowercase) to indicate units of kilobytes, megabytes, or gigabytes."

So, it is not a bug, and there is no need to mention bytes (B) explicitely - they are used by default for all "sizes".