Bug 22128: Use DROP USER IF EXISTS instead of GRANT USAGE before DROP USAGE
authorRudolf Byker <rudolfbyker@gmail.com>
Fri, 24 May 2019 18:25:45 +0000 (13:25 -0500)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 25 Jul 2019 21:10:00 +0000 (21:10 +0000)
commit33ba8d247cba812ab77d7b3ecc41fc829b7800d6
tree84f0189d48bce38c2d1fb74fbb0b112271399cf7
parente44d62b067db721a930c89cea9df5acd83ee45ee
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e9bb407f62a208d42aefb03d16decd87bae228e7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit efab6445010254973468314c90b544e4f5318684)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
debian/scripts/koha-remove