Changeset: 79467f81b53a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/79467f81b53a
Modified Files:
gdk/gdk_bbp.c
gdk/gdk_hash.c
geom/monetdb5/geom.c
Branch: default
Log Message:
Merge with Sep2022 branch.
diffs (42 lines):
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -519,6 +519,9 @@ heapinit(BAT *b, const char *buf,
return -1;
}
+ if (strcmp(type, "wkba") == 0)
+ TRC_WARNING(GDK, "type wkba (SQL name: GeometryA) is
deprecated\n");
+
if (properties & ~0x0F81) {
TRC_CRITICAL(GDK, "unknown properties are set: incompatible
database on line %d of BBP.dir\n", lineno);
return -1;
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -5171,7 +5171,7 @@ wkbHASH(const void *W)
for (i = 0; i < (w->len - 1); i += 2) {
BUN a = ((unsigned char *) w->data)[i];
BUN b = ((unsigned char *) w->data)[i + 1];
-#if '\377' < 0
+#if '\377' < 0 /* char is signed? */
/* maybe sign extend */
if (a & 0x80)
a |= ~(BUN)0x7f;
@@ -5631,7 +5631,15 @@ wkbaHASH(const void *WARRAY)
for (j = 0; j < wArray->itemsNum; j++) {
wkb *w = wArray->data[j];
for (i = 0; i < (w->len - 1); i += 2) {
- int a = *(w->data + i), b = *(w->data + i + 1);
+ BUN a = ((unsigned char *) w->data)[i];
+ BUN b = ((unsigned char *) w->data)[i + 1];
+#if '\377' < 0 /* char is signed? */
+ /* maybe sign extend */
+ if (a & 0x80)
+ a |= ~(BUN)0x7f;
+ if (b & 0x80)
+ b |= ~(BUN)0x7f;
+#endif
h = (h << 3) ^ (h >> 11) ^ (h >> 17) ^ (b << 8) ^ a;
}
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]