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

CREATE TABLE IF NOT EXISTS not written to binlog when table already exists (regression from 5.5/10.1)

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • Replication
    • None

    Description

      CREATE TABLE IF NOT EXISTS on an existing table is not written to the binlog in MariaDB 10.11.14, meaning the statement never reaches replicas

      This worked in MariaDB 5.5.68 and was explicitly tested and expected to work in MDEV-7817 (commit 90f2c82, 2015)

      test scenario:
      1. on master: CREATE TABLE IF NOT EXISTS aaa (b VARCHAR(5));
      2. on slave: table appears via binglog, manually delete the table
      3. on master: CREATE TABLE IF NOT EXISTS aaa (b VARCHAR(5));
      4. on slave: table does not appear

      Note it happens regardless of binlog_do_db — tested with and without
      binlog_format=ROW, sql_log_bin=ON

      Reference MDEV-7817 as the precedent fix for the same class of bug (ALTER TABLE IF NOT EXISTS), and note that the existing create_drop_binlog test expects this to work

      Attachments

        Activity

          People

            bnestere Brandon Nesterenko
            janwinkler Jan Winkler
            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.