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

RESET SLAVE ALL should remove all slave related configurations

    XMLWordPrintable

Details

    Description

      RESET SLAVE ALL should delete all the slave configurations from the server.

      source include/have_ssl_communication.inc;
      source include/master-slave.inc;
       
      # create a user for replication that requires ssl encryption
      connection master;
      create user replssl@localhost;
      grant replication slave on *.* to replssl@localhost require ssl;
      create table t1 (t int auto_increment, KEY(t));
       
      sync_slave_with_master;
       
      # Set slave to use SSL for connection to master
      stop slave;
      --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
      eval change master to
        master_user='replssl',
        master_password='',
        master_ssl=1,
        master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem',
        master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem',
        master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem';
      start slave;
       
      # Switch to master and insert one record, then sync it to slave
      connection master;
      insert into t1 values(1);
      sync_slave_with_master;
       
      --query_vertical SHOW SLAVE STATUS
       
      STOP SLAVE;
      --sleep 3
      RESET SLAVE ALL;
       
      ####################
      # Here, we can see that master.info is deleted 
      # Start a fresh slave
       
       
      change master to
        master_user='replssl',
        master_password='', master_host='localhost';
       
       
      START SLAVE;
       
      --sleep 3
       
      ####### Observe that SHOW SLAVE STATUS shows SSL options
      --query_vertical SHOW SLAVE STATUS
      
      

      Here we see SSL options even after RESET SLAVE ALL(Fresh start of slave)

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              Deepthi ES Deepthi Eranti Sreenivas
              Votes:
              1 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.