]> git.koha-community.org Git - koha.git/commit
Bug 6517 - [REVISED] koha-create wants "use database" in DEFAULTSQL
authorMagnus Enger <magnus@enger.priv.no>
Thu, 30 Jun 2011 06:47:35 +0000 (08:47 +0200)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Tue, 13 Sep 2011 13:14:46 +0000 (09:14 -0400)
commite5c056dba58188d6687323d190d656f162330615
tree50361b8fe4df247dad2b059c840fb5edbc5ffcc7
parent641448a5bf7d1cbfa0705c6bdb7f0ca6613dda1a
Bug 6517 - [REVISED] koha-create wants "use database" in DEFAULTSQL

The revised patch quotes the variable $mysqldb, as suggested by Frère
Sébastien Marie.

This patch makes sure that pointing DEFAULTSQL in /etc/koha/koha-sites.conf
to any (gzip'ed) file produced by mysqldump works, by adding the name of the
database to the end of the call to mysql, when the specified SQL file is
loaded. Files produced with koha-dump-defaults should still work too.

To test:
- Apply the patch
- Create a new package with build-git-snapshot
- Install the package
- Create an SQL file from an existing installation with mysqldump
- gzip the SQL file
- point DEFAULTSQL to the file in /etc/koha/koha-sites.conf
- create a new site with koha-create --create-db

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit b3b6278e206be11ce3b5a8e271f7bccb70539ac5)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
debian/scripts/koha-create