Changeset: 63d2350e5138 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/63d2350e5138
Modified Files:
        gdk/gdk.h
        gdk/gdk_bbp.c
Branch: ustr
Log Message:

Updated BBP version.


diffs (44 lines):

diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -344,7 +344,8 @@ typedef struct PROPrec PROPrec;
 #define GDKLIBRARY_HSIZE       061045U /* first in Jan2022: heap "size" values 
*/
 #define GDKLIBRARY_JSON        061046U /* first in Sep2022: json storage 
changes*/
 #define GDKLIBRARY_STATUS      061047U /* first in Dec2023: no status/filename 
columns */
-#define GDKLIBRARY             061050U /* first in Aug2024 */
+#define GDKLIBRARY_USTR                061050U /* first in Aug2024: no ustr */
+#define GDKLIBRARY             061051U /* first after Dec2025 */
 
 /* The batRestricted field indicates whether a BAT is readonly.
  * we have modes: BAT_WRITE  = all permitted
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -519,7 +519,7 @@ heapinit(BAT *b, const char *buf,
 #endif
 #endif
 
-       if (properties & ~0x3F81) {
+       if (properties & (bbpversion <= GDKLIBRARY_USTR ? ~0x1F81 : ~0x3F81)) {
                TRC_CRITICAL(GDK, "unknown properties are set: incompatible 
database on line %d of BBP.dir\n", lineno);
                return -1;
        }
@@ -559,7 +559,7 @@ heapinit(BAT *b, const char *buf,
        b->tnonil = (properties & 0x0400) != 0;
        b->tnil = (properties & 0x0800) != 0;
        b->tascii = (properties & 0x1000) != 0;
-       b->ustr = (properties & 0x2000) != 0;
+       b->ustr = (bbpversion <= GDKLIBRARY_USTR) ? false : (properties & 
0x2000) != 0;
        b->tnosorted = (BUN) nosorted;
        b->tnorevsorted = (BUN) norevsorted;
        b->tunique_est = 0.0;
@@ -1002,7 +1002,8 @@ BBPheader(FILE *fp, int *lineno, bat *bb
            bbpversion != GDKLIBRARY_STATUS &&
            bbpversion != GDKLIBRARY_JSON &&
            bbpversion != GDKLIBRARY_HSIZE &&
-           bbpversion != GDKLIBRARY_HASHASH) {
+           bbpversion != GDKLIBRARY_HASHASH &&
+           bbpversion != GDKLIBRARY_USTR) {
                TRC_CRITICAL(GDK, "incompatible BBP version: expected 0%o, got 
0%o. "
                             "This database was probably created by a %s 
version of MonetDB.",
                             GDKLIBRARY, bbpversion,
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to