summaryrefslogtreecommitdiff
path: root/storage/mroonga/data
diff options
context:
space:
mode:
authorKentoku SHIBA <kentokushiba@gmail.com>2014-09-21 00:33:45 +0900
committerKentoku SHIBA <kentokushiba@gmail.com>2014-09-21 00:33:45 +0900
commit0cc855cdc8cd0baa6ba50662632b299a3843ff13 (patch)
treeeaf50856703412b5c1c43f8c0e5a6a5318601c17 /storage/mroonga/data
parent989dd4d9ec09450ff7b25987b14ee9fdfd21ad4e (diff)
downloadmariadb-git-0cc855cdc8cd0baa6ba50662632b299a3843ff13.tar.gz
Update Mroonga to the latest version on 2014-09-21T00:33:44+0900
Diffstat (limited to 'storage/mroonga/data')
-rw-r--r--storage/mroonga/data/Makefile.am4
-rw-r--r--storage/mroonga/data/install.sql.in19
-rw-r--r--storage/mroonga/data/uninstall.sql8
3 files changed, 31 insertions, 0 deletions
diff --git a/storage/mroonga/data/Makefile.am b/storage/mroonga/data/Makefile.am
new file mode 100644
index 00000000000..c088c78c30f
--- /dev/null
+++ b/storage/mroonga/data/Makefile.am
@@ -0,0 +1,4 @@
+sqldir = $(pkgdatadir)
+dist_sql_DATA = \
+ install.sql \
+ uninstall.sql
diff --git a/storage/mroonga/data/install.sql.in b/storage/mroonga/data/install.sql.in
new file mode 100644
index 00000000000..b0c930c8144
--- /dev/null
+++ b/storage/mroonga/data/install.sql.in
@@ -0,0 +1,19 @@
+DELETE IGNORE FROM mysql.plugin WHERE dl = 'ha_mroonga@MRN_PLUGIN_SUFFIX@';
+
+INSTALL PLUGIN Mroonga SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@';
+
+DROP FUNCTION IF EXISTS last_insert_grn_id;
+CREATE FUNCTION last_insert_grn_id RETURNS INTEGER
+ SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@';
+
+DROP FUNCTION IF EXISTS mroonga_snippet;
+CREATE FUNCTION mroonga_snippet RETURNS STRING
+ SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@';
+
+DROP FUNCTION IF EXISTS mroonga_command;
+CREATE FUNCTION mroonga_command RETURNS STRING
+ SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@';
+
+DROP FUNCTION IF EXISTS mroonga_escape;
+CREATE FUNCTION mroonga_escape RETURNS STRING
+ SONAME 'ha_mroonga@MRN_PLUGIN_SUFFIX@';
diff --git a/storage/mroonga/data/uninstall.sql b/storage/mroonga/data/uninstall.sql
new file mode 100644
index 00000000000..b79e6c03d18
--- /dev/null
+++ b/storage/mroonga/data/uninstall.sql
@@ -0,0 +1,8 @@
+DROP FUNCTION IF EXISTS last_insert_grn_id;
+DROP FUNCTION IF EXISTS mroonga_snippet;
+DROP FUNCTION IF EXISTS mroonga_command;
+DROP FUNCTION IF EXISTS mroonga_escape;
+
+UNINSTALL PLUGIN Mroonga;
+
+FLUSH TABLES;