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

FLUSH [RELAY] LOGS does not rotate logs for a named slave

    XMLWordPrintable

Details

    • 10.1.22

    Description

      FLUSH LOGS and FLUSH RELAY LOGS rotate relay logs for a usual anonymous slave, but not for a named one.

      Test case

      --source include/master-slave.inc
       
      --connection slave
      --let $datadir=`select @@datadir`
       
      --echo #
      --echo # Try traditional slave first:
      --echo #
       
      --list_files $datadir *relay*
      flush logs;
      --list_files $datadir *relay*
      flush relay logs;
      --list_files $datadir *relay*
       
      stop slave;
      reset slave all;
       
      --echo #
      --echo # Now try a named slave:
      --echo #
       
      eval change master 'm1' to master_host='127.0.0.1', master_port=$MASTER_MYPORT, master_user='root';
      start slave 'm1';
       
      --list_files $datadir *relay*
      flush logs;
      --list_files $datadir *relay*
      flush relay logs;
      --list_files $datadir *relay*

      Results

      #
      # Try traditional slave first:
      #
      relay-log.info
      slave-relay-bin.000001
      slave-relay-bin.000002
      slave-relay-bin.index
      flush logs;
      relay-log.info
      slave-relay-bin.000001
      slave-relay-bin.000002
      slave-relay-bin.000003
      slave-relay-bin.index
      flush relay logs;
      relay-log.info
      slave-relay-bin.000002
      slave-relay-bin.000003
      slave-relay-bin.000004
      slave-relay-bin.index
      stop slave;
      reset slave all;
      #
      # Now try a named slave:
      #
      change master 'm1' to master_host='127.0.0.1', master_port=16000, master_user='root';
      start slave 'm1';
      relay-log-m1.info
      slave-relay-bin-m1.000001
      slave-relay-bin-m1.index
      flush logs;
      relay-log-m1.info
      slave-relay-bin-m1.000001
      slave-relay-bin-m1.index
      flush relay logs;
      relay-log-m1.info
      slave-relay-bin-m1.000001
      slave-relay-bin-m1.index

      Attachments

        Issue Links

          Activity

            People

              plinux Lixun Peng
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.