Bug #71513 mysqld --help --verbose doesn't produce error for wrong innodb_flush_method

Submitted: 29 Jan 2014 16:08 Modified: 30 Jan 2014 5:59
Reporter: Valeriy Kravchuk Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.6.15, 5.5.35 OS:Any
Assigned to: CPU Architecture:Any
Tags: innodb_flush_method

[29 Jan 2014 16:08] Valeriy Kravchuk
Description:
It's known (see bug #63187, for example) that

mysqld --help --verbose

command starts server to some extent and even load plugins in attempt to check server and plugin configuration variables. it also produces exit code >0 in case of any errors, like in this case on Windows:

C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqld.exe --help --verbose --innodb_thread_concurrency=FFF 2>&1 >NUL
2014-01-29 17:29:07 6780 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.6\data\pc-PC.lower-test
2014-01-29 17:29:07 6780 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.6\data\pc-PC.lower-test
2014-01-29 17:29:07 6780 [Note] Plugin 'FEDERATED' is disabled.
Unknown suffix 'F' used for variable 'innodb-thread-concurrency' (value 'FFF')
2014-01-29 17:29:07 6780 [ERROR] mysqld.exe: Error while setting value 'FFF' to 'innodb-thread-concurrency'
2014-01-29 17:29:07 6780 [ERROR] Parsing options for plugin 'InnoDB' failed.
2014-01-29 17:29:07 6780 [ERROR] mysqld.exe: unknown variable 'innodb_thread_concurrency=FFF'
2014-01-29 17:29:09 6780 [ERROR] Aborting

2014-01-29 17:29:09 6780 [Note] Binlog end
2014-01-29 17:29:09 6780 [Note] Shutting down plugin 'MyISAM'
2014-01-29 17:29:09 6780 [Note] Shutting down plugin 'CSV'

C:\Program Files\MySQL\MySQL Server 5.6\bin>echo %ERRORLEVEL%
7

But innodb_flush_method seems "special" in this regard:

C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqld.exe --help --verbose --innodb_flush_method=BULLSHIT >NUL
2014-01-29 18:03:55 8048 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.6\data\pc-PC.lower-test
2014-01-29 18:03:55 8048 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.6\data\pc-PC.lower-test
2014-01-29 18:03:55 8048 [Note] Plugin 'FEDERATED' is disabled.
2014-01-29 18:03:57 8048 [Note] Binlog end
2014-01-29 18:03:57 8048 [Note] Shutting down plugin 'MyISAM'
2014-01-29 18:03:57 8048 [Note] Shutting down plugin 'CSV'

C:\Program Files\MySQL\MySQL Server 5.6\bin>echo %ERRORLEVEL%
0

No errors, but I truly doubt this is a valid value for the option...

How to repeat:
Run the following command:

mysqld --help --verbose --inoodb_flush_method=BULLSHIT >/dev/null

(or it's variation for your favorite OS) and check error messages (if any) and exit code. Then compare to any unknown variables or bad/unacceptable value passed for any other server variables. Make your own conclusions.

Suggested fix:
Make sure to set exit code to >0 for all cases of bad options/server variables/plugin variables settings for mysqld [--help --verbose] command.
[30 Jan 2014 5:59] MySQL Verification Team
Hello Valeriy,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh

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

Page generated in 0.051 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.