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

Unexpected behavior of --binlog-info option in mariabackup

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6, 10.11, 11.4, 12.2, 11.8
    • 10.11, 11.4, 12.2, 11.8
    • mariabackup
    • None

    Description

      According to the documentation, binlog-info option takes an optional argument (on|off|auto), and is off by default, but is set to auto when the option is provided without an argument.

      However, in reality the behavior is reverse.
      When the option is not provided at all, it works as if it is "auto" (or "on") by default, the info is stored; but if the option is provided without an argument, it switches to "off", the info is not stored.

      --source include/have_log_bin.inc
       
      create table t (a int);
      drop table t;
      flush binary logs;
       
      --echo ###############
      --echo # Help:
      --exec $XTRABACKUP --backup --help | grep binlog-info
       
       
      --exec $XTRABACKUP --backup --target-dir=$MYSQL_TMP_DIR/mbackup1 --socket=$MASTER_MYSOCK --user=root > $MYSQL_TMP_DIR/mbackup1.log 2>&1
       
      --echo ###############
      --echo # backup info
      --exec grep tool_command $MYSQL_TMP_DIR/mbackup1/*backup_info
      --echo ###############
      --echo # binlog info
      --list_files $MYSQL_TMP_DIR/mbackup1 *backup_binlog_info*
      --echo ###############
       
      --exec $XTRABACKUP --backup --binlog-info --target-dir=$MYSQL_TMP_DIR/mbackup2 --socket=$MASTER_MYSOCK --user=root > $MYSQL_TMP_DIR/mbackup2.log 2>&1
       
      --echo ###############
      --echo # backup info
      --exec grep tool_command $MYSQL_TMP_DIR/mbackup2/*backup_info
      --echo ###############
      --echo # binlog info
      --list_files $MYSQL_TMP_DIR/mbackup2 *backup_binlog_info*
      --echo ###############
      

      main 797f50d10743cb3b21a994ae61aeb753bd6f7237

      create table t (a int);
      drop table t;
      flush binary logs;
      ###############
      # Help:
        --binlog-info[=name] 
      binlog-info                       off
      ###############
      # backup info
      tool_command = --backup --target-dir=/local/main/mysql-test/var/tmp/mbackup1 --socket=/local/main/mysql-test/var/tmp/mysqld.1.sock --user=root
      ###############
      # binlog info
      mariadb_backup_binlog_info
      ###############
      ###############
      # backup info
      tool_command = --backup --binlog-info --target-dir=/local/main/mysql-test/var/tmp/mbackup2 --socket=/local/main/mysql-test/var/tmp/mysqld.1.sock --user=root
      ###############
      # binlog info
      ###############
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.