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

SET STATEMENT default_master_connection = ... has no effect

    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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              sanja Oleksandr Byelkin added a comment -

              The variable is prohibited in SET STATEMENT for now.

              Show
              sanja Oleksandr Byelkin added a comment - The variable is prohibited in SET STATEMENT for now.
              Hide
              sanja Oleksandr Byelkin added a comment -

              default_master_connection as a defult set in sql_yacc.yy (i.e. in parser).

              Show
              sanja Oleksandr Byelkin added a comment - default_master_connection as a defult set in sql_yacc.yy (i.e. in parser).
              Hide
              sanja Oleksandr Byelkin added a comment -

              revision-id: 8bae7b66a911ad4f275a146fe8a23c8fa3e8d387
              parent(s): da181fee4ec849985b15a758c6b26058a0f5e318
              committer: Oleksandr Byelkin
              branch nick: server
              timestamp: 2015-02-26 11:23:30 +0100
              message:

              MDEV-6956:SET STATEMENT default_master_connection = ... has no effect

              the problem was in assigning default value during parsing.

              Show
              sanja Oleksandr Byelkin added a comment - revision-id: 8bae7b66a911ad4f275a146fe8a23c8fa3e8d387 parent(s): da181fee4ec849985b15a758c6b26058a0f5e318 committer: Oleksandr Byelkin branch nick: server timestamp: 2015-02-26 11:23:30 +0100 message: MDEV-6956 :SET STATEMENT default_master_connection = ... has no effect the problem was in assigning default value during parsing.
              Hide
              sanja Oleksandr Byelkin added a comment -

              revision-id: 6c772ae62a0a43ea227f491509c02efb99c5ce92
              parent(s): da181fee4ec849985b15a758c6b26058a0f5e318
              committer: Oleksandr Byelkin
              branch nick: server
              timestamp: 2015-03-06 15:51:51 +0100
              message:

              MDEV-6956:SET STATEMENT default_master_connection = ... has no effect

              the problem was in assigning default value during parsing.

              Show
              sanja Oleksandr Byelkin added a comment - revision-id: 6c772ae62a0a43ea227f491509c02efb99c5ce92 parent(s): da181fee4ec849985b15a758c6b26058a0f5e318 committer: Oleksandr Byelkin branch nick: server timestamp: 2015-03-06 15:51:51 +0100 message: MDEV-6956 :SET STATEMENT default_master_connection = ... has no effect the problem was in assigning default value during parsing.

                People

                • Assignee:
                  sanja Oleksandr Byelkin
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 10 minutes
                    10m