[MDEV-4774] Strangeness with max_binlog_stmt_cache_size Settings Created: 2013-07-10 Updated: 2021-12-18 Resolved: 2017-01-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 10.0.3, 5.5.31, 5.5, 10.0 |
| Fix Version/s: | 10.0.30, 10.1.22 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Chris Calender (Inactive) | Assignee: | Sachin Setiya (Inactive) |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | upstream, verified | ||
| Environment: |
Linux, Windows |
||
| Issue Links: |
|
||||||||
| Sprint: | 10.1.21 | ||||||||
| Description |
|
I'm seeing some strangeness when setting various values for max_binlog_stmt_cache_size in the config file. I also see the behavior in MySQL 5.5.32, so perhaps the fix stems from there, but I wanted to file it in both places. Here is the MySQL bug report: http://bugs.mysql.com/bug.php?id=69704 1. If I do not set max_binlog_stmt_cache_size, it defaults to: 18446744073709547520 This is normal and expected: http://dev.mysql.com/doc/refman/5.5/en/replication-options-binary-log.html#sysvar_max_binl... 2. However, if I try to set this in the config file, mysqld fails to start (seeing this on Windows and Linux, 5.5.30 and 5.5.30).
Start mysqld. It fails. On Windows, there is no entry to the error log, at least not when run as a service. On Linux, seeing an error like:
3. If I set it dynamically to '18446744073709547520', it works as expected:
4. However, if I set it dynamically to '18446744073709547519', 1 less than the above value, it reports a "warning", and truncates the value somewhat, which is strange since it doesn't do this when setting it to 1 value higher.
How to repeat:
2. Set the following:
And start mysqld. 3.
4.
Suggested fix: 1. Fix so it reads the max_binlog_stmt_cache_size from the config file correctly. 2. Also, it should be consistent, regardless of what it is set to (i.e., should not be truncated when set to less than the default). 3. Also, the server should not fail to start. 4. Lastly, Windows should log an error of some sort. |
| Comments |
| Comment by Elena Stepanova [ 2015-04-03 ] | ||||||||||||||||||
|
For a note, in (4) the value is rounded to 4096. | ||||||||||||||||||
| Comment by Nirbhay Choubey (Inactive) [ 2017-01-20 ] | ||||||||||||||||||
|
sachin.setiya.007 The last committed patch looks good. Patch approved. | ||||||||||||||||||
| Comment by Karl Klepper [ 2021-12-18 ] | ||||||||||||||||||
|
It happened to me today and is reproducible: {{Server version: 10.5.10-MariaDB-1:10.5.10+maria~focal-log mariadb.org binary distribution M:587698 [ci4]>SHOW VARIABLES LIKE 'max_binlog_stmt_cache_size%';
---------------------------
--------------------------- M:587698 [ci4]>SET GLOBAL max_binlog_stmt_cache_size = 2097152001; M:587698 [ci4]>SHOW warnings;
--------
-------- M:587698 [ci4]>SET GLOBAL max_binlog_stmt_cache_size = 2097152000; M:587698 [ci4]>SHOW VARIABLES LIKE 'max_binlog_stmt_cache_size%';
---------------------------
--------------------------- M:587698 [ci4]>SET GLOBAL max_binlog_stmt_cache_size = 18446744073709547520; M:587698 [ci4]>SHOW VARIABLES LIKE 'max_binlog_stmt_cache_size%';
---------------------------
--------------------------- |