[Groonga-commit] pgroonga/pgroonga at fe73811 [master] Add deleted record check for index scan and bitmap scan

Back to archive index

Kouhei Sutou null+****@clear*****
Mon May 8 20:33:18 JST 2017


Kouhei Sutou	2017-05-08 20:33:18 +0900 (Mon, 08 May 2017)

  New Revision: fe738114afb1451c0a6076de9d8248ed6809b985
  https://github.com/pgroonga/pgroonga/commit/fe738114afb1451c0a6076de9d8248ed6809b985

  Message:
    Add deleted record check for index scan and bitmap scan
    
    GitHub: #36
    
    Reported by peter-schmitz. Thanks!!!

  Modified files:
    src/pgroonga.c

  Modified: src/pgroonga.c (+4 -0)
===================================================================
--- src/pgroonga.c    2017-05-08 20:33:02 +0900 (27176d2)
+++ src/pgroonga.c    2017-05-08 20:33:18 +0900 (8468a57)
@@ -4099,6 +4099,8 @@ pgroonga_getbitmap_raw(IndexScanDesc scan,
 			GRN_BULK_REWIND(&(buffers->ctid));
 			grn_obj_get_value(ctx, so->ctidAccessor, posting->rid, &(buffers->ctid));
 			ctid = PGrnCtidUnpack(GRN_UINT64_VALUE(&(buffers->ctid)));
+			if (!ItemPointerIsValid(&ctid))
+				continue;
 			tbm_add_tuples(tbm, &ctid, 1, scan->xs_recheck);
 			nRecords++;
 		}
@@ -4112,6 +4114,8 @@ pgroonga_getbitmap_raw(IndexScanDesc scan,
 			GRN_BULK_REWIND(&(buffers->ctid));
 			grn_obj_get_value(ctx, so->ctidAccessor, id, &(buffers->ctid));
 			ctid = PGrnCtidUnpack(GRN_UINT64_VALUE(&(buffers->ctid)));
+			if (!ItemPointerIsValid(&ctid))
+				continue;
 			tbm_add_tuples(tbm, &ctid, 1, scan->xs_recheck);
 			nRecords++;
 		}
-------------- next part --------------
HTML����������������������������...
다운로드 



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