[Groonga-commit] groonga/groonga at 67deb4b [master] Binary compare operation with empty bulk returns always false

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jan 20 16:42:11 JST 2017


Kouhei Sutou	2017-01-20 16:42:11 +0900 (Fri, 20 Jan 2017)

  New Revision: 67deb4ba7cfe125f0032df9af3a390e0a151d1bb
  https://github.com/groonga/groonga/commit/67deb4ba7cfe125f0032df9af3a390e0a151d1bb

  Message:
    Binary compare operation with empty bulk returns always false
    
    TODO: Write test

  Modified files:
    lib/operator.c

  Modified: lib/operator.c (+5 -1)
===================================================================
--- lib/operator.c    2017-01-20 16:20:26 +0900 (799656f)
+++ lib/operator.c    2017-01-20 16:42:11 +0900 (87fb57e)
@@ -641,7 +641,11 @@ grn_operator_exec_not_equal(grn_ctx *ctx, grn_obj *x, grn_obj *y)
     }\
     GRN_OBJ_FIN(ctx, &element_buffer);\
   } else {\
-    DO_COMPARE_SCALAR(x, y, r, op);\
+    if (GRN_BULK_VSIZE(x) == 0 || GRN_BULK_VSIZE(y) == 0) {\
+      r = GRN_FALSE;\
+    } else {\
+      DO_COMPARE_SCALAR(x, y, r, op);\
+    }\
   }\
 } while (0)
 
-------------- next part --------------
HTML����������������������������...
Descargar 



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