Bug #71519 innodb_flush_method variable is a string, not enumeration as manual says

Submitted: 30 Jan 2014 8:15 Modified: 12 Feb 2014 14:19
Reporter: Valeriy Kravchuk Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.6.15 OS:Any
Assigned to: Daniel Price CPU Architecture:Any
Tags: innodb_flush_method

[30 Jan 2014 8:15] Valeriy Kravchuk
Description:
This is related to bug #71513.

If one checks source code, it's easy to find out that innodb_flush_method server variable (that is represented as innobase_file_flush_method in the code e3ventually) is defined as accepting string values (MYSQL_SYSVAR_STR):

openxs@ao756:~/bzr/mysql-5.6$ grep -rn innobase_file_flush_method *
...
storage/innobase/handler/ha_innodb.cc:163:static char*  innobase_file_flush_method              = NULL;
storage/innobase/handler/ha_innodb.cc:3065:     srv_file_flush_method_str = innobase_file_flush_method;
storage/innobase/handler/ha_innodb.cc:15608:static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method,
...

At the same time, manual (http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_flush_method) says it is enumeration (with different set of possible values for different OSes).

I think in this case manual is right and it would be helpful to use MYSQL_SYSVAR_ENUM with proper set of values per OS. It will help mysqld --help --verbose to use parser to find unacceptable values without real server startup, among other things.

How to repeat:
Try to set some arbitrary string value to innodb_flush_method and have mysqld --help --verbose report it as wrong. Fail in that and start to wonder why, then read the manual and compare to the source code.

Suggested fix:
Use MYSQL_SYSVAR_ENUM type for all server variables that have only limited set of acceptable string values.
[30 Jan 2014 11:49] MySQL Verification Team
Hello Valeriy,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[12 Feb 2014 14:19] Daniel Price
This issue has been classified as a doc bug. The innodb_flush_method documentation has been updated to define innodb_flush_method as a string type rather than enum type. The change will appear soon, with the next published documentation build. 

Thank you for the bug report.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.042 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.