Navigation Menu

Skip to content

Commit

Permalink
support MySQL 5.1.58 that is bundled with Debian GNU/Linux sid.
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jul 28, 2011
1 parent 2cb3c4c commit 6ff1c37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ha_mroonga.cc
Expand Up @@ -1735,7 +1735,7 @@ int ha_mroonga::wrapper_open(const char *name, int mode, uint test_if_locked)
}
error = wrap_handler->ha_open(table, name, mode, test_if_locked);
} else {
#if MYSQL_VERSION_ID >= 50513
#ifdef MRN_HANDLER_CLONE_NEED_NAME
if (!(wrap_handler = parent_for_clone->wrap_handler->clone(name,
mem_root_for_clone)))
#else
Expand Down Expand Up @@ -4910,7 +4910,7 @@ int ha_mroonga::reset()
DBUG_RETURN(error);
}

#if MYSQL_VERSION_ID >= 50513
#ifdef MRN_HANDLER_CLONE_NEED_NAME
handler *ha_mroonga::wrapper_clone(const char *name, MEM_ROOT *mem_root)
{
handler *cloned_handler;
Expand Down
8 changes: 6 additions & 2 deletions ha_mroonga.h
Expand Up @@ -32,6 +32,10 @@ extern "C" {
#include <groonga.h>
#include "mrn_sys.h"

#if MYSQL_VERSION_ID >= 50513 || (MYSQL_VERSION_ID >= 50158 && MYSQL_VERSION_ID < 50500)
# define MRN_HANDLER_CLONE_NEED_NAME 1
#endif

class ha_mroonga;

/* structs */
Expand Down Expand Up @@ -185,7 +189,7 @@ class ha_mroonga: public handler

int reset();

#if MYSQL_VERSION_ID >= 50513
#ifdef MRN_HANDLER_CLONE_NEED_NAME
handler *clone(const char *name, MEM_ROOT *mem_root);
#else
handler *clone(MEM_ROOT *mem_root);
Expand Down Expand Up @@ -355,7 +359,7 @@ class ha_mroonga: public handler
void storage_cond_pop();
bool wrapper_get_error_message(int error, String *buf);
bool storage_get_error_message(int error, String *buf);
#if MYSQL_VERSION_ID >= 50513
#ifdef MRN_HANDLER_CLONE_NEED_NAME
handler *wrapper_clone(const char *name, MEM_ROOT *mem_root);
handler *storage_clone(const char *name, MEM_ROOT *mem_root);
#else
Expand Down

0 comments on commit 6ff1c37

Please sign in to comment.