Bugzilla – Attachment 124853 Details for
Bug 29009
Attempting to Koha-restore shows unnecessary SQL error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch (from GitHub - https://github.com/Koha-Community/Koha/pull/42.patch)
file_29009.txt (text/plain), 1.31 KB, created by
Matthew LS
on 2021-09-14 07:48:07 UTC
(
hide
)
Description:
Patch (from GitHub - https://github.com/Koha-Community/Koha/pull/42.patch)
Filename:
MIME Type:
Creator:
Matthew LS
Created:
2021-09-14 07:48:07 UTC
Size:
1.31 KB
patch
obsolete
>From cf9f544d375767d8c1b21c00ed586c6a62e7e961 Mon Sep 17 00:00:00 2001 >From: Matthew LS <matt17r@users.noreply.github.com> >Date: Fri, 10 Sep 2021 09:55:42 +0700 >Subject: [PATCH] Prevent unnecessary "operation failed" error > >Minor paper cut, when restoring I keep getting an error: >`ERROR 1396 (HY000) at line 1: Operation DROP USER failed for 'koha_library'@'%'` > >This is already implemented in `koha-remove` (https://github.com/Koha-Community/Koha/blob/a5a3a330cfc7c7d6c35db13326745dabf8fe0df3/debian/scripts/koha-remove#L69-70) so I'm attempting to add it to `koha-restore` too. >--- > debian/scripts/koha-restore | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-restore b/debian/scripts/koha-restore >index e8ec053ee07..b00ee85b321 100755 >--- a/debian/scripts/koha-restore >+++ b/debian/scripts/koha-restore >@@ -73,7 +73,7 @@ mysqluser="koha_$name" > mysqlpwd="$( xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/$name/koha-conf.xml )" > zcat "$sqldump" | mysql --defaults-extra-file=/etc/mysql/koha-common.cnf > mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof || true >-DROP USER '$mysqluser'; >+DROP USER IF EXISTS '$mysqluser'; > eof > mysql --defaults-extra-file=/etc/mysql/koha-common.cnf << eof || true > CREATE USER '$mysqluser' IDENTIFIED BY '$mysqlpwd';
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29009
: 124853