Skip to content
Snippets Groups Projects
Commit 40155781 authored by intrigeri's avatar intrigeri
Browse files

Fix code logic to make dbusername/dbpassword actually usable (Closes Redmine bug #2264)

parent 9179c59b
No related branches found
No related tags found
No related merge requests found
...@@ -34,3 +34,4 @@ Olivier Berger <oberger@ouvaton.org> -- much work on the dup handler ...@@ -34,3 +34,4 @@ Olivier Berger <oberger@ouvaton.org> -- much work on the dup handler
stefan <s.freudenberg@jpberlin.de> -- dup support for Amazon S3 buckets stefan <s.freudenberg@jpberlin.de> -- dup support for Amazon S3 buckets
maniacmartin <martin@maniacmartin.com> -- rdiff confusing error message fix maniacmartin <martin@maniacmartin.com> -- rdiff confusing error message fix
Chris Nolan <chris@cenolan.com> -- maildir subdirectory expansion Chris Nolan <chris@cenolan.com> -- maildir subdirectory expansion
Dan Carley -- mysql bugfix
...@@ -25,6 +25,8 @@ version 0.9.8 -- UNRELEASED ...@@ -25,6 +25,8 @@ version 0.9.8 -- UNRELEASED
mysql: mysql:
. Don't lock tables in the information_schema database . Don't lock tables in the information_schema database
(Closes: #587011) (Closes: #587011)
. Fix code logic to make dbusername/dbpassword actually usable
(Closes Redmine bug #2264)
doc changes doc changes
manpage: manpage:
. Fix typo in manpage (Closes: #583778) . Fix typo in manpage (Closes: #583778)
......
...@@ -86,7 +86,7 @@ fi ...@@ -86,7 +86,7 @@ fi
defaultsfile="" defaultsfile=""
if [ "$dbusername" != "" -a "$dbpassword" != "" ] if [ -n "$dbusername" -a -n "$dbpassword" ]
then then
if [ $usevserver = yes ] if [ $usevserver = yes ]
then then
...@@ -140,13 +140,10 @@ password="$dbpassword" ...@@ -140,13 +140,10 @@ password="$dbpassword"
EOF EOF
umask $oldmask umask $oldmask
defaultsfile="--defaults-extra-file=$mycnf" defaultsfile="--defaults-extra-file=$mycnf"
fi
# if a user is not set, use $configfile, otherwise use $mycnf # else, if a user is set use her .my.cnf
if [ "$user" == "" ]; then elif [ -n "$user" ]
user=root; then
defaultsfile="--defaults-extra-file=$configfile"
else
userset=true; userset=true;
if [ $usevserver = yes ] if [ $usevserver = yes ]
then then
...@@ -169,6 +166,10 @@ else ...@@ -169,6 +166,10 @@ else
defaultsfile="--defaults-extra-file=$userhome/.my.cnf" defaultsfile="--defaults-extra-file=$userhome/.my.cnf"
debug "using $defaultsfile" debug "using $defaultsfile"
# otherwise use $configfile
else
user=root
defaultsfile="--defaults-extra-file=$configfile"
fi fi
####################################################################### #######################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment