Kouhei Sutou
null+****@clear*****
Wed Mar 18 21:12:38 JST 2015
Kouhei Sutou 2015-03-18 21:12:38 +0900 (Wed, 18 Mar 2015) New Revision: 7a58805c9f3dc868ce6f2cc0295ba4a47763bfcb https://github.com/mroonga/mroonga/commit/7a58805c9f3dc868ce6f2cc0295ba4a47763bfcb Message: mysql57: spatial is always enabled Modified files: ha_mroonga.cpp mrn_mysql_compat.h Modified: ha_mroonga.cpp (+4 -4) =================================================================== --- ha_mroonga.cpp 2015-03-18 21:05:13 +0900 (c86240e) +++ ha_mroonga.cpp 2015-03-18 21:12:38 +0900 (74bc1a0) @@ -1492,7 +1492,7 @@ bool mrn_parse_grn_index_column_flags(THD *thd, return found; } -#ifdef HAVE_SPATIAL +#ifdef MRN_HAVE_SPATIAL static int mrn_set_geometry(grn_ctx *ctx, grn_obj *buf, const char *wkb, uint wkb_size) { @@ -5504,7 +5504,7 @@ int ha_mroonga::storage_write_row(uchar *buf) if (field->is_null()) continue; -#ifdef HAVE_SPATIAL +#ifdef MRN_HAVE_SPATIAL bool is_null_geometry_value = field->real_type() == MYSQL_TYPE_GEOMETRY && static_cast<Field_geom *>(field)->get_length() == 0; @@ -9876,7 +9876,7 @@ int ha_mroonga::generic_store_bulk_geometry(Field *field, grn_obj *buf) { MRN_DBUG_ENTER_METHOD(); int error = 0; -#ifdef HAVE_SPATIAL +#ifdef MRN_HAVE_SPATIAL String buffer; Field_geom *geometry = (Field_geom *)field; String *value = geometry->val_str(0, &buffer); @@ -10307,7 +10307,7 @@ void ha_mroonga::storage_store_field_geometry(Field *field, uint value_length) { MRN_DBUG_ENTER_METHOD(); -#ifdef HAVE_SPATIAL +#ifdef MRN_HAVE_SPATIAL uchar wkb[SRID_SIZE + WKB_HEADER_SIZE + POINT_DATA_SIZE]; grn_geo_point *field_value = (grn_geo_point *)value; int latitude, longitude; Modified: mrn_mysql_compat.h (+6 -0) =================================================================== --- mrn_mysql_compat.h 2015-03-18 21:05:13 +0900 (f0466cc) +++ mrn_mysql_compat.h 2015-03-18 21:12:38 +0900 (83eaf69) @@ -210,4 +210,10 @@ # define MRN_HAVE_BINLOG_H #endif +#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) +# define MRN_HAVE_SPATIAL +#elif defined(HAVE_SPATIAL) +# define MRN_HAVE_SPATIAL +#endif + #endif /* MRN_MYSQL_COMPAT_H_ */ -------------- next part -------------- HTML����������������������������... Download