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

In STATEMENT format INSERT INTO SELECT FROM <ignored table> fails on slave

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.4, 12.0(EOL), 11.8
    • 11.4, 11.8
    • Replication
    • None

    Description

      In STATEMENT format we don't log CREATE TABLE or any data which we write into it if the table is part of binlog_ignore_db. But we log statements like INSERT INTO test.t1 SELECT * FROM ignoredDB.t2 which causes replication failure on slave.

      How to repeat?
      opt file:

      --binlog_ignore_db=ignoredDB
      --binlog_format=statement
      

      mtr test file:

      --source include/have_innodb.inc
      --source include/have_binlog_format_statement.inc
      --source include/master-slave.inc
       
      SELECT @@binlog_format;
      SELECT @@binlog_ignore_db;
       
      CREATE DATABASE ignoredDB;
      USE ignoredDB;
      CREATE TABLE t1 (id INT) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (1);
       
      USE test;
      CREATE TABLE t2 (id INT) ENGINE=InnoDB;
      INSERT INTO test.t2 SELECT * FROM ignoredDB.t1;
       
      --sync_slave_with_master
      --connection master
      --source include/rpl_end.inc
      

      Last_Errno	1146
      Last_Error	Error 'Table 'ignoredDB.t1' doesn't exist' on query. Default database: 'test'. Query: 'INSERT INTO test.t2 SELECT * FROM ignoredDB.t1'
      

      Expected behavior:
      In statement format we shouldn't log any query that uses objects from a binlog_ignore_db list.

      Attachments

        Activity

          People

            bnestere Brandon Nesterenko
            susil.behera Susil Behera
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.