Bugzilla – Attachment 91063 Details for
Bug 22128
koha-remove fails mysql ERROR 1133 (42000) at line 2: Can't find any matching row in the user table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22128: Use DROP USER IF EXISTS instead of GRANT USAGE before DROP USAGE
Bug-22128-Use-DROP-USER-IF-EXISTS-instead-of-GRANT.patch (text/plain), 1.49 KB, created by
Kyle M Hall (khall)
on 2019-06-28 11:40:35 UTC
(
hide
)
Description:
Bug 22128: Use DROP USER IF EXISTS instead of GRANT USAGE before DROP USAGE
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-06-28 11:40:35 UTC
Size:
1.49 KB
patch
obsolete
>From 15d5c0748f248c3a19f178eaf5c3d281a0b03648 Mon Sep 17 00:00:00 2001 >From: Rudolf Byker <rudolfbyker@gmail.com> >Date: Fri, 24 May 2019 13:25:45 -0500 >Subject: [PATCH] Bug 22128: Use DROP USER IF EXISTS instead of GRANT USAGE > before DROP USAGE > >MySQL 5.7 is old, and the latest versions fail on "GRANT USAGE" if the >user does not exist. "DROP USER IF EXISTS" has been with us since 5.7, >so all users should have it by now. This patch fixes the issue. > >To test: > >Try to koha_remove a site, and if it works with no errors, all good! > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > debian/scripts/koha-remove | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > >diff --git a/debian/scripts/koha-remove b/debian/scripts/koha-remove >index 94f5915c8a..ad31c8ed8b 100755 >--- a/debian/scripts/koha-remove >+++ b/debian/scripts/koha-remove >@@ -67,10 +67,8 @@ do > then > # The grant creates the user in case it isn't, we don't want our loop to fail if it has already being deleted. > mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof >-GRANT USAGE ON \`koha_$name\`.* TO \`koha_$name\`@\`%\`; >-GRANT USAGE ON \`koha_$name\`.* TO \`koha_$name\`@\`$mysql_hostname\`; >-DROP USER \`koha_$name\`@\`%\`; >-DROP USER \`koha_$name\`@\`$mysql_hostname\`; >+DROP USER IF EXISTS \`koha_$name\`@\`%\`; >+DROP USER IF EXISTS \`koha_$name\`@\`$mysql_hostname\`; > DROP DATABASE IF EXISTS \`koha_$name\`; > FLUSH PRIVILEGES; > eof >-- >2.20.1 (Apple Git-117)
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 22128
:
89528
|
90081
|
90491
|
90492
|
90493
| 91063 |
91064