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

mysqldump will not backup database with --flush-logs parameter and log_error my.cnf parameter defined

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.5.37, 10.0.10
    • Fix Version/s: 10.0.16, 5.5.42
    • Component/s: Scripts & Clients
    • Labels:
    • Environment:
      Linux 32-bit, Debian Wheezy 7.5, MariaDB installed from MariaDB repository

      Description

      If you enabled log_error in my.cnf, eg.

      log_error=/var/log/mysql/error.log
      

      and specify mysqldump to backup with the --flush-logs parameter, then mysqldump will not dump anything.
      This was tested on a master replication server. After enabling the log_error parameter, mysqldump will not backup anything. After removing the --flush-logs parameter or removing log_error from my.cnf and restarting server, the dump takes place. The full command line used for mysqldump is:

      mysqldump -v -F --create-options -e -E -R --master-data=2 --single-transaction -Q -u root --default-character-set=utf8 -p -r db.sql db
      

      As a sidenote, is --flush-logs needed in such a case?

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              lourdas_v Vasilis Lourdas added a comment -

              I don't feel like reporting the bug to Oracle's issue tracker, they've always been slow at responding or providing any feedback regarding issues. If you feel like reporting the bug, feel free to do so. However, from your reply I understand that you already found out the cause of this issue. Why don't you patch the source code in the MariaDB tree and have this issue fixed in the next release?

              Show
              lourdas_v Vasilis Lourdas added a comment - I don't feel like reporting the bug to Oracle's issue tracker, they've always been slow at responding or providing any feedback regarding issues. If you feel like reporting the bug, feel free to do so. However, from your reply I understand that you already found out the cause of this issue. Why don't you patch the source code in the MariaDB tree and have this issue fixed in the next release?
              Hide
              elenst Elena Stepanova added a comment -

              Maybe we will, but we should report it to them anyway, for the sake of collaboration. I'll do that.
              I didn't find the exact cause of the issue yet, I have some general suspicions, but it will require some more investigation. Apparently it has something to do with the interaction between syslog and the usual log, and possibly with the service or the way it starts mysqld_safe / mysqld, and with how they open logs.

              Show
              elenst Elena Stepanova added a comment - Maybe we will, but we should report it to them anyway, for the sake of collaboration. I'll do that. I didn't find the exact cause of the issue yet, I have some general suspicions, but it will require some more investigation. Apparently it has something to do with the interaction between syslog and the usual log, and possibly with the service or the way it starts mysqld_safe / mysqld, and with how they open logs.
              Hide
              elenst Elena Stepanova added a comment -

              I could reproduce it on MySQL 5.1 and 5.5 from the official repo (filed as http://bugs.mysql.com/bug.php?id=72598), but not on MySQL 5.6 from dotdeb repo. If it's not just the packaging difference, but the problem was actually fixed in 5.6, there's no chance it will be fixed in earlier versions, so we'll need to do it on our own anyway.

              Show
              elenst Elena Stepanova added a comment - I could reproduce it on MySQL 5.1 and 5.5 from the official repo (filed as http://bugs.mysql.com/bug.php?id=72598 ), but not on MySQL 5.6 from dotdeb repo. If it's not just the packaging difference, but the problem was actually fixed in 5.6, there's no chance it will be fixed in earlier versions, so we'll need to do it on our own anyway.
              Hide
              elenst Elena Stepanova added a comment -
              • install MySQL server from an official MariaDB repo (apt-get install mariadb-server);
              • make sure that --syslog is enabled in the special config file;
              • connect to the server and run FLUSH LOGS (works all right);
              • add log-error=<path-to-file> to /etc/mysql/my.cnf, [mysqld] section;
              • run /etc/init.d/mysql stop;
              • if the <path-to-file> already exists, remove the file (it might be not necessary, but existence of the file seemed to affect the experiments somehow);
              • run /etc/init.d/mysql start;
              • connect to the server and run FLUSH LOGS (fails)
              Show
              elenst Elena Stepanova added a comment - install MySQL server from an official MariaDB repo (apt-get install mariadb-server); make sure that --syslog is enabled in the special config file; connect to the server and run FLUSH LOGS (works all right); add log-error=<path-to-file> to /etc/mysql/my.cnf, [mysqld] section; run /etc/init.d/mysql stop; if the <path-to-file> already exists, remove the file (it might be not necessary, but existence of the file seemed to affect the experiments somehow); run /etc/init.d/mysql start; connect to the server and run FLUSH LOGS (fails)
              Hide
              lourdas_v Vasilis Lourdas added a comment -

              Is there some progress regarding this issue? I'm using 5.5.41 from MariaDB's official Debian repository and the issue still exists.

              Show
              lourdas_v Vasilis Lourdas added a comment - Is there some progress regarding this issue? I'm using 5.5.41 from MariaDB's official Debian repository and the issue still exists.

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  lourdas_v Vasilis Lourdas
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 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 - 15 minutes
                    15m