[Groonga-commit] groonga/groonga at 89642a3 [master] Initialize value size by size of value type for no subrec table

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Jun 19 12:14:19 JST 2013


Kouhei Sutou	2013-06-19 12:14:19 +0900 (Wed, 19 Jun 2013)

  New Revision: 89642a344c47a6981e70e29e5964c116bb7d4419
  https://github.com/groonga/groonga/commit/89642a344c47a6981e70e29e5964c116bb7d4419

  Message:
    Initialize value size by size of value type for no subrec table

  Modified files:
    lib/db.c

  Modified: lib/db.c (+3 -1)
===================================================================
--- lib/db.c    2013-06-19 11:48:32 +0900 (e140cd5)
+++ lib/db.c    2013-06-19 12:14:19 +0900 (5894a2e)
@@ -674,6 +674,8 @@ calc_rec_size(grn_obj_flags flags, uint32_t max_n_subrecs, uint32_t range_size,
     }
     *value_size = (uintptr_t)GRN_RSET_SUBRECS_NTH((((grn_rset_recinfo *)0)->subrecs),
                                                   *subrec_size, max_n_subrecs);
+  } else {
+    *value_size = range_size;
   }
 }
 
@@ -731,7 +733,7 @@ grn_table_create_with_max_n_subrecs(grn_ctx *ctx, const char *name,
 {
   grn_id id;
   grn_id domain = GRN_ID_NIL, range = GRN_ID_NIL;
-  uint32_t key_size, value_size, range_size = 0;
+  uint32_t key_size, value_size = 0, range_size = 0;
   uint8_t subrec_size, subrec_offset;
   grn_obj *res = NULL;
   grn_obj *db;
-------------- next part --------------
HTML����������������������������...
Download 



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