Changeset: bfabaa675a1c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfabaa675a1c
Modified Files:
        gdk/gdk_batop.mx
Branch: Apr2011
Log Message:

Don't use the same iterator twice in one expression.


diffs (22 lines):

diff --git a/gdk/gdk_batop.mx b/gdk/gdk_batop.mx
--- a/gdk/gdk_batop.mx
+++ b/gdk/gdk_batop.mx
@@ -1355,7 +1355,8 @@
        BUN cnt, i, r = 0, n, j;
        BUN *choice = NULL, *dst;
        BAT *bn;
-       BATiter bi = bat_iterator(b);
+       BATiter bi1 = bat_iterator(b);
+       BATiter bi2 = bat_iterator(b);
        BUN bun;
 
        BATcheck(b, "BATsample: source BAT required");
@@ -1445,7 +1446,7 @@
        for (j = 0; j < n; j++) {
                BUN p = bun + choice[j];
 
-               bunfastins(bn, BUNhead(bi, p), BUNtail(bi, p));
+               bunfastins(bn, BUNhead(bi1, p), BUNtail(bi2, p));
        }
        GDKfree(choice);        /* clean up choice array of BUN positions */
 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to