Commit 456565a4 authored by Romain Courteaud's avatar Romain Courteaud

Merge branch 'erp5' into deployment_generic_CR1094

Conflicts:
	component/mariadb/buildout.cfg
	slapos/recipe/generic_mysql/template/my.cnf.in
	software/erp5/software.cfg
parents 7fe1f8de b1173f3a
......@@ -7,10 +7,11 @@ parts =
[groonga]
recipe = hexagonit.recipe.cmmi
url = http://packages.groonga.org/source/groonga/groonga-1.2.9.tar.gz
md5sum = 47117baa401a3db08362e00f94fced12
url = http://packages.groonga.org/source/groonga/groonga-1.3.0.tar.gz
md5sum = d8b3ada75185b59665131e4eee30d107
configure-options =
--disable-static
--disable-glibtest
--disable-benchmark
--disable-document
--without-mecab
diff --git a/ha_mroonga.cc b/ha_mroonga.cc
index 722d686..9fa7168 100644
--- a/ha_mroonga.cc
+++ b/ha_mroonga.cc
@@ -6930,9 +6930,14 @@ int ha_mroonga::generic_store_bulk_timestamp(Field *field, grn_obj *buf)
{
MRN_DBUG_ENTER_METHOD();
int error = 0;
- my_bool is_null_value;
Field_timestamp *timestamp_field = (Field_timestamp *)field;
+#ifndef MRN_MARIADB_P
+ my_bool is_null_value;
long seconds = timestamp_field->get_timestamp(&is_null_value);
+#else
+ ulong second_part;
+ long seconds = timestamp_field->get_timestamp(&second_part);
+#endif
long long int time = GRN_TIME_PACK(seconds, 0);
grn_obj_reinit(ctx, buf, GRN_DB_TIME, 0);
GRN_TIME_SET(ctx, buf, time);
@@ -7231,7 +7236,11 @@ void ha_mroonga::storage_store_field_timestamp(Field *field,
int32 sec, usec __attribute__((unused));
GRN_TIME_UNPACK(time, sec, usec);
Field_timestamp *timestamp_field = (Field_timestamp *)field;
+#ifndef MRN_MARIADB_P
timestamp_field->store_timestamp(sec);
+#else
+ timestamp_field->store_TIME(sec, 0);
+#endif
}
void ha_mroonga::storage_store_field_date(Field *field,
@@ -7283,7 +7292,11 @@ void ha_mroonga::storage_store_field_datetime(Field *field,
mysql_date.minute = date.tm_min;
mysql_date.second = date.tm_sec;
Field_datetime *datetime_field = (Field_datetime *)field;
+#ifndef MRN_MARIADB_P
datetime_field->store_time(&mysql_date, MYSQL_TIMESTAMP_DATETIME);
+#else
+ datetime_field->store_time(&mysql_date);
+#endif
}
void ha_mroonga::storage_store_field_new_date(Field *field,
@@ -7303,7 +7316,11 @@ void ha_mroonga::storage_store_field_new_date(Field *field,
mysql_date.month = date.tm_mon + 1;
mysql_date.day = date.tm_mday;
Field_newdate *newdate_field = (Field_newdate *)field;
+#ifndef MRN_MARIADB_P
newdate_field->store_time(&mysql_date, MYSQL_TIMESTAMP_DATE);
+#else
+ newdate_field->store_time(&mysql_date);
+#endif
}
void ha_mroonga::storage_store_field_blob(Field *field,
USE mysql;
DROP FUNCTION IF EXISTS last_insert_grn_id;
CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME 'ha_groonga.so';
CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME 'ha_mroonga.so';
DROP FUNCTION IF EXISTS sphinx_snippets;
CREATE FUNCTION sphinx_snippets RETURNS STRING SONAME 'sphinx.so';
......@@ -68,6 +68,12 @@ class Recipe(GenericBaseRecipe):
mysql_script_list = []
# user defined functions
mysql_script_list.append(self.substituteTemplate(
self.getTemplateFilename('mysql-init-function.sql.in'),
{
}
))
# real database
mysql_script_list.append(self.substituteTemplate(
self.getTemplateFilename('initmysql.sql.in'),
......
USE mysql;
DROP FUNCTION IF EXISTS last_insert_grn_id;
CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME 'ha_mroonga.so';
DROP FUNCTION IF EXISTS sphinx_snippets;
CREATE FUNCTION sphinx_snippets RETURNS STRING SONAME 'sphinx.so';
......@@ -21,7 +21,7 @@ long_query_time = 5
max_allowed_packet = 128M
query_cache_size = 32M
plugin-load = ha_groonga.so;ha_sphinx.so
plugin-load = ha_mroonga.so;ha_sphinx.so
# The following are important to configure and depend a lot on to the size of
# your database and the available resources.
......
......@@ -21,7 +21,7 @@ long_query_time = 5
max_allowed_packet = 128M
query_cache_size = 32M
plugin-load = ha_groonga.so;ha_sphinx.so
plugin-load = ha_mroonga.so;ha_sphinx.so
# The following are important to configure and depend a lot on to the size of
# your database and the available resources.
......
......@@ -21,7 +21,7 @@ long_query_time = 5
max_allowed_packet = 128M
query_cache_size = 32M
plugin-load = ha_groonga.so;ha_sphinx.so
plugin-load = ha_mroonga.so;ha_sphinx.so
# The following are important to configure and depend a lot on to the size of
# your database and the available resources.
......
......@@ -95,7 +95,7 @@ dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:binary}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
[cron-simplelogger]
......
......@@ -146,7 +146,7 @@ dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:binary}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
[cron-simplelogger]
......
......@@ -134,7 +134,7 @@ dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:binary}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
[cron-simplelogger]
......
......@@ -72,7 +72,7 @@ dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:binary}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
[cron-simplelogger]
......
......@@ -62,7 +62,7 @@ command = grep parts ${buildout:develop-eggs-directory}/z2loganalyser.egg-link
[template-mariadb]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb.cfg
md5sum = cd8530c7154d4bd24279327fdbfdf5ec
md5sum = 1927f2c38cffc72871f8ef97682439b3
output = ${buildout:directory}/template-mariadb.cfg
mode = 0644
......@@ -76,7 +76,7 @@ mode = 0644
[template-zope]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-zope.cfg
md5sum = d814e4defef7670ca11fb150a3b207fa
md5sum = 841544c8cbc14aca81cbb7acaac04210
output = ${buildout:directory}/template-zope.cfg
mode = 0644
......@@ -97,7 +97,7 @@ mode = 0644
[template-kumofs]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kumofs.cfg
md5sum = 27780a87f7cf7ee569f3e853c988fcfe
md5sum = 9746823ccbbedf42b3e759c3e7150252
output = ${buildout:directory}/template-kumofs.cfg
mode = 0644
......@@ -139,7 +139,7 @@ mode = 0644
[template-snippet-master]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/snippet-master.cfg
md5sum = 8cb0c06453b30524a201d220264cee11
md5sum = 410d8363f543cfa6f3d0f860a142b737
output = ${buildout:directory}/template-snippet-master.cfg
mode = 0644
......
......@@ -247,7 +247,9 @@ branch = master
revision =
command = ${git:location}/bin/git clone --quiet --branch ${:branch} ${:repository} ${:location} && if [ -n "${:revision}" ]; then cd ${:location} && ${git:location}/bin/git reset --quiet --hard ${:revision} ; fi
# ls information added in order to debug .git disappearing
update-command = ls -la ${:location} ; ls -ld ${:location}/product/ERP5/bootstrap ; cd ${:location} && ${git:location}/bin/git pull && if [ -n "${:revision}" ]; then echo "Resetting." ; cd ${:location} && ${git:location}/bin/git reset --hard ${:revision} ; fi
update-command = ls -la ${:location}
ls -ld ${:location}/product/ERP5/bootstrap
cd ${:location} && ${git:location}/bin/git pull && if [ -n "${:revision}" ]; then echo "Resetting." ; cd ${:location} && ${git:location}/bin/git reset --hard ${:revision} ; fi
[beteireflow-repository]
<= erp5
......
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