List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 19 1999 11:20am
Subject:mysql distribution script bugs!
View as plain text  
>>>>> "James" == James Briggs <briggsja@stripped> writes:

James> Here's 2 annoying mysql distribution script bugs:
James> 1) mysql_install_db bug report for 3_22_26a:

James> ldata is set 3 times, twice to the wrong values!
James> instead, execdir and bindir should be set.

James> #########

James> if test -f "$conf"
James> then
James>   if grep "^datadir" $conf >/dev/null
James>   then
James>     ldata=`grep "^datadir" $conf | cut -f 2 -d=`
James>   fi
James>   if grep "^execdir" $conf >/dev/null
James>   then
James>     ldata=`grep "^execdir" $conf | cut -f 2 -d=` # here
James>   fi
James>   if grep "^bindir" $conf >/dev/null
James>   then
James>     ldata=`grep "^bindir" $conf | cut -f 2 -d=` # and here
James>   fi
James>   if grep "^user" $conf >/dev/null
James>   then
James>     user=`grep "^user" $conf | cut -f 2 -d=`
James>   fi
James> fi

Fixed.

James> 2) mysql.server 3_22_25 needs uniq
James>     ========================

James> line 44:

James> mysql_daemon_user = `grep "^user" $conf | cut -f 2 -d= | tr -d ' '`

James> this should at least read:

James> mysql_daemon_user = `grep "^user" $conf | cut -f 2 -d= | tr -d ' ' |
James> uniq`

James> in case of multiple user= entries in my.cnf.

I added a '| head -1' instead.

James> This is true in general for uses of your grep technique, so there's
James> about 2 more of these.

'user' is probably the only one of the user options that could be in
more than one place in the my.cnf file.

Thanks for the bug report!

Regards,
Monty
Thread
mysql distribution script bugs!(James Briggs)18 Sep
  • mysql distribution script bugs!Michael Widenius19 Sep