Changeset: 5ff4e5d5ec49 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5ff4e5d5ec49
Modified Files:
        MonetDB.spec
        debian/control
        gdk/gdk_batop.c
Branch: default
Log Message:

Merge with Jun2016 branch.


diffs (30 lines):

diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1146,6 +1146,8 @@ BATsort(BAT **sorted, BAT **order, BAT *
                assert(g->ttype == TYPE_oid);
                grps = (oid *) Tloc(g, 0);
                prev = grps[0];
+               if (BATmaterialize(bn) != GDK_SUCCEED)
+                       goto error;
                for (r = 0, p = 1, q = BATcount(g); p < q; p++) {
                        if (grps[p] != prev) {
                                /* sub sort [r,p) */
@@ -1179,11 +1181,12 @@ BATsort(BAT **sorted, BAT **order, BAT *
                        b->tsorted = b->trevsorted = 1;
                }
                if (!(reverse ? bn->trevsorted : bn->tsorted) &&
-                   do_sort(Tloc(bn, 0),
-                           on ? Tloc(on, 0) : NULL,
-                           bn->tvheap ? bn->tvheap->base : NULL,
-                           BATcount(bn), Tsize(bn), on ? Tsize(on) : 0,
-                           bn->ttype, reverse, stable) != GDK_SUCCEED)
+                   (BATmaterialize(bn) != GDK_SUCCEED ||
+                    do_sort(Tloc(bn, 0),
+                            on ? Tloc(on, 0) : NULL,
+                            bn->tvheap ? bn->tvheap->base : NULL,
+                            BATcount(bn), Tsize(bn), on ? Tsize(on) : 0,
+                            bn->ttype, reverse, stable) != GDK_SUCCEED))
                        goto error;
                bn->tsorted = !reverse;
                bn->trevsorted = reverse;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to