[Groonga-commit] groonga/grngo at a319444 [master] Fix a bug that InsertRow() fails for a no-key Table with _value.

Back to archive index

susumu.yata null+****@clear*****
Wed Jul 29 19:08:21 JST 2015


susumu.yata	2015-07-29 19:08:21 +0900 (Wed, 29 Jul 2015)

  New Revision: a319444e323793f2ab94cadfee8993f0121ff5ae
  https://github.com/groonga/grngo/commit/a319444e323793f2ab94cadfee8993f0121ff5ae

  Message:
    Fix a bug that InsertRow() fails for a no-key Table with _value.
    
    GitHub: #19

  Modified files:
    grngo.c

  Modified: grngo.c (+6 -0)
===================================================================
--- grngo.c    2015-07-29 17:49:00 +0900 (d4f8e38)
+++ grngo.c    2015-07-29 19:08:21 +0900 (d7233bf)
@@ -295,6 +295,9 @@ _grngo_delete_table(grngo_table *table) {
 static grn_rc
 _grngo_set_key_type(grngo_table *table, grn_obj *obj) {
   grn_id domain = obj->header.domain;
+  if (obj->header.type == GRN_TABLE_NO_KEY) {
+    domain = GRN_DB_VOID;
+  }
   if (domain <= GRNGO_MAX_BUILTIN_TYPE_ID) {
     table->key_type = domain;
     return GRN_SUCCESS;
@@ -309,6 +312,9 @@ _grngo_set_key_type(grngo_table *table, grn_obj *obj) {
       return GRN_UNKNOWN_ERROR;
     }
     domain = obj->header.domain;
+    if (obj->header.type == GRN_TABLE_NO_KEY) {
+      domain = GRN_DB_VOID;
+    }
     grn_obj_unlink(table->db->ctx, obj);
     if (domain <= GRNGO_MAX_BUILTIN_TYPE_ID) {
       table->key_type = domain;
-------------- next part --------------
HTML����������������������������...
Download 



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