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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.3.9
    • Fix Version/s: 10.3.15, 10.4.5
    • Component/s: Server
    • Labels:
      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

            Assignee:
            serg Sergei Golubchik
            Reporter:
            hholzgra Hartmut Holzgraefe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: