Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
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):
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
...
...
slapos/recipe/generic_mysql/template/mysql-init-function.sql.in
View file @
eab8fdf7
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';
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