Bug #72039 The variable open-files-limit has the wrong maximum
Submitted: 14 Mar 2014 21:20 Modified: 17 Mar 2014 14:11
Reporter: Ovais Tariq Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.5, 5.6 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[14 Mar 2014 21:20] Ovais Tariq
Description:
The manual at http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_open-files-limit mentions that the range of values for the variable open-files-limit is 0 to 65535. But this is not true. The maximum value is platform dependent and can be set to the maximum value an `unsigned int` can hold.

In the code we have:
       READ_ONLY GLOBAL_VAR(open_files_limit), CMD_LINE(REQUIRED_ARG),
       VALID_RANGE(0, OS_FILE_LIMIT), DEFAULT(0), BLOCK_SIZE(1),

#ifndef OS_FILE_LIMIT
#define OS_FILE_LIMIT   UINT_MAX
#endif

How to repeat:
Setting the variable open-files-limit to a value greater than 65535 also works correctly:
open-files-limit               = 100000

mysql> show variables like 'open_fi%';
+------------------+--------+
| Variable_name    | Value  |
+------------------+--------+
| open_files_limit | 100000 |
+------------------+--------+
1 row in set (0.00 sec)

Suggested fix:
The documentation should be corrected to mention that the maximum value of the variable open-files-limit is platform dependent. And is equal to the maximum value of an unsigned INT.
[15 Mar 2014 6:13] MySQL Verification Team
Hello Ovais,

Thank you for the bug report.

Thanks,
Umesh
[15 Mar 2014 8:47] Valeriy Kravchuk
See also http://bugs.mysql.com/bug.php?id=47095
[17 Mar 2014 14:11] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly.

Modified text:

Changes the number of file descriptors available to mysqld. You
should try increasing the value of this option if mysqld gives you
the error Too many open files. mysqld uses the option value to
reserve descriptors with setrlimit(). Internally, the maximum value
for this option is the maximum unsigned integer value, but the actual
maximum is platform dependent. If the requested number of file
descriptors cannot be allocated, mysqld writes a warning to the error
log.