[MDEV-10903] Strangeness with binlog_cache_size Settings Created: 2016-09-26  Updated: 2019-04-03  Resolved: 2019-04-03

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 5.5, 10.0, 10.1
Fix Version/s: 10.0.30, 10.1.22

Type: Bug Priority: Major
Reporter: Chris Calender (Inactive) Assignee: Sujatha Sivakumar (Inactive)
Resolution: Fixed Votes: 0
Labels: upstream-fixed


 Description   

I am seeing strage behavior with binlog_cache_size when trying to set it too large in the my.cnf file.

The behavior is similar to the bug regarding max_binlog_stmt_cache_size reported here:

https://jira.mariadb.org/browse/MDEV-4774

If you attempt to set binlog_cache_size to 18446744073709547520 via the my.cnf file, the max value per the manual, then your instance will not start, even though this can be set dynamically.

Set the following:

[mysqld]
binlog_cache_size=18446744073709547520

On Windows, the instance will not start, and nothing is logged.

On Linux, it also will not start, but at least you will see an error message similar to the following:

160922 11:45:45 [ERROR] Incorrect integer value: '18446744073709547520'
160922 11:45:45 [Warning] option 'binlog_cache_size': unsigned value 0 adjusted to 4096
160922 11:45:45 [ERROR] /rdsdbbin/mysql/bin/mysqld: Error while setting value '18446744073709547520' to 'binlog_cache_size'
160922 11:45:45 [ERROR] Aborting

As stated, this variable can be set dynamically:

mysql> select @@binlog_cache_size, @@version;
+---------------------+-----------------+
| @@binlog_cache_size | @@version       |
+---------------------+-----------------+
|               32768 | 10.1.16-MariaDB |
+---------------------+-----------------+
1 row in set (0.00 sec)
 
mysql> select @@global.binlog_cache_size, @@version;
+----------------------------+-----------------+
| @@global.binlog_cache_size | @@version       |
+----------------------------+-----------------+
|                      32768 | 10.1.16-MariaDB |
+----------------------------+-----------------+
1 row in set (0.00 sec)

mysql> set @@global.binlog_cache_size=18446744073709547520;
Query OK, 0 rows affected (0.00 sec)
 
mysql> select @@global.binlog_cache_size, @@version;
+----------------------------+-----------------+
| @@global.binlog_cache_size | @@version       |
+----------------------------+-----------------+
|       18446744073709547520 | 10.1.16-MariaDB |
+----------------------------+-----------------+
1 row in set (0.00 sec)



 Comments   
Comment by Elena Stepanova [ 2016-09-26 ]

Also reproducible with MySQL 5.5, but not 5.6/5.7.

Comment by Sujatha Sivakumar (Inactive) [ 2019-04-03 ]

Fix for MDEV-4774, has also fixed the current issue.

Method of verification:
Took latest 10.1 and tried to repeat the bug and I could not reproduce it. Analyzed the code path and observed that the MDEV-4774 fix actually fixed the current issue. By using git, pointed 10.1 repository to the code changes prior to MDEV-4774 fix and I was able to reproduce the issue. Hence concluded the issue as fixed and closing it.

Generated at Thu Feb 08 07:45:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.