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

CREATE / DROP SERVER statements are not written to the binary log

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.0.0, 5.5.25, 5.1.62
    • 5.5(EOL)
    • None

    Description

      Also reproducible on MySQL versions and filed as http://bugs.mysql.com/bug.php?id=66708

      In 5.5 and 10.0, CREATE / DROP SERVER statements are not written to the binary log at all, and neither are the changes to mysql.servers table. In 5.1, in ROW binlog format, mysql.servers table changes are logged (which is not good, and was apparently fixed in 5.5+, but the statement replication, usual for DDL, wasn't enabled).

      Test output from 5.5:

       
      SET binlog_format = STATEMENT;
      CREATE SERVER s1 FOREIGN DATA WRAPPER mysql
      OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
      DROP SERVER s1;
      SHOW BINLOG EVENTS;
      Log_name        Pos     Event_type      Server_id       End_log_pos     Info
      master-bin.000001       4       Format_desc     1       245     Server ver: 5.5.25-MariaDB-log, Binlog ver: 4
      SET binlog_format = MIXED;
      CREATE SERVER s2 FOREIGN DATA WRAPPER mysql
      OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
      DROP SERVER s2;
      SHOW BINLOG EVENTS;
      Log_name        Pos     Event_type      Server_id       End_log_pos     Info
      master-bin.000001       4       Format_desc     1       245     Server ver: 5.5.25-MariaDB-log, Binlog ver: 4
      SET binlog_format = ROW;
      CREATE SERVER s3 FOREIGN DATA WRAPPER mysql
      OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
      DROP SERVER s3;
      SHOW BINLOG EVENTS;
      Log_name        Pos     Event_type      Server_id       End_log_pos     Info
      master-bin.000001       4       Format_desc     1       245     Server ver: 5.5.25-MariaDB-log, Binlog ver: 4

      Test case:

      --source include/have_log_bin.inc
       
      SET binlog_format = STATEMENT;
       
      CREATE SERVER s1 FOREIGN DATA WRAPPER mysql
        OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
      DROP SERVER s1;
       
      SHOW BINLOG EVENTS;
       
      SET binlog_format = MIXED;
       
      CREATE SERVER s2 FOREIGN DATA WRAPPER mysql
        OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
      DROP SERVER s2;
       
      SHOW BINLOG EVENTS;
       
      SET binlog_format = ROW;
       
      CREATE SERVER s3 FOREIGN DATA WRAPPER mysql
        OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
      DROP SERVER s3;
       
      SHOW BINLOG EVENTS;
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            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.