[MDEV-18877] Trigger in replication master-master mariadb Created: 2019-03-10  Updated: 2023-04-27

Status: Stalled
Project: MariaDB Server
Component/s: Replication, Triggers
Affects Version/s: 10.3.9, 10.3.12
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: nhokworm Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Debian Jessie



 Description   

There are 2 master (A, B) replication and 1 database that have 2 table (TB1, TB2). I have configed replication as below:

Master A
server-id = 1
log_bin = /var/log/mysql/mariadb-bin
log_bin_index = /var/log/mysql/mariadb-bin.index
binlog_do_db = TB1
binlog_format = ROW
slave_run_triggers_for_rbr = YES
replicate_do_table = TB2
relay_log = /var/log/mysql/relay-bin

Master B
server-id = 2
log_bin = /var/log/mysql/mariadb-bin
log_bin_index = /var/log/mysql/mariadb-bin.index
binlog_do_db = TB2
binlog_format = ROW
slave_run_triggers_for_rbr = YES
replicate_do_table = TB1
relay_log = /var/log/mysql/relay-bin

And trigger on B
CREATE TRIGGER TB1
AFTER UPDATE ON TB1
FOR EACH ROW
BEGIN
UPDATE TB2;
END

I want to run "update TB1 on master A -> update TB1 on master B -> update TB2 on master B -> update TB2 on master A". But "update TB2 on master B -> update TB2 on master A" is not work. Besides, I tried run "update TB1 on master B -> update TB2 on master B -> update TB2 on master A" that is work. How do I fix this?



 Comments   
Comment by Elena Stepanova [ 2019-03-11 ]

For the time being, JIRA is a bug-tracking system which handles bug reports and feature requests. If you need advice with your configuration, please seek it from mailing lists, IRC and other community resources. You might also consider acquiring a support contract. If you already have one, please file a ticket there.

Comment by nhokworm [ 2019-03-12 ]

Yes, I know. But I think it is bug, because I tried configuring 4 situation for slave_run_triggers_for_rbr ((YES, YES), (YES, LOGGING), (LOGGING, LOGGING), (LOGGING, YES)) that is global variable to enable trigger on slave. Or it is new request if mariadb don't support trigger in multi master.

Comment by Elena Stepanova [ 2019-03-12 ]

Assigning in case Elkin wants to have a look.

Generated at Thu Feb 08 08:47:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.