null+****@clear*****
null+****@clear*****
2011年 7月 14日 (木) 18:11:06 JST
Kouhei Sutou 2011-07-14 09:11:06 +0000 (Thu, 14 Jul 2011) New Revision: 6fdbd9eeccd4a6dea1e2070446249338a687fc2a Log: [wrapper][multiple-column-index] remove max key parts limitation. refs #1031 But it's not worked yet. Modified files: ha_mroonga.cc ha_mroonga.h Modified: ha_mroonga.cc (+25 -0) =================================================================== --- ha_mroonga.cc 2011-07-13 10:42:54 +0000 (c2569f7) +++ ha_mroonga.cc 2011-07-14 09:11:06 +0000 (6e34b53) @@ -3229,6 +3229,31 @@ int ha_mroonga::delete_row(const uchar *buf) DBUG_RETURN(error); } +uint ha_mroonga::wrapper_max_supported_key_parts() +{ + MRN_DBUG_ENTER_METHOD(); + DBUG_RETURN(MAX_REF_PARTS); +} + +uint ha_mroonga::storage_max_supported_key_parts() +{ + MRN_DBUG_ENTER_METHOD(); + DBUG_RETURN(1); +} + +uint ha_mroonga::max_supported_key_parts() +{ + MRN_DBUG_ENTER_METHOD(); + uint parts; + if (share->wrapper_mode) + { + parts = wrapper_max_supported_key_parts(); + } else { + parts = storage_max_supported_key_parts(); + } + DBUG_RETURN(parts); +} + ha_rows ha_mroonga::wrapper_records_in_range(uint key_nr, key_range *range_min, key_range *range_max) { Modified: ha_mroonga.h (+3 -1) =================================================================== --- ha_mroonga.h 2011-07-13 10:42:54 +0000 (cfa041d) +++ ha_mroonga.h 2011-07-14 09:11:06 +0000 (22294e0) @@ -152,7 +152,7 @@ public: uint max_supported_record_length() const { return HA_MAX_REC_LENGTH; } uint max_supported_keys() const { return 100; } - uint max_supported_key_parts() const { return 1; } + uint max_supported_key_parts(); uint max_supported_key_length() const { return MAX_KEY_LENGTH; } ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key); @@ -281,6 +281,8 @@ private: int wrapper_delete_row(const uchar *buf); int wrapper_delete_row_index(const uchar *buf); int storage_delete_row(const uchar *buf); + uint wrapper_max_supported_key_parts(); + uint storage_max_supported_key_parts(); ulonglong wrapper_table_flags() const; ulonglong storage_table_flags() const; ulong wrapper_index_flags(uint idx, uint part, bool all_parts) const;