From: Kern Sibbald Date: Thu, 6 Sep 2012 17:21:58 +0000 (+0200) Subject: mysql database install/update scripts patch. Fixes bug #1901 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f3a3918aa58f7ae1ef4dc331e373093338ca901f;p=bacula%2Fbacula mysql database install/update scripts patch. Fixes bug #1901 --- diff --git a/bacula/src/cats/make_mysql_tables.in b/bacula/src/cats/make_mysql_tables.in index acced10eee..0a94b60e38 100644 --- a/bacula/src/cats/make_mysql_tables.in +++ b/bacula/src/cats/make_mysql_tables.in @@ -10,8 +10,7 @@ bindir=@MYSQL_BINDIR@ PATH="$bindir:$PATH" db_name=${db_name:-@db_name@} -if mysql $* -f </tmp/$$ +mysql -D ${db_name} $* -e "select VersionId from Version\G" >/tmp/$$ DBVERSION=`sed -n -e 's/^VersionId: \(.*\)$/\1/p' /tmp/$$` if [ $DBVERSION != 12 ] ; then echo " " @@ -21,9 +21,7 @@ if [ $DBVERSION != 12 ] ; then exit 1 fi -if mysql $* -f </tmp/$$ +mysql -D ${db_name} $* -e "select VersionId from Version\G" >/tmp/$$ DBVERSION=`sed -n -e 's/^VersionId: \(.*\)$/\1/p' /tmp/$$` if [ $DBVERSION != 11 ] ; then echo " " @@ -21,9 +21,7 @@ if [ $DBVERSION != 11 ] ; then exit 1 fi -if mysql $* -f </tmp/$$ +mysql -D ${db_name} $* -e "select VersionId from Version\G" >/tmp/$$ DBVERSION=`sed -n -e 's/^VersionId: \(.*\)$/\1/p' /tmp/$$` if [ $DBVERSION != 12 ] ; then echo " " @@ -21,9 +21,7 @@ if [ $DBVERSION != 12 ] ; then exit 1 fi -if mysql $* -f <