[Groonga-mysql-commit] mroonga/mroonga [master] #526 use map methods at index scanning

Back to archive index

null+****@clear***** null+****@clear*****
2010年 10月 13日 (水) 04:05:42 JST


Kentoku SHIBA	2010-10-12 19:05:42 +0000 (Tue, 12 Oct 2010)

  New Revision: 72d9ed59570b27c3dbf196141055fc2d7d07c9d9

  Log:
    #526 use map methods at index scanning

  Modified files:
    ha_mroonga.cc
    ha_mroonga.h

  Modified: ha_mroonga.cc (+8 -12)
===================================================================
--- ha_mroonga.cc    2010-10-12 19:02:56 +0000 (be32253)
+++ ha_mroonga.cc    2010-10-12 19:05:42 +0000 (f1ef7f5)
@@ -1213,10 +1213,12 @@ ha_rows ha_mroonga::records_in_range(uint keynr, key_range *range_min, key_range
   DBUG_RETURN(row_count);
 }
 
-int ha_mroonga::index_read(uchar * record_buffer, const uchar * key, uint key_len,
-                           enum ha_rkey_function find_flag)
+int ha_mroonga::index_read_map(uchar * record_buffer, const uchar * key,
+                               key_part_map keypart_map,
+                               enum ha_rkey_function find_flag)
 {
-  DBUG_ENTER("ha_mroonga::index_read");
+  DBUG_ENTER("ha_mroonga::index_read_map");
+  uint key_len = calculate_key_len(table, active_index, key, keypart_map);
   uint keynr = active_index;
   uint pkeynr = table->s->primary_key;
   KEY key_info = table->key_info[keynr];
@@ -1229,16 +1231,10 @@ int ha_mroonga::index_read(uchar * record_buffer, const uchar * key, uint key_le
   DBUG_RETURN(0);
 }
 
-int ha_mroonga::index_read_idx(uchar * buf, uint index, const uchar * key,
-                               uint key_len, enum ha_rkey_function find_flag)
+int ha_mroonga::index_read_last_map(uchar *buf, const uchar *key,
+                                    key_part_map keypart_map)
 {
-  DBUG_ENTER("ha_mroonga::index_read_idx");
-  DBUG_RETURN(0);
-}
-
-int ha_mroonga::index_read_last(uchar *buf, const uchar *key, uint key_len)
-{
-  DBUG_ENTER("ha_mroonga::index_read_last");
+  DBUG_ENTER("ha_mroonga::index_read_last_map");
   DBUG_RETURN(0);
 }
 

  Modified: ha_mroonga.h (+5 -5)
===================================================================
--- ha_mroonga.h    2010-10-12 19:02:56 +0000 (b0895d9)
+++ ha_mroonga.h    2010-10-12 19:05:42 +0000 (421a75d)
@@ -96,11 +96,11 @@ public:
   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);
-  int index_read(uchar * buf, const uchar * key,
-                 uint key_len, enum ha_rkey_function find_flag);
-  int index_read_idx(uchar * buf, uint index, const uchar * key,
-                     uint key_len, enum ha_rkey_function find_flag);
-  int index_read_last(uchar * buf, const uchar * key, uint key_len);
+  int index_read_map(uchar * record_buffer, const uchar * key,
+                     key_part_map keypart_map,
+                     enum ha_rkey_function find_flag);
+  int index_read_last_map(uchar *buf, const uchar *key,
+                          key_part_map keypart_map);
   int index_next(uchar * buf);
   int index_prev(uchar * buf);
   int index_first(uchar * buf);




Groonga-mysql-commit メーリングリストの案内
Back to archive index