Skip to content
Permalink
Browse files
fix mroonga post-install script
it only worked if mroonga plugin wasn't installed before (normal case),
but then it didn't need to delete anything.

if, by some glitch, mroonga was already installed, it would delete
mroonga from mysql.plugin, but INSTALL would fail (as mroonga was running),
and the script aborted, leaving mroonga not in mysql.plugin at all.
  • Loading branch information
vuvova committed Jun 24, 2018
1 parent f25a5c3 commit f577311
Showing 1 changed file with 3 additions and 3 deletions.
@@ -1,6 +1,6 @@
DELETE IGNORE FROM mysql.plugin WHERE dl = 'ha_mroonga@MRN_PLUGIN_SUFFIX@';

INSTALL PLUGIN Mroonga SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@';
SET @inst=IF(EXISTS(SELECT * FROM mysql.plugin WHERE NAME='mroonga'),'DO 1', "INSTALL PLUGIN mroonga SONAME 'ha_mroonga'");
PREPARE s FROM @inst;
EXECUTE s;

DROP FUNCTION IF EXISTS last_insert_grn_id;
CREATE FUNCTION last_insert_grn_id RETURNS INTEGER

0 comments on commit f577311

Please sign in to comment.