Bug #42287 max_binlog_cache_size has differing initial, DEFAULT, and max values
Submitted: 23 Jan 2009 0:52 Modified: 24 Feb 2009 0:34
Reporter: Patrick Crews Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Tatiana Azundris Nuernberg CPU Architecture:Any
Tags: default values, max_binlog_cache_size, variables

[23 Jan 2009 0:52] Patrick Crews
Description:
The global variable max_binlog_cache_size has differing initial, DEFAULT, and max values:

The initial value is correct (per the manual), but setting this variable to DEFAULT results in a different value and it is then impossible to reset the variable to the initial setting (larger values than DEFAULT are truncated to DEFAULT)

This behavior is from the 5.1-rpl tree, -bugteam tree differs in behavior.  -Bugteam trees have matching initial, DEFAULT, and max values, but they do not correspond to the manual.  See the DEFAULT value below

-rpl test results
SELECT @@global.max_binlog_cache_size as initial_max_binlog_cache;
initial_max_binlog_cache
4294967295
SET @@global.max_binlog_cache_size = default;
SELECT @@global.max_binlog_cache_size as default_max_binlog_cache;
default_max_binlog_cache
4294963200
SET @@global.max_binlog_cache_size=4294967295;
SELECT @@global.max_binlog_cache_size as should_be_429467295;
should_be_429467295
4294963200

How to repeat:
Run the attached test case / examine the .result file.

The output from the test is shown in the Description section.

Suggested fix:
Ensure the manual and server match each other.

Ensure initial values of the variable match the DEFAULT value of the variable.
[23 Jan 2009 0:52] Patrick Crews
.result file

Attachment: exp.result (, text), 804 bytes.

[23 Jan 2009 0:53] Patrick Crews
.test file to demonstrate bug

Attachment: exp.test (, text), 656 bytes.

[23 Jan 2009 0:54] Patrick Crews
This is likely a symptom of Bug #31177	Server variables can't be set to their current values

However, the manual still needs to be updated to reflect the new values (server and manual disagree in -bugteam)
[26 Jan 2009 13:55] Tatiana Azundris Nuernberg
(note: attached test-case has a typo, tries to set to 4294967295 but then expects 42946_7295, this makes the result look really off rather than just adjusted, which it is)

presumed fallout from Bug#31177, and therefore correct in -bugteam

to wit:

64-bit
> SELECT @@global.max_binlog_cache_size as initial_max_binlog_cache;
18446744073709547520
> SET @@global.max_binlog_cache_size = default;
> SELECT @@global.max_binlog_cache_size;
18446744073709547520

> SET @@global.max_binlog_cache_size=4294967295;
4294963200
> SET @@global.max_binlog_cache_size=4294963200;
> SELECT @@global.max_binlog_cache_size;
4294963200

32-bit
> SELECT @@global.max_binlog_cache_size as initial_max_binlog_cache;
4294963200
> SET @@global.max_binlog_cache_size = default;
4294963200
> SET @@global.max_binlog_cache_size=4294967295;
> SELECT @@global.max_binlog_cache_size
4294963200
> SET @@global.max_binlog_cache_size=4294963200;
> SELECT @@global.max_binlog_cache_size;
4294963200
[24 Feb 2009 0:34] Paul DuBois
Manual has been updated to indicate default, max values on 32-bit and 64-bit systems.