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

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

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • Hide
      mariadb-dump with option --dump-slave could change the state of a server because it would always start all slave threads after the database dump finished. That is, if a server had any stopped slave threads around when the dump process started, then when the dump finished, it would invalidly start them. This patch fixes this so only slave threads which were already running before taking the dump would be restarted.
      Show
      mariadb-dump with option --dump-slave could change the state of a server because it would always start all slave threads after the database dump finished. That is, if a server had any stopped slave threads around when the dump process started, then when the dump finished, it would invalidly start them. This patch fixes this so only slave threads which were already running before taking the dump would be restarted.
    • Q3/2025 Maintenance

    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

        Issue Links

          Activity

            People

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