Commit eab8fdf7 authored by Vincent Pelletier's avatar Vincent Pelletier

Provide a way to disable mroonga.

Also, allows providing mroonga with a different soname.
parent eb2016c4
......@@ -69,9 +69,16 @@ class Recipe(GenericBaseRecipe):
mysql_script_list = []
# user defined functions
mroonga = config.get('mroonga', 'ha_mroonga.so')
if mroonga:
last_insert_grn_id = "CREATE FUNCTION last_insert_grn_id RETURNS " \
"INTEGER SONAME '" + mroonga + "';"
else:
last_insert_grn_id = ""
mysql_script_list.append(self.substituteTemplate(
self.getTemplateFilename('mysql-init-function.sql.in'),
{
'last_insert_grn_id': last_insert_grn_id,
}
))
# real database
......
USE mysql;
DROP FUNCTION IF EXISTS last_insert_grn_id;
CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME 'ha_mroonga.so';
%(last_insert_grn_id)s
DROP FUNCTION IF EXISTS sphinx_snippets;
#CREATE FUNCTION sphinx_snippets RETURNS STRING SONAME 'ha_sphinx.so';
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment