null+****@clear*****
null+****@clear*****
2011年 10月 31日 (月) 23:13:36 JST
Kouhei Sutou 2011-10-31 14:13:36 +0000 (Mon, 31 Oct 2011) New Revision: c2bc6d08d0e96128dc7d41417a7a2ca71f7fc90e Log: [mysql56][mariadb] use ha_index_read_map. refs #1152 Modified files: ha_mroonga.cc ha_mroonga.h Modified: ha_mroonga.cc (+6 -2) =================================================================== --- ha_mroonga.cc 2011-10-31 14:01:38 +0000 (dcc764a) +++ ha_mroonga.cc 2011-10-31 14:13:36 +0000 (e99d094) @@ -4422,7 +4422,7 @@ int ha_mroonga::index_end() DBUG_RETURN(error); } -int ha_mroonga::wrapper_index_read_map(uchar * buf, const uchar * key, +int ha_mroonga::wrapper_index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) { @@ -4442,7 +4442,11 @@ int ha_mroonga::wrapper_index_read_map(uchar * buf, const uchar * key, MRN_SET_WRAP_TABLE_KEY(this, table); if (fulltext_searching) set_pk_bitmap(); +#ifdef MRN_HANDLER_HAVE_HA_INDEX_READ_MAP + error = wrap_handler->ha_index_read_map(buf, key, keypart_map, find_flag); +#else error = wrap_handler->index_read_map(buf, key, keypart_map, find_flag); +#endif MRN_SET_BASE_SHARE_KEY(share, table->s); MRN_SET_BASE_TABLE_KEY(this, table); } @@ -4557,7 +4561,7 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key, DBUG_RETURN(error); } -int ha_mroonga::index_read_map(uchar * buf, const uchar * key, +int ha_mroonga::index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) { Modified: ha_mroonga.h (+9 -1) =================================================================== --- ha_mroonga.h 2011-10-31 14:01:38 +0000 (8019014) +++ ha_mroonga.h 2011-10-31 14:13:36 +0000 (d399198) @@ -47,11 +47,12 @@ extern "C" { # define MRN_HANDLER_HAVE_ADD_INDEX 1 #endif -#if (MYSQL_VERSION_ID >= 50600) || \ +#if (MYSQL_VERSION_ID >= 50603) || \ (defined(MRN_MARIADB_P) && MYSQL_VERSION_ID >= 50302) # define MRN_HANDLER_HAVE_HA_CLOSE 1 # define MRN_HANDLER_HAVE_HA_RND_NEXT 1 # define MRN_HANDLER_HAVE_HA_RND_POS 1 +# define MRN_HANDLER_HAVE_HA_INDEX_READ_MAP 1 # define MRN_HANDLER_HAVE_HA_INDEX_READ_IDX_MAP 1 # define MRN_HANDLER_HAVE_HA_INDEX_NEXT 1 # define MRN_HANDLER_HAVE_HA_INDEX_PREV 1 @@ -213,9 +214,11 @@ public: ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key); int index_init(uint idx, bool sorted); int index_end(); +#ifndef MRN_HANDLER_HAVE_HA_INDEX_READ_MAP int index_read_map(uchar * buf, const uchar * key, key_part_map keypart_map, enum ha_rkey_function find_flag); +#endif int index_read_last_map(uchar *buf, const uchar *key, key_part_map keypart_map); #ifndef MRN_HANDLER_HAVE_HA_INDEX_NEXT @@ -321,6 +324,11 @@ protected: #ifdef MRN_HANDLER_HAVE_HA_RND_POS int rnd_pos(uchar *buf, uchar *pos); #endif +#ifdef MRN_HANDLER_HAVE_HA_INDEX_READ_MAP + int index_read_map(uchar *buf, const uchar *key, + key_part_map keypart_map, + enum ha_rkey_function find_flag); +#endif #ifdef MRN_HANDLER_HAVE_HA_INDEX_NEXT int index_next(uchar *buf); #endif