Commit eb7259be authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

version up : groonga-1.3.0 and mroonga-1.20.

parent bd8b5a10
......@@ -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
......@@ -59,13 +59,23 @@ environment =
CPPFLAGS=-I${ncurses:location}/include -I${readline5:location}/include
LDFLAGS=-Wl,-rpath=${libevent:location}/lib -L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib -L${readline5:location}/lib -Wl,-rpath=${readline5:location}/lib -Wl,-rpath=${zlib:location}/lib
[mroonga-1.20-mariadb.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 2b34c0d0ca3368bc985520bb6dadf02e
filename = ${:_buildout_section_name_}
download-only = true
[mroonga-mariadb]
recipe = hexagonit.recipe.cmmi
url = https://github.com/downloads/mroonga/mroonga/mroonga-1.11.tar.gz
md5sum = 69e56246226e0b9969ee7f99e08aa7da
url = https://github.com/downloads/mroonga/mroonga/mroonga-1.20.tar.gz
md5sum = 057eeab7db122c4c62c6f8780862c16e
configure-options =
--with-mysql-source=${mariadb:location}__compile__/mariadb-${mariadb:version}
--with-mysql-config=${mariadb:location}/bin/mysql_config
patch-options = -p1
patches =
${mroonga-1.20-mariadb.patch:location}/${mroonga-1.20-mariadb.patch:filename}
environment =
PATH=${groonga:location}/bin:${pkgconfig:location}/bin:%(PATH)s
CPPFLAGS=-I${groonga:location}/include/groonga
......
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';
......@@ -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
# By default only 100 connections are allowed, when using zeo
# we may have much more connections
......
......@@ -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.
......
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