[Commits] Rev 4430: MDEV-7478 log-basename unpredictable behavior in standalone mode in lp:~maria-captains/maria/5.5

Sergei Golubchik serg at mariadb.org
Tue Feb 10 16:07:57 EET 2015


At lp:~maria-captains/maria/5.5

------------------------------------------------------------
revno: 4430
revision-id: sergii at pisem.net-20150209195336-0wes7aej18024843
parent: sergii at pisem.net-20150209195328-2i18dpx3v0upb588
fixes bug: https://mariadb.atlassian.net/browse/MDEV-7478
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 5.5
timestamp: Mon 2015-02-09 20:53:36 +0100
message:
  MDEV-7478 log-basename unpredictable behavior in standalone mode
  
  * fix /etc/init.d/mysql to use log-basename for pid-filename
  * fix mysqld_safe not to force logging-to-file when log-basename is specified
=== modified file 'scripts/mysqld_safe.sh'
--- a/scripts/mysqld_safe.sh	2015-01-19 16:18:24 +0000
+++ b/scripts/mysqld_safe.sh	2015-02-09 19:53:36 +0000
@@ -28,6 +28,7 @@ syslog_tag=
 user='@MYSQLD_USER@'
 pid_file=
 err_log=
+err_log_base=
 
 syslog_tag_mysqld=mysqld
 syslog_tag_mysqld_safe=mysqld_safe
@@ -208,7 +209,7 @@ parse_arguments() {
       --user=*) user="$val"; SET_USER=1 ;;
       --log-basename=*|--hostname=*|--loose-log-basename=*)
         pid_file="$val.pid";
-	err_log="$val.err";
+	err_log_base="$val";
 	;;
 
       # these might have been set in a [mysqld_safe] section of my.cnf
@@ -577,7 +578,16 @@ then
       * ) err_log="$DATADIR/$err_log" ;;
     esac
   else
-    err_log=$DATADIR/`@HOSTNAME@`.err
+    if [ -n "$err_log_base" ]
+    then
+      err_log=$err_log_base.err
+      case "$err_log" in
+        /* ) ;;
+        * ) err_log="$DATADIR/$err_log" ;;
+      esac
+    else
+      err_log=$DATADIR/`@HOSTNAME@`.err
+    fi
   fi
 
   append_arg_to_args "--log-error=$err_log"

=== modified file 'support-files/mysql.server.sh'
--- a/support-files/mysql.server.sh	2014-07-26 21:08:38 +0000
+++ b/support-files/mysql.server.sh	2015-02-09 19:53:36 +0000
@@ -146,6 +146,9 @@ parse_server_arguments() {
       --datadir=*)  datadir=`echo "$arg" | sed -e 's/^[^=]*=//'`
 		    datadir_set=1
 	;;
+      --log-basename=*|--hostname=*|--loose-log-basename=*)
+        mysqld_pid_file_path=`echo "$arg.pid" | sed -e 's/^[^=]*=//'`
+	;;
       --pid-file=*) mysqld_pid_file_path=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
       --service-startup-timeout=*) service_startup_timeout=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
     esac



More information about the commits mailing list