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

"unknown error" with FLUSH LOGS if log directory is not writeable

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3.9
    • 10.3.15, 10.4.5
    • Server
    • None

    Description

      This actually only happens on log rotation, not on simple flush with the log file(s) still in place.

      When doing a log rotate by first renaming the log file, then calling FLUSH LOGS, the open() call by flush actually needs to re-create the log file under its own name, and that rightfully fails if the mysql user does not have write permission on the directory.

      The problem though is that it just reports "Unknown error" instead of "Can't create logfile $path" plus the correct error code, e.g. "errno 13: permission denied"

      How to reproduce:

      cd $datadir
      mv *.err old_error_log
      chmod a-w .
      mysql -e "FLUSH LOGS;"
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            hholzgra Hartmut Holzgraefe
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.