Changeset: 954514365b1e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=954514365b1e
Modified Files:
        gdk/gdk_select.c
Branch: Dec2016
Log Message:

fixed a crash reported by the sunrise tools

In the select code we didn't handle larger candidate ranges properly.


diffs (15 lines):

diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -1369,7 +1369,10 @@ BATselect(BAT *b, BAT *s, const void *tl
                                  s ? BATgetId(s) : "NULL",
                                  s && BATtdense(s) ? "(dense)" : "", anti);
                if (s) {
-                       return COLcopy(s, s->ttype, 0, TRANSIENT);
+                       oid o = b->hseqbase + BATcount(b);
+                       BUN q = SORTfndfirst(s, &o);
+                       BUN p = SORTfndfirst(s, &b->hseqbase);
+                       return BATslice(s, p, q);
                } else {
                        return BATdense(0, b->hseqbase, BATcount(b));
                }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to