Changeset: 510997c12ba9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=510997c12ba9
Modified Files:
        sql/backends/monet5/datacell/basket.mx
Branch: default
Log Message:

Keep the link with the relation
By keeking the link, we can inspect the basket before it is
shipped to another.


diffs (45 lines):

diff --git a/sql/backends/monet5/datacell/basket.mx 
b/sql/backends/monet5/datacell/basket.mx
--- a/sql/backends/monet5/datacell/basket.mx
+++ b/sql/backends/monet5/datacell/basket.mx
@@ -239,13 +239,7 @@
                        mal_unset_lock(mal_contextLock, "register");
                        throw(SQL, "sql.basket", "Can not access descriptor");
                }
-               if (b->htype == TYPE_oid) {
-                       baskets[idx].primary[i] = BATnew(TYPE_void, b->ttype, 
0);
-                       BATseqbase(baskets[idx].primary[i], 0);
-               } else
-                       baskets[idx].primary[i] = BATnew(b->htype, b->ttype, 0);
-
-               BBPreleaseref(b->batCacheid);
+               baskets[idx].primary[i] = b;
                baskets[idx].cols[i++] = GDKstrdup(c->base.name);
        }
        mal_unset_lock(mal_contextLock, "register");
@@ -385,7 +379,7 @@
 {
        str tbl;
        int bskt, i, *ret;
-       BAT *b;
+       BAT *b,*bn;
 
        (void) cntxt;
        (void) mb;
@@ -400,14 +394,10 @@
        for ( i=0; i < baskets[bskt].colcount; i++) {
                ret= (int*) getArgReference(stk,pci,i);
                b = baskets[bskt].primary[i];
-               *ret = b->batCacheid;
-               BBPfix(*ret);
+               bn = BATcopy(b, b->htype, b->ttype,TRUE);
+               *ret = bn->batCacheid;
                BBPkeepref(*ret);
-               if (  b->htype == TYPE_oid) {
-                       baskets[bskt].primary[i] = BATnew(TYPE_void, b->ttype, 
0);
-                       BATseqbase(baskets[bskt].primary[i], 0);
-               } else
-                       baskets[bskt].primary[i] = BATnew(b->htype, b->ttype, 
0);
+               BATclear(b);
        }
        mal_unset_lock(baskets[bskt].lock, "unlock basket");
        return MAL_SUCCEED;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to