Update of /cvsroot/monetdb/MonetDB5/src/modules/kernel
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5857

Modified Files:
        bat5.mx 
Log Message:
The operation BATdel returns the argument or NULL. The code always released
the target.


Index: bat5.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/bat5.mx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- bat5.mx     26 May 2007 16:13:46 -0000      1.20
+++ bat5.mx     11 Sep 2007 20:20:41 -0000      1.21
@@ -2058,14 +2058,13 @@
                throw(MAL, "bat.delete", "Cannot access descriptor");
        }
 
-       bn=BATdel(b, s,FALSE);
-       if(bn==NULL )
-               BBPreleaseref(b->batCacheid);
-       else
-               BBPreleaseref(bn->batCacheid);
+       bn=BATdel(b, s, FALSE);
        BBPreleaseref(s->batCacheid);
-       if(bn && bn->batCacheid != b->batCacheid)
+       if( bn ==0){
+               BBPreleaseref(b->batCacheid);
                throw(MAL, "bat.delete_bat_buns", "GDKerror, different BAT 
returned");
+       }
+       BBPkeepref(*r= bn->batCacheid);
        return MAL_SUCCEED;
 }
 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to