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-Tag: Release-5.2.11~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=895c7e1e561ccfa4773070f594a1bba52795c111;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 <