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

[PATCH] mysqldump --dump-slave always starts stopped slave

Details

    Description

      When making a dump with --dump-slave option, upon completion mysqldump starts slave threads even if they were not stopped by mysqldump itself. This behavior breaks delayed/manually synchronized slaves which have not to be running all the time. Please consider implementing additional check(s) for that, like in the attached patch.

      P.S. The comment /* if SLAVE SQL is not running, we don't start it */ in do_start_slave_sql() is opposite and misleading.

      Attachments

        Activity

          smax,

          Thanks for the report and the patch.

          serg,

          Technically it's an upstream bug, but it's been in 'verified' for 3 years with no progress, maybe it makes sense not to wait and just to apply the patch?

          elenst Elena Stepanova added a comment - smax , Thanks for the report and the patch. serg , Technically it's an upstream bug, but it's been in 'verified' for 3 years with no progress, maybe it makes sense not to wait and just to apply the patch?
          robo Robert Oliver added a comment -

          I think this is not an upstream bug anymore.
          Can it be fixed in mariadb-dump now?

          robo Robert Oliver added a comment - I think this is not an upstream bug anymore. Can it be fixed in mariadb-dump now?

          Thanks. The patch is fine. It lacks a test case, but we can add it, don't bother.

          bnestere, could you check the whole idea once again? Is it the behavior we want to have?

          serg Sergei Golubchik added a comment - Thanks. The patch is fine. It lacks a test case, but we can add it, don't bother. bnestere , could you check the whole idea once again? Is it the behavior we want to have?

          Seems good to me. ParadoxV5, this is a good opportunity to learn a bit about mysqldump. Can you take over for the patch, and create the test case?

          bnestere Brandon Nesterenko added a comment - Seems good to me. ParadoxV5 , this is a good opportunity to learn a bit about mysqldump. Can you take over for the patch, and create the test case?
          ParadoxV5 Jimmy HĂș added a comment -

          Not good.
          It cannot be a single global boolean for multi-source replication (est. MariaDB 10.0).

             /* Loop over all slaves */
            while ((row= mysql_fetch_row(slave)))
          

          This patch (made for 5.5, I presume) is outdated.

          ParadoxV5 Jimmy HĂș added a comment - Not good. It cannot be a single global boolean for multi-source replication (est. MariaDB 10.0). /* Loop over all slaves */ while ((row= mysql_fetch_row(slave))) This patch (made for 5.5, I presume) is outdated.
          ParadoxV5 Jimmy HĂș added a comment -

          Hmph, no multi-source mariadb-dump tests either.

          ParadoxV5 Jimmy HĂș added a comment - Hmph, no multi-source mariadb-dump tests either.
          ParadoxV5 Jimmy HĂș added a comment -

          https://github.com/MariaDB/server/pull/3780

          I have a question about our internal APIs.
          The rest are ready for review in the meantime.

          ParadoxV5 Jimmy HĂș added a comment - https://github.com/MariaDB/server/pull/3780 I have a question about our internal APIs. The rest are ready for review in the meantime.

          Review done, left a couple notes on the PR

          bnestere Brandon Nesterenko added a comment - Review done, left a couple notes on the PR

          People

            ParadoxV5 Jimmy HĂș
            smax Max Samoilenko
            Votes:
            1 Vote for this issue
            Watchers:
            8 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.