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

mysqldump --dump-slave fails with multi-source replication

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.2
    • Fix Version/s: 10.0.9
    • Component/s: None
    • Labels:
    • Environment:
      Centos 6.2 (deployed via pre-compiled archive)

      Description

      mysqldump --dump-slave fails with multi-source replication because it tries to run stop/start slave statement.

      [mysql@centos ~ ] $ mysqldump --dump-slave --all-databases > /dev/null
      mysqldump: Couldn't execute 'START SLAVE': The server is not configured as slave; fix in config file or with CHANGE MASTER TO (1200)
      [mysql@centos ~ ] $
      

      I have replication setup from 4 masters but mysqldump thinks mysqld isn't a slave probably because SHOW SLAVE STATUS returns no row:

      [mysql@centos ~ ] $ mysql -e 'show slave status' | wc -l
      0
      [mysql@centos ~ ] $ mysql -e 'show all slaves status' | wc -l
      4
      [mysql@centos ~ ] $ 
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              That's right, SHOW SLAVE STATUS and START SLAVE in these forms operate with the default_master_connection, which, in turn, is an empty string by default; so if all connections are named, SHOW SLAVE STATUS will return nothing, and START SLAVE will fail.

              Apparently, mysqldump will need to somehow figure out the list of configured master connections and apply the dump-slave logic to each of them in turn (to create proper CHANGE MASTER .. statements).
              It should also be taken into account with apply-slave-statements option.

              Show
              elenst Elena Stepanova added a comment - That's right, SHOW SLAVE STATUS and START SLAVE in these forms operate with the default_master_connection, which, in turn, is an empty string by default; so if all connections are named, SHOW SLAVE STATUS will return nothing, and START SLAVE will fail. Apparently, mysqldump will need to somehow figure out the list of configured master connections and apply the dump-slave logic to each of them in turn (to create proper CHANGE MASTER .. statements). It should also be taken into account with apply-slave-statements option.
              Hide
              monty Michael Widenius added a comment -

              Fix pushed into 10.0-monty tree. Will be merged to 10.0 when Elena gives ok

              Show
              monty Michael Widenius added a comment - Fix pushed into 10.0-monty tree. Will be merged to 10.0 when Elena gives ok

                People

                • Assignee:
                  monty Michael Widenius
                  Reporter:
                  laurent.k Laurent Kolakofsky
                • Votes:
                  3 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: