Changeset: 7de11c47ea3d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7de11c47ea3d
Modified Files:
        gdk/gdk_strimps.c
Branch: string_imprints
Log Message:

Fix strimp pointers when reading from disk


diffs (23 lines):

diff --git a/gdk/gdk_strimps.c b/gdk/gdk_strimps.c
--- a/gdk/gdk_strimps.c
+++ b/gdk/gdk_strimps.c
@@ -77,8 +77,8 @@
 /* Macros for accessing metadada of a strimp. These are recorded in the
  * first 8 bytes of the heap.
  */
-#define NPAIRS(d) (((d) & (0xff << 8)) >> 8)
-#define HSIZE(d) (((d) & (0xffff << 15)) >> 15)
+#define NPAIRS(d) ((d) >> 8) & 0xff
+#define HSIZE(d) ((d) >> 16) & 0xffff
 
 #undef UTF8STRINGS             /* Not using utf8 for now */
 #ifdef UTF8STRINGS
@@ -428,7 +428,7 @@ BATcheckstrimps(BAT *b)
                                            && HEAPload(&hp->strimps, nme, 
"tstrimps", false) == GDK_SUCCEED) {
                                                hp->sizes_base = (uint8_t 
*)hp->strimps.base + 8; /* sizes just after the descriptor */
                                                hp->pairs_base = hp->sizes_base 
+ npairs;         /* pairs just after the offsets */
-                                               hp->strimps_base = 
hp->sizes_base + hsize;        /* bitmasks just after the pairs */
+                                               hp->strimps_base = 
hp->strimps.base + hsize;        /* bitmasks just after the pairs */
 
                                                close(fd);
                                                hp->strimps.parentid = 
b->batCacheid;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to