Bug #25745 Setting configuration items which are in megabytes can have ambiguity
Submitted: 22 Jan 2007 0:54 Modified: 22 Jan 2007 0:56
Reporter: Morgan Tocker Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any
Tags: configuration

[22 Jan 2007 0:54] Morgan Tocker
Description:
Background:
Most configuration settings in MySQL are measured in *bytes*, but not all.

Because setting an innodb buffer pool of 4,294,967,296 is confusing, the my.cnf files also allow an optional suffix to specify the unit of measurement (i.e. 4G, 4M, 4K etc).

When using the M, G or K suffix on measurements that are *not* in bytes, this produces undesired results.

How to repeat:
Try:

[mysqld]
innodb_autoextend_increment=10M

Since the innodb_autoextend_increment is actually a *megabyte* count, this results in the value being set to 1000 (which is presumably the limit).

Suggested fix:
Either warn when using an M, K or G value on a non-byte setting, or use the exact value actually specified.

i.e.
innodb_autoextend_increment=10M -> 10 megabytes
innodb_autoextend_increment=10 -> 10 megabytes
innodb_autoextend_increment=10B -> 10 bytes
innodb_autoextend_increment=10K -> 10 kilobytes