Update of /cvsroot/monetdb/MonetDB4/src/monet
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18382/src/monet

Modified Files:
        monet_multiplex.mx 
Log Message:
propagated changes of Tuesday Aug 21 2007 - Thursday Aug 23 2007
from the MonetDB_4-18 branch to the development trunk


Index: monet_multiplex.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB4/src/monet/monet_multiplex.mx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- monet_multiplex.mx  20 Feb 2007 11:32:16 -0000      1.4
+++ monet_multiplex.mx  23 Aug 2007 12:45:51 -0000      1.5
@@ -1430,7 +1430,7 @@
        BAT *b, *nested, *nested_rev, *histo = 0, *extent = 0, *ret = 0;
        size_t minpos;
        int ret_val = -1, varsize, head_type, hidden_vartype = 0;
-       int prop_key, prop_sorted = 0;
+       int prop_key, prop_sorted = 0, restore = 1;
        GDKfcn direct_call = NULL, packed_call = NULL;
        ValRecord argv_bak;
        BUN p, q, r, s;
@@ -1688,6 +1688,7 @@
                assert(batbuns->base!=(ptr)1);
                nested->batDeleted = nested->batInserted = batbuns->base;
 
+               restore = 0;
                if (direct_call == NULL) {
                        if (GDKdebug & 131072)
                                THRprintf(GDKout, "setaggr impl: non-optimized 
hash\n");
@@ -1814,8 +1815,19 @@
        argv[1] = argv_bak;
 
        /* undo all our hacks in nested before freeing it */
-       *(BATstore*) nested = nested_bak;
-       *(BAT*) nested_rev = nested_rev_bak;
+       if (restore) {
+               *(BATstore*) nested = nested_bak;
+               *(BAT*) nested_rev = nested_rev_bak;
+       } else {
+               BATstore *n = (BATstore*)nested;
+               nested->H = &n->H;
+               nested->T = &n->T;
+               nested_rev->H = &n->T;
+               nested_rev->T = &n->H;
+               nested_rev->dims = nested_rev_bak.dims;
+               nested->dims = nested_bak.B.dims;
+               nested->hheap = NULL;
+       }
        BBPreclaim(nested);
 
        if (ret_val < 0) {


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to