Bug #103400 log_bin_index status var is incorrect if log_bin_index config contains periods

Submitted: 21 Apr 2021 11:47 Modified: 21 Apr 2021 13:00
Reporter: Kenn Takara Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.7.28,8.0.22, 5.7.34, 8.0.24 OS:Any
Assigned to: CPU Architecture:Any

[21 Apr 2021 11:47] Kenn Takara
Description:
If the log_bin_index is set with a name that contains periods (and the file extension is not .index), then the log_bin_index variable will contain an incorrect path.

RESULT
It will contain a file path that doesn't exist.  For instance, if I set "log_bin_index=mysql.index.binlog", then a "select @@log_bin_index" will return a path to mysql.index

EXPECT
I expect that the log_bin_index will contain a valid path to the binlog index file.

How to repeat:
(1) In the config
    log-bin
    log_bin_index=mysql.index.binlog
(2) Start the server
(3) Create some data

RESULT
Check the binlog files
    - The mysql.index.binlog will exist and contain a list of binlogs
Check the log_bin_index variable "select @@log_bin_index"
    - This will contain a path to "mysql.index" which does not exist

EXPECT
    - "select @@log_bin_index" to return a valid path and to
    return the binlog index filepath.

Suggested fix:
Have the log_bin_index variable return a valid path.

And clear up the documentation on the behavior (when is .index added).
[21 Apr 2021 11:49] Kenn Takara
MTR test case

Attachment: percona_binlog_index.test (application/octet-stream, text), 435 bytes.

[21 Apr 2021 11:49] Kenn Takara
MTR test case config file

Attachment: percona_binlog_index.cnf (application/octet-stream, text), 351 bytes.

[21 Apr 2021 11:50] Kenn Takara
MTR test case added to show the issue.
[21 Apr 2021 13:00] MySQL Verification Team
Hello Kenn,

Thank you for the report and test case.

regards,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.055 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.