[Monetdb-developers] removing a BAT from C for real

Fabian Groffen Fabian.Groffen at cwi.nl
Tue May 5 16:24:06 CEST 2009


Can someone tell me how to remove a BAT in MonetDB from C code for good
and for REAL?

I'll probably miss something trivial, as I tried about 20 combinations
of how to get rid of a previously persistent BAT, but everytime I
restart my server it comes back again like a BIOS virus.

Place in the source:
monetdb5/src/mal/mal_authorize.mx, I want to remove an old
M5system_auth_* BAT after I created a new one with converted data in the
initTables function.

My latest incarnation looks like this (copied and pasted from destroyImmediate):

        BBPlogical(b->batCacheid, buf);
        BBPreleaseref(b->batCacheid);
        BBPfix(bid);
        if (BBPindex(buf) == bid) {
            BAT *t = (BAT*)BBPgetdesc(ABS(bid));

            BATmode(t, TRANSIENT);
        }
        BBPunfix(bid);

said BAT looks gone in the session, but returns next time the server
starts.  Can I (sub)commit the removed BAT?

Any hint on this strong persistence would be nice.




More information about the developers-list mailing list