null+****@clear*****
null+****@clear*****
2011年 8月 12日 (金) 10:19:42 JST
Kouhei Sutou 2011-08-12 01:19:42 +0000 (Fri, 12 Aug 2011)
New Revision: 4fa6a9adf8e1a9511a35e56b8ce0156b20f84d11
Log:
[mysql-5.6] handler::nnd_pos() is protected. refs #1046
Modified files:
ha_mroonga.cc
ha_mroonga.h
Modified: ha_mroonga.cc (+4 -0)
===================================================================
--- ha_mroonga.cc 2011-08-12 01:17:40 +0000 (402845f)
+++ ha_mroonga.cc 2011-08-12 01:19:42 +0000 (27b7950)
@@ -2577,7 +2577,11 @@ int ha_mroonga::wrapper_rnd_pos(uchar *buf, uchar *pos)
MRN_DBUG_ENTER_METHOD();
MRN_SET_WRAP_SHARE_KEY(share, table->s);
MRN_SET_WRAP_TABLE_KEY(this, table);
+#ifdef MRN_HANDLER_RND_POS_IS_PUBLIC
error = wrap_handler->rnd_pos(buf, pos);
+#else
+ error = wrap_handler->ha_rnd_pos(buf, pos);
+#endif
MRN_SET_BASE_SHARE_KEY(share, table->s);
MRN_SET_BASE_TABLE_KEY(this, table);
DBUG_RETURN(error);
Modified: ha_mroonga.h (+9 -0)
===================================================================
--- ha_mroonga.h 2011-08-12 01:17:40 +0000 (ccd9789)
+++ ha_mroonga.h 2011-08-12 01:19:42 +0000 (1534b37)
@@ -46,6 +46,10 @@ extern "C" {
#endif
#if MYSQL_VERSION_ID < 50600
+# define MRN_HANDLER_RND_POS_IS_PUBLIC 1
+#endif
+
+#if MYSQL_VERSION_ID < 50600
typedef Item COND;
#endif
@@ -160,7 +164,9 @@ public:
#ifdef MRN_HANDLER_RND_NEXT_IS_PUBLIC
int rnd_next(uchar *buf); // required
#endif
+#ifdef MRN_HANDLER_RND_POS_IS_PUBLIC
int rnd_pos(uchar *buf, uchar *pos); // required
+#endif
void position(const uchar *record); // required
int extra(enum ha_extra_function operation);
int extra_opt(enum ha_extra_function operation, ulong cache_size);
@@ -245,6 +251,9 @@ protected:
#ifndef MRN_HANDLER_RND_NEXT_IS_PUBLIC
int rnd_next(uchar *buf);
#endif
+#ifndef MRN_HANDLER_RND_POS_IS_PUBLIC
+ int rnd_pos(uchar *buf, uchar *pos);
+#endif
private:
#ifndef MRN_HANDLER_CLOSE_IS_PUBLIC