[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] [storage] fix read_range_first for no multicolumn index is broken.

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:27:59 JST 2012


Kouhei Sutou	2011-09-23 14:49:29 +0900 (Fri, 23 Sep 2011)

  New Revision: 464c215dd70001ebf46958cf95f1ed5be5803645
  https://github.com/mroonga/mroonga/commit/464c215dd70001ebf46958cf95f1ed5be5803645

  Log:
    [storage] fix read_range_first for no multicolumn index is broken.

  Modified files:
    ha_mroonga.cc

  Modified: ha_mroonga.cc (+4 -5)
===================================================================
--- ha_mroonga.cc    2011-09-23 14:42:59 +0900 (3a98a92)
+++ ha_mroonga.cc    2011-09-23 14:49:29 +0900 (b26fca7)
@@ -4054,7 +4054,7 @@ int ha_mroonga::storage_index_first(uchar *buf)
   }
   bool is_multiple_column_index = table->key_info[active_index].key_parts > 1;
   uint pkey_nr = table->s->primary_key;
-  if (is_multiple_column_index) { // primary index
+  if (is_multiple_column_index) { // multiple column index
     DBUG_PRINT("info", ("mroonga use multiple column key"));
     cur = grn_table_cursor_open(ctx, grn_index_tables[active_index],
                                 NULL, 0, NULL, 0,
@@ -4312,6 +4312,9 @@ int ha_mroonga::storage_read_range_first(const key_range *start_key,
     const char *col_name = field->field_name;
     int col_name_size = strlen(col_name);
     if (start_key) {
+      mrn_set_key_buf(ctx, field, start_key->key, key_min[active_index],
+                      &size_min);
+      val_min = key_min[active_index];
       if (start_key->flag == HA_READ_KEY_EXACT) {
         // for _id
         if (strncmp(MRN_ID_COL_NAME, col_name, col_name_size) == 0) {
@@ -4328,10 +4331,6 @@ int ha_mroonga::storage_read_range_first(const key_range *start_key,
             record_id = GRN_ID_NIL;
             DBUG_RETURN(HA_ERR_END_OF_FILE);
           }
-        } else {
-          mrn_set_key_buf(ctx, field, start_key->key, key_min[active_index],
-                          &size_min);
-          val_min = key_min[active_index];
         }
       }
     }
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-mysql-commit mailing list
Back to archive index