Bug #42554 System option/variable values based on MAX_ULONG incorrect for 64-bit OS
Submitted: 2 Feb 2009 19:49 Modified: 2 Feb 2009 21:13
Reporter: Jon Stephens Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:all OS:Any (any 64-bit)
Assigned to: Jon Stephens CPU Architecture:Any
Tags: server options, server variables, system variables

[2 Feb 2009 19:49] Jon Stephens
Description:
A number of server options are defined in mysqld.cc as having MAX_ULONG for their maximum (and sometimes default) values; the values shown in the Manual for such options are correct only for 32-bit systems.

A number of these discrepancies have been reported by Support. Rather than address them piecemeal, it's preferable to fix the underlying problem in one go.

How to repeat:
Check the source.

Verify in mysql client on 64-bit OS.

Example:

[from mysqld.cc in 6.0 bzr tree]

  { "group_concat_max_len", OPT_GROUP_CONCAT_MAX_LEN,
    "The maximum length of the result of function  group_concat.",
    (uchar**) &global_system_variables.group_concat_max_len,
    (uchar**) &max_system_variables.group_concat_max_len, 0, GET_ULONG,
    REQUIRED_ARG, 1024, 4, (longlong) ULONG_MAX, 0, 1, 0},

[in mysql client/server built from 6.0-bzr]

mysql> show variables like 'version%';
+-------------------------+---------------------+
| Variable_name           | Value               |
+-------------------------+---------------------+
| version                 | 6.0.10              | 
| version_comment         | Source distribution | 
| version_compile_machine | x86_64              | 
| version_compile_os      | suse-linux-gnu      | 
+-------------------------+---------------------+
4 rows in set (0.00 sec)

mysql> set @@group_concat_max_len = 18446744073709547520;
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like 'group%';
+----------------------+----------------------+
| Variable_name        | Value                |
+----------------------+----------------------+
| group_concat_max_len | 18446744073709547520 | 
+----------------------+----------------------+
1 row in set (0.00 sec)

Suggested fix:
Check mysqld.cc for all server options having maximum and/or default values defined using MAX_ULONG.

Fix corresponding entries in mysqld.xml optvars file to show these values as 4294967295 (4GB) for 32-bit platforms and 18446744073709547520 (16PB) for 64-bit platforms.

(MC made fixes in the optvars DTD and docs build system last week to handle such cases, which it didn't before.)
[2 Feb 2009 21:13] Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.