Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
2 node async cluster 10.6.14-9. rocky 8.9
Description
The memory engine automatically runs a DELETE statement (after replica restarted) when accessed on the replica node, breaking replication if gtid_strict_mode=ON.
the replica runs delete twice, once via replication and another locally which breaks replication
Reproduction:
# setup at least a 2 node cluster w/ replication & gtid_strict_mode=ON |
bash cs_package_manager.sh install enterprise 10.6.14-9 --nodes 172.31.47.230,172.31.40.126 |
|
# master
|
mariadb -e "create database test" |
mariadb test -e "create table t1 (id int) engine=aria" |
mariadb test -e "insert into t1 values (1)" |
mariadb test -e "select * from t1" |
mariadb -e "show variables like '%gtid_binlog%'" |
|
# replica - notice good
|
mariadb -e "show slave status\G" | grep -E "_Running|_Error|Gtid_IO_Pos" |
|
# master
|
systemctl restart mariadb
|
mariadb -e "show variables like '%gtid_binlog%'" |
|
# replica - notice good
|
mariadb -e "show slave status\G" | grep -E "_Running|_Error|Gtid_IO_Pos" |
|
# master
|
mariadb test -e "select * from t1" # expected to be empty |
mariadb -e "show variables like '%gtid_binlog%'" # expected to be incremented by 1 |
|
# replica - notice good
|
mariadb -e "show slave status\G" | grep -E "_Running|_Error|Gtid_IO_Pos" |
|
# NOW BREAK REPLICATION - this is the bug |
# replica
|
systemctl restart mariadb
|
mariadb -e "show slave status\G" | grep -E "_Running|_Error|Gtid_IO_Pos" # appears good |
mariadb -e "show variables like '%gtid_binlog%'" # appears good |
mariadb test -e "select * from t1" |
mariadb -e "show variables like '%gtid_binlog%'" # NOW BAD gtid_binlog_pos=0-2-18 |
|
# master
|
mariadb -e "create database test2" |
mariadb test2 -e "create table t2 (id int) engine=aria" |
# replica
|
mariadb -e "show slave status\G" | grep -E "_Running|_Error|Gtid_IO_Pos" # replication now shows bad |
Workaround:
Disable gtid_strict_mode
Attachments
Issue Links
- duplicates
-
MDEV-29796 Auto-generated DELETE for MEMORY/HEAP table can break GTID-based replication
- Open