[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] [storage] fix uninitialized value use.

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:33:57 JST 2012


Kouhei Sutou	2011-09-23 17:03:21 +0900 (Fri, 23 Sep 2011)

  New Revision: 8d241228eb2f9c1764287091708e7d21b8596f58
  https://github.com/mroonga/mroonga/commit/8d241228eb2f9c1764287091708e7d21b8596f58

  Log:
    [storage] fix uninitialized value use.

  Modified files:
    ha_mroonga.cc

  Modified: ha_mroonga.cc (+5 -5)
===================================================================
--- ha_mroonga.cc    2011-09-23 17:01:01 +0900 (fa5f9fe)
+++ ha_mroonga.cc    2011-09-23 17:03:21 +0900 (c84abfb)
@@ -3723,6 +3723,11 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key,
     if (find_flag == HA_READ_KEY_EXACT) {
       const char *col_name = field->field_name;
       int col_name_size = strlen(col_name);
+
+      mrn_set_key_buf(ctx, field, key, key_min[key_nr], &size_min);
+      val_min = key_min[key_nr];
+      val_max = key_min[key_nr];
+      size_max = size_min;
       // for _id
       if (strncmp(MRN_ID_COL_NAME, col_name, col_name_size) == 0) {
         grn_id found_record_id = *(grn_id *)key_min[key_nr];
@@ -3737,11 +3742,6 @@ int ha_mroonga::storage_index_read_map(uchar *buf, const uchar *key,
           cur = NULL;
           DBUG_RETURN(HA_ERR_END_OF_FILE);
         }
-      } else {
-        mrn_set_key_buf(ctx, field, key, key_min[key_nr], &size_min);
-        val_min = key_min[key_nr];
-        val_max = key_min[key_nr];
-        size_max = size_min;
       }
     } else if (
       find_flag == HA_READ_BEFORE_KEY ||
-------------- next part --------------
HTML����������������������������...
Download 



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