Changeset: a8a5b1096cc3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a8a5b1096cc3
Modified Files:
monetdb5/modules/mal/orderidx.c
Branch: leftmart
Log Message:
It turns out, sometimes one of the inputs is an empty bat.
And then it is a VOID-tailed bat, meaning that Tloc() returns NULL,
causing a crash.
diffs (23 lines):
diff --git a/monetdb5/modules/mal/orderidx.c b/monetdb5/modules/mal/orderidx.c
--- a/monetdb5/modules/mal/orderidx.c
+++ b/monetdb5/modules/mal/orderidx.c
@@ -242,6 +242,19 @@ OIDXmerge(Client cntxt, MalBlkPtr mb, Ma
BBPunfix(bid);
throw(MAL, "bat.orderidx", RUNTIME_OBJECT_MISSING);
}
+ if (BATcount(a[i]) == 0) {
+ BBPunfix(aid[i]);
+ a[i] = NULL;
+ }
+ }
+ for (i = 0; i < n_ar; i++) {
+ if (a[i] == NULL) {
+ if (i < n_ar - 1)
+ a[i] = a[--n_ar];
+ else
+ n_ar--;
+ i--;
+ }
}
if (n_ar == 1) {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list