Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
eab8fdf7
Commit
eab8fdf7
authored
Apr 17, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide a way to disable mroonga.
Also, allows providing mroonga with a different soname.
parent
eb2016c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
slapos/recipe/generic_mysql/__init__.py
slapos/recipe/generic_mysql/__init__.py
+7
-0
slapos/recipe/generic_mysql/template/mysql-init-function.sql.in
.../recipe/generic_mysql/template/mysql-init-function.sql.in
+1
-1
No files found.
slapos/recipe/generic_mysql/__init__.py
View file @
eab8fdf7
...
@@ -69,9 +69,16 @@ class Recipe(GenericBaseRecipe):
...
@@ -69,9 +69,16 @@ class Recipe(GenericBaseRecipe):
mysql_script_list
=
[]
mysql_script_list
=
[]
# user defined functions
# 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
(
mysql_script_list
.
append
(
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'mysql-init-function.sql.in'
),
self
.
getTemplateFilename
(
'mysql-init-function.sql.in'
),
{
{
'last_insert_grn_id'
:
last_insert_grn_id
,
}
}
))
))
# real database
# real database
...
...
slapos/recipe/generic_mysql/template/mysql-init-function.sql.in
View file @
eab8fdf7
USE mysql;
USE mysql;
DROP FUNCTION IF EXISTS last_insert_grn_id;
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;
DROP FUNCTION IF EXISTS sphinx_snippets;
#CREATE FUNCTION sphinx_snippets RETURNS STRING SONAME 'ha_sphinx.so';
#CREATE FUNCTION sphinx_snippets RETURNS STRING SONAME 'ha_sphinx.so';
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment