[Groonga-commit] groonga/groonga at 3a7c14e [master] index_column_diff: add more empty value check

Back to archive index
Kouhei Sutou null+****@clear*****
Sat Mar 23 07:31:36 JST 2019


Kouhei Sutou	2019-03-23 07:31:36 +0900 (Sat, 23 Mar 2019)

  Revision: 3a7c14e8b4311936d1c4c8993da27433eab3fe30
  https://github.com/groonga/groonga/commit/3a7c14e8b4311936d1c4c8993da27433eab3fe30

  Message:
    index_column_diff: add more empty value check

  Modified files:
    lib/index_column.c

  Modified: lib/index_column.c (+7 -7)
===================================================================
--- lib/index_column.c    2019-03-23 07:14:41 +0900 (a44ed2ec5)
+++ lib/index_column.c    2019-03-23 07:31:36 +0900 (7c189e8c9)
@@ -853,17 +853,17 @@ grn_index_column_diff_compute(grn_ctx *ctx,
         }
         break;
       case GRN_BULK :
-        if (is_reference) {
-          if (GRN_BULK_VSIZE(value) > 0) {
+        if (GRN_BULK_VSIZE(value) > 0) {
+          if (is_reference) {
             data->current.token_id = GRN_RECORD_VALUE(value);
             data->current.posting.pos = 0;
             grn_index_column_diff_process_token_id(ctx, data);
+          } else {
+            grn_index_column_diff_process_token(ctx,
+                                                data,
+                                                GRN_BULK_HEAD(value),
+                                                GRN_BULK_VSIZE(value));
           }
-        } else {
-          grn_index_column_diff_process_token(ctx,
-                                              data,
-                                              GRN_BULK_HEAD(value),
-                                              GRN_BULK_VSIZE(value));
         }
         break;
       default :
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190323/5b8e0456/attachment.html>


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