From e34c2d265539f9045e9442d9ed17113c99c512ac Mon Sep 17 00:00:00 2001
From: Barton Chittenden <barton@bywatersolutions.com>
Date: Mon, 1 Jun 2015 15:29:14 -0700
Subject: [PATCH] Bug 12372: koha-mysql: process any mysql args

---
 debian/scripts/koha-mysql |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/scripts/koha-mysql b/debian/scripts/koha-mysql
index d1f9576..baf2d5c 100755
--- a/debian/scripts/koha-mysql
+++ b/debian/scripts/koha-mysql
@@ -29,8 +29,9 @@ else
     exit 1
 fi
 
-[ "$#" = 1 ] || die "Usage: $0 instancename"
+is_instance "$1" || die "Usage: $0 instancename"
 name="$1"
+shift # remove instance name from argument list.
 kohaconfig="/etc/koha/sites/$name/koha-conf.xml"
 
 mysqlhost="$( xmlstarlet sel -t -v 'yazgfs/config/hostname' $kohaconfig )"
@@ -39,5 +40,5 @@ mysqluser="$( xmlstarlet sel -t -v 'yazgfs/config/user' $kohaconfig )"
 mysqlpass="$( xmlstarlet sel -t -v 'yazgfs/config/pass' $kohaconfig )"
 
 mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpass" \
-    "$mysqldb"
+    "$mysqldb"  "${@}"
 
-- 
1.7.10.4