Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-18877

Trigger in replication master-master mariadb

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3.9, 10.3.12
    • 10.4
    • Replication, Triggers
    • None
    • 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?

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            nhokworm nhokworm
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.