mysqlmy.cnf

Gtid Position difference between MariaDB version


I got an issue in our project during the MariaDB upgrade from 10.2.18 to 10.2.27 in my project, which caused problem during the start of Database Replication.

On analyzing, I could see a weird behavior during MariaDB Installation with the below my.cnf.

I tried to reproduce the scenario as simple as possible by a shell script with the below simplified my.cnf file.

[mysqld]
server-id=1
log-bin=binary-log.
binlog-ignore-db=mysql
binlog-ignore-db=performance_schema

from where I could see the difference in the output of gtid_positions in v10.2.18 where first 3 positions are null while in v10.2.27 it has 0-1-1.

Code: https://jira.mariadb.org/secure/attachment/49300/mariaTest.sh

Output: https://jira.mariadb.org/secure/attachment/49299/49299_DifferenceInPositionsBWTwoVersions.png

As part of my analysis, I could see the above difference only after adding "log-bin=binary-log." properties in my cnf file. while without the property I could not see the above difference. Confused about the behavior after adding this property.

Can you please clarify the above behavior? Why the position get affected after adding "log-bin"?

Or Is there any mistake I am doing in the my.cnf file?


Solution

  • Raised the same question as MariaDB ticket https://jira.mariadb.org/browse/MDEV-20990

    On reading the binlog, we could see a DDL transaction is considered at the start of the installation for 10.2.27 MariaDB (created a test database) ...while it is not considered in 10.2.18 MariaDB.

    As per the comment, yes the above difference seems to be expected in the MariaDB latest version due to the fix MDEV-17640.

    Solved: Added test DB for replication ignore with below property in my.cnf file

    ***binlog-ignore-db = test***