Changeset: 59079a79a7c6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=59079a79a7c6
Modified Files:
gdk/gdk.h
gdk/gdk_bbp.c
Branch: mosaic
Log Message:
Merger
diffs (82 lines):
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -970,11 +970,9 @@ typedef struct {
/* assert that atom width is power of 2, i.e., width == 1<<shift */
#define assert_shift_width(shift,width) assert(((shift) == 0 && (width) == 0)
|| ((unsigned)1<<(shift)) == (unsigned)(width))
-#define GDKLIBRARY_PRE_VARWIDTH 061023 /* backward compatible version */
-#define GDKLIBRARY_CHR 061024 /* version that still had chr type */
-#define GDKLIBRARY_SORTED_BYTE 061025 /* version that still had byte-sized
sorted flag */
#define GDKLIBRARY_64_BIT_INT 061026 /* version that had no 128-bit integer
option, yet */
-#define GDKLIBRARY 061027
+#define GDKLIBRARY_NOCOMPRESS 061027 /* version without compression (mosaic)
*/
+#define GDKLIBRARY 061030
typedef struct BAT {
/* static bat properties */
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -713,18 +713,10 @@ heapinit(COLrec *col, const char *buf, i
int n;
(void) oidsize; /* only used when SIZEOF_OID==8 */
+ (void) bbpversion; /* could be used to implement compatibility */
norevsorted = 0; /* default for first case */
- if (bbpversion <= GDKLIBRARY_SORTED_BYTE ?
- sscanf(buf,
- " %10s %hu %hu %hu %lld %lld %lld %lld %lld %lld %lld %hu"
- "%n",
- type, &width, &var, &properties, &nokey0,
- &nokey1, &nosorted, &base, &align, &free,
- &size, &storage,
- &n) < 12
- :
- sscanf(buf,
+ if (sscanf(buf,
" %10s %hu %hu %hu %lld %lld %lld %lld %lld %lld %lld %lld
%hu"
"%n",
type, &width, &var, &properties, &nokey0,
@@ -733,7 +725,7 @@ heapinit(COLrec *col, const char *buf, i
&n) < 13)
GDKfatal("BBPinit: invalid format for BBP.dir\n%s", buf);
- if (properties & ~0x0F81)
+ if (properties & ~0x1F81)
GDKfatal("BBPinit: unknown properties are set: incompatible
database\n");
*hashash = var & 2;
var &= ~2;
@@ -770,6 +762,9 @@ heapinit(COLrec *col, const char *buf, i
col->dense = (properties & 0x0200) != 0;
col->nonil = (properties & 0x0400) != 0;
col->nil = (properties & 0x0800) != 0;
+ if ((col->heap.compressed = (properties & 0x1000) != 0) != 0 &&
+ bbpversion <= GDKLIBRARY_NOCOMPRESS)
+ GDKfatal("BBPinit: inconsistent entry in BBP.dir: compression
flag set in version without compression\n");
col->nosorted = (BUN) nosorted;
col->norevsorted = (BUN) norevsorted;
col->seq = base < 0 ? oid_nil : (oid) base;
@@ -965,10 +960,8 @@ BBPheader(FILE *fp, oid *BBPoid, int *OI
exit(1);
}
if (bbpversion != GDKLIBRARY &&
- bbpversion != GDKLIBRARY_64_BIT_INT &&
- bbpversion != GDKLIBRARY_SORTED_BYTE &&
- bbpversion != GDKLIBRARY_CHR &&
- bbpversion != GDKLIBRARY_PRE_VARWIDTH) {
+ bbpversion != GDKLIBRARY_NOCOMPRESS &&
+ bbpversion != GDKLIBRARY_64_BIT_INT) {
GDKfatal("BBPinit: incompatible BBP version: expected 0%o, got
0%o.", GDKLIBRARY, bbpversion);
}
if (fgets(buf, sizeof(buf), fp) == NULL) {
@@ -1243,7 +1236,7 @@ heap_entry(stream *s, COLrec *col)
t >= 0 ? BATatoms[t].name : ATOMunknown_name(t),
col->width,
col->varsized | (col->vheap ? col->vheap->hashash <<
1 : 0),
- (unsigned short) col->sorted | ((unsigned short)
col->revsorted << 7) | (((unsigned short) col->key & 0x01) << 8) | ((unsigned
short) col->dense << 9) | ((unsigned short) col->nonil << 10) | ((unsigned
short) col->nil << 11),
+ (unsigned short) col->sorted | ((unsigned short)
col->revsorted << 7) | (((unsigned short) col->key & 0x01) << 8) | ((unsigned
short) col->dense << 9) | ((unsigned short) col->nonil << 10) | ((unsigned
short) col->nil << 11) | ((unsigned short) col->heap.compressed << 12),
col->nokey[0],
col->nokey[1],
col->nosorted,
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list