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

mysqld_safe may suppress error messages with --log-output=file

    XMLWordPrintable

Details

    • 10.2.11

    Description

      To verify the problem patch mysqld_safe like following:

      @@ -969,8 +961,6 @@
       have_sleep=1
       
       # close stdout and stderr, everything goes to $logging now
      +log_error this is error message before closing descriptors
      +log_notice this is notice message before closing descriptos
       if expr "${-}" : '.*x' > /dev/null
       then
         :
      @@ -979,9 +969,6 @@
         exec 2>&-
       fi
       
      +log_error this is error message after closing descriptors
      +log_notice this is notice message after closing descriptos
      +
       # maximum number of wsrep restarts
       max_wsrep_restarts=0
      

      Now start mysqld_safe with --log-error and observe output like below, which is expected:

      # mysqld_safe --log-error=/var/lib/mysql/test.err           
      171109 12:50:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
      171109 12:50:55 mysqld_safe this is error message before closing descriptors
      171109 12:50:55 mysqld_safe this is notice message before closing descriptos
      

      Now examine error log and observe that message 'error message after closing descriptors' is missing:

      # cat /var/lib/mysql/test.err
      171109 12:50:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
      171109 12:50:55 mysqld_safe this is error message before closing descriptors
      171109 12:50:55 mysqld_safe this is notice message before closing descriptos
      171109 12:50:55 mysqld_safe this is notice message after closing descriptos
      2017-11-09 12:50:55 140399771674752 [Note] /usr/sbin/mysqld (mysqld 10.2.10-MariaDB) starting as process 4649 ...
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              anikitin Andrii Nikitin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.