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

SET STATEMENT default_master_connection = ... has no effect

    XMLWordPrintable

Details

    Description

      default_master_connection defines which slave (in a multi-source replication) anonymous commands will be applied to. It does not work with SET STATEMENT (works in the same cases if it's set via normal SET). See comments in the test case for details.

      Test case

      --source include/master-slave.inc
       
      --connection slave
       
      --source include/stop_slave.inc
      RESET SLAVE ALL;
       
      --echo # Does not work for CHANGE MASTER:
       
      eval SET STATEMENT default_master_connection = 'm1' FOR 
        CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root';
       
       
      --echo #
      --echo # The first field, Connection_name, should say 'm1'...
      --echo #
      query_vertical SHOW ALL SLAVES STATUS;
      --echo #
      --echo # but it doesn't.
      --echo #
       
       
      RESET SLAVE ALL;
       
      --echo # Does not work for START SLAVE:
       
      eval CHANGE MASTER 'm1' TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root';
      --echo #
      --echo # START SLAVE should be applied to 'm1', but it tries to find the anonymous slave instead (and fails):
      --echo #
      SET STATEMENT default_master_connection = 'm1' FOR START SLAVE;

      commit e64f5d8f758bcc1a8856ba9fba01780533f80747
      Author: Oleksandr Byelkin <sanja@mariadb.com>
      Date:   Sun Oct 26 16:27:54 2014 +0100
       
          Fixed test suite global variable saving

      Percona server does not have this functionality and variable, so nothing to compare with.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.