null+****@clear*****
null+****@clear*****
2011年 7月 29日 (金) 06:55:51 JST
Kouhei Sutou 2011-07-28 21:55:51 +0000 (Thu, 28 Jul 2011) New Revision: 6ff1c3781c38c74f08553eba441ec9ead787855a Log: support MySQL 5.1.58 that is bundled with Debian GNU/Linux sid. Modified files: ha_mroonga.cc ha_mroonga.h Modified: ha_mroonga.cc (+2 -2) =================================================================== --- ha_mroonga.cc 2011-07-28 21:52:39 +0000 (81695c8) +++ ha_mroonga.cc 2011-07-28 21:55:51 +0000 (efc0670) @@ -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 @@ -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; Modified: ha_mroonga.h (+6 -2) =================================================================== --- ha_mroonga.h 2011-07-28 21:52:39 +0000 (fe6d96f) +++ ha_mroonga.h 2011-07-28 21:55:51 +0000 (58993a0) @@ -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 */ @@ -185,7 +189,7 @@ public: 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); @@ -355,7 +359,7 @@ private: 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