Navigation Menu

Skip to content

Commit

Permalink
Support MySQL 5.6.12
Browse files Browse the repository at this point in the history
Reported by WING. Thanks!!!
  • Loading branch information
kou committed Jun 4, 2013
1 parent 98a562b commit 3bb8848
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ha_mroonga.cpp
Expand Up @@ -1463,7 +1463,14 @@ static int mrn_set_geometry(grn_ctx *ctx, grn_obj *buf,
{
Gis_point *point = (Gis_point *)geometry;
double latitude = 0.0, longitude = 0.0;
#ifdef MRN_HAVE_POINT_XY
point_xy xy;
point->get_xy(&xy);
longitude = xy.x;
latitude = xy.y;
#else
point->get_xy(&longitude, &latitude);
#endif
grn_obj_reinit(ctx, buf, GRN_DB_WGS84_GEO_POINT, 0);
GRN_GEO_POINT_SET(ctx, buf,
GRN_GEO_DEGREE2MSEC(latitude),
Expand Down
4 changes: 4 additions & 0 deletions ha_mroonga.hpp
Expand Up @@ -174,6 +174,10 @@ extern "C" {
# endif
#endif

#if MYSQL_VERSION_ID >= 50612 && !defined(MRN_MARIADB_P)
# define MRN_HAVE_POINT_XY
#endif

#if defined(_WIN32) || defined(_WIN64)
# define MRN_API __declspec(dllexport)
#else
Expand Down

0 comments on commit 3bb8848

Please sign in to comment.