Changeset: 238caa07b6bc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/238caa07b6bc
Modified Files:
gdk/gdk_strimps.c
Branch: string_imprints
Log Message:
Fix initialization check for strimps
A strimp is initialized if the strimp exists and the number of bitstrings is
equal to the bat count
diffs (17 lines):
diff --git a/gdk/gdk_strimps.c b/gdk/gdk_strimps.c
--- a/gdk/gdk_strimps.c
+++ b/gdk/gdk_strimps.c
@@ -456,7 +456,12 @@ BATcheckstrimps(BAT *b)
}
MT_lock_unset(&b->batIdxLock);
}
- ret = b->tstrimps != NULL;
+ /* The string imprint is initialized if the strimp pointer is
+ * not null and the number of bitstrings is equal to the bat
+ * count.
+ */
+ ret = b->tstrimps != NULL &&
+ (b->tstrimps->strimps.free - ((char *)b->tstrimps->strimps_base
- b->tstrimps->strimps.base))/sizeof(uint64_t) == b->batCount;
if (ret)
TRC_DEBUG(ACCELERATOR, "BATcheckstrimps(" ALGOBATFMT "):
already has strimps, waited " LLFMT " usec\n", ALGOBATPAR(b), GDKusec() - t);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list