Bug #57294 'local-infile' should be'local_infile'
Submitted: 6 Oct 2010 20:04 Modified: 15 Oct 2010 13:35
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.1.51 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[6 Oct 2010 20:04] Peter Laursen
Description:
http://dev.mysql.com/doc/refman/5.1/en/load-data-local.html

"You can disable all LOAD DATA LOCAL statements from the server side by starting mysqld with the --You can disable all LOAD DATA LOCAL statements from the server side by starting mysqld with the --local-infile=0 option. 

For the mysql command-line client, enable LOAD DATA LOCAL by specifying the --local-infile[=1] option, or disable it with the --local-infile=0 option.=0 option. 

For the mysql command-line client, enable LOAD DATA LOCAL by specifying the --local-infile[=1] option, or disable it with the --local-infile=0 option."

Two issues:

1) it is not 'local-infile' but 'local_infile'
2) it affects every client and not only command line

How to repeat:
SHOW GLOBAL VARIABLES LIKE 'local-infile'; -- empty set
SHOW GLOBAL VARIABLES LIKE 'local_infile'; -- works

Suggested fix:
Update docs.

But the inconsistency with '-' and '_' in 'options' is really annoying!
[6 Oct 2010 20:59] MySQL Verification Team
Thank you for the bug report.
[7 Oct 2010 16:09] Paul DuBois
The section is phrased in terms of command-line options, not SET statements. local-infile works perfectly well in that context. (So does local_infile, but the manual is not wrong that I can see.)
[7 Oct 2010 16:17] Peter Laursen
So it is rather an inconsistence with 'options'/'variables' and not 'docs'?
[7 Oct 2010 16:25] Paul DuBois
At startup time, options can be given using either dash or underscore.

http://dev.mysql.com/doc/refman/5.1/en/command-line-options.html:

"
Within option names, dash (“-”) and underscore (“_”) may be used interchangeably. For example, --skip-grant-tables and --skip_grant_tables are equivalent. (However, the leading dashes cannot be given as underscores.)
"

This is due to the fact that some options really are just options. But you can also set many system variables at startup. To enable the same syntax to work for either, you can specify dash or underscore interchangeably.