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

'INSERT...SELECT' on MyISAM table suddenly replicated by Galera

    XMLWordPrintable

Details

    Description

      When having local MyISAM tables on Galera cluster nodes, and the experimental MyISAM replication feature NOT enabled, no DML events for MyISAM tables are replicated with MariaDB 10.6 up to 10.6.17, as expected.

      Starting with 10.6.18 though,

      INSERT INTO ... VALUES(...)

      is not replicated, as expected, but

      INSERT INTO ... SELECT ...

      now suddenly is.

      How to reproduce:

      • create a Galera Cluster using MariaDB 10.6.18, then:

      create table t1(id serial, val varchar(100)) engine=myisam;
      insert into t1 values(null, 'a');
      insert into t1 values(null, 'b');
      insert into t1 select null, 'c';
      insert into t1 select null, 'd' from t1;
      

      After that on the node the above was executed on, as expected:

      MariaDB [test]> select * from t1;
      +----+------+
      | id | val  |
      +----+------+
      |  1 | a    |
      |  3 | b    |
      |  4 | c    |
      |  5 | d    |
      |  6 | d    |
      |  7 | d    |
      +----+------+
      

      But on the other nodes, where only the CREATE TABLE statement should have been replicated:

      MariaDB [test]> select * from t1;
      +----+------+
      | id | val  |
      +----+------+
      |  1 | c    |
      |  2 | d    |
      +----+------+
      

      Note that there is only one row with a 'd' in the 'val' column, not four.

      So looks as if the INSERT...SELECT was replicated in STATEMENT format.

      But looking at the binlog written on the original node everything was logged in ROW format there as expected:

      root@node-1:/var/lib/mysql# mysqlbinlog mysqld-bin.000003 | grep -i insert
      #Q> insert into t1 values(null, 'a')
      #Q> insert into t1 values(null, 'b')
      #Q> insert into t1 select null, 'c'
      #Q> insert into t1 select null, 'd' from t1
      

      I assume this is somehow related to MDEV-33979? Or is it actually caused by the new Galera 26.4.18 version being used by 10.6.18?

      Attachments

        Issue Links

          Activity

            People

              sysprg Julius Goryavsky
              hholzgra Hartmut Holzgraefe
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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