List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:May 5 2009 3:16pm
Subject:bzr commit into mysql-6.0 branch (guilhem:2756) Bug#40368
View as plain text  
#At file:///home/mysql_src/bzrrepos/mysql-6.0-maria2/ based on
revid:serg@stripped

 2756 Guilhem Bichot	2009-05-05
      Fix for BUG#40368 "mysqld_safe not honouring underscore same as dash on server
options".
      Such bug led "mysqld_safe --core_file_size=#" to not work because mysqld_safe
wouldn't recognize
      that "ulimit -c" is needed; only --core-file-size=# worked. Same for
--open_files_limit and other
      options with _ where mysqld_safe needs to do something more than passing to mysqld.
      Original fix by Erik Ljungstrom erik at ibiblio dot org ; slightly modified here.
      Tested on all internally accessible Unix.

    modified:
      scripts/mysqld_safe.sh
=== modified file 'scripts/mysqld_safe.sh'
--- a/scripts/mysqld_safe.sh	2009-03-18 21:59:44 +0000
+++ b/scripts/mysqld_safe.sh	2009-05-05 13:16:09 +0000
@@ -155,7 +155,13 @@ parse_arguments() {
   fi
 
   for arg do
-    val=`echo "$arg" | sed -e "s;--[^=]*=;;"`
+    # the parameter after "=", or the whole $arg if no match
+    val=`echo "$arg" | sed -e 's;^--[^=]*=;;'`
+    # what's before "=", or the whole $arg if no match
+    optname=`echo "$arg" | sed -e 's/^\(--[^=]*\)=.*$/\1/'`
+    # replace "_" by "-" ; mysqld_safe must accept "_" like mysqld does.
+    optname_subst=`echo "$optname" | sed 's/_/-/g'`
+    arg=`echo $arg | sed "s/^$optname/$optname_subst/"`
     case "$arg" in
       # these get passed explicitly to mysqld
       --basedir=*) MY_BASEDIR_VERSION="$val" ;;


Attachment: [text/bzr-bundle] bzr/guilhem@mysql.com-20090505131609-ffvcp3i0px86d5z7.bundle
Thread
bzr commit into mysql-6.0 branch (guilhem:2756) Bug#40368Guilhem Bichot5 May 2009