PATH="$bindir:$PATH"
db_name=${db_name:-@db_name@}
-if mysql $* -f <<END-OF-DATA
-USE ${db_name};
+if mysql -D ${db_name} $* -f <<END-OF-DATA
--
-- Note, we use BLOB rather than TEXT because in MySQL,
-- BLOBs are identical to TEXT except that BLOB is case
echo " "
bindir=@MYSQL_BINDIR@
PATH="$bindir:$PATH"
-db_name=@db_name@
+db_name=${db_name:-@db_name@}
-mysql $* -D ${db_name} -e "select VersionId from Version\G" >/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 " "
exit 1
fi
-if mysql $* -f <<END-OF-DATA
-USE ${db_name};
-
+if mysql -D ${db_name} $* -f <<END-OF-DATA
CREATE TABLE RestoreObject (
RestoreObjectId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
ObjectName BLOB NOT NULL,
PATH="$bindir:$PATH"
db_name=${db_name:-@db_name@}
-if mysql $* -f <<END-OF-DATA
-USE ${db_name};
-
+if mysql -D ${db_name} $* -f <<END-OF-DATA
-- Fix bad index on Media table
DROP INDEX inx8 ON Media;
CREATE UNIQUE INDEX inx8 ON Media (VolumeName(128));
PATH="$bindir:$PATH"
db_name=${db_name:-@db_name@}
-mysql $* -D ${db_name} -e "select VersionId from Version\G" >/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 " "
exit 1
fi
-if mysql $* -f <<END-OF-DATA
-USE ${db_name};
-
+if mysql -D ${db_name} $* -f <<END-OF-DATA
ALTER TABLE JobMedia DROP Stripe ;
ALTER TABLE JobMedia DROP Copy ;
ALTER TABLE Job ADD COLUMN HasCache tinyint default 0 after HasBase;
echo " "
bindir=@MYSQL_BINDIR@
PATH="$bindir:$PATH"
-db_name=@db_name@
+db_name=${db_name:-@db_name@}
-mysql $* -D ${db_name} -e "select VersionId from Version\G" >/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 " "
exit 1
fi
-if mysql $* -f <<END-OF-DATA
-USE ${db_name};
-
+if mysql -D ${db_name} $* -f <<END-OF-DATA
CREATE TABLE RestoreObject (
RestoreObjectId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
ObjectName BLOB NOT NULL,