Gtid Position difference between MariaDB version

坚强是说给别人听的谎言 提交于 2021-01-29 18:53:16

问题


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?


回答1:


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***


来源:https://stackoverflow.com/questions/58556332/gtid-position-difference-between-mariadb-version

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!