Update of /cvsroot/monetdb/sql/src/storage/bat
In directory sc8-pr-cvs16:/tmp/cvs-serv7125/src/storage/bat

Modified Files:
        bat_store.mx 
Log Message:
reverting martins changes, instead use assert to detect broken catalog problems


Index: bat_store.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/bat/bat_store.mx,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- bat_store.mx        7 May 2007 21:11:11 -0000       1.134
+++ bat_store.mx        8 May 2007 08:25:52 -0000       1.135
@@ -212,8 +212,7 @@
                bat_set_access(b, BAT_READ);
                assert(access==RDONLY);
        }
-       if(b ==0)
-               return NULL;
+       assert(b);
        b->batDirty |= 2;
        if (access == INS || access == UPD) {
                bat_set_access(b, BAT_WRITE);
@@ -232,8 +231,7 @@
        if (isTemp(c) || access == INS || !c->bat.bid) {
                assert(c->bat.ibid);
                b = temp_descriptor(c->bat.ibid);
-               if(b ==0)
-                       return NULL;
+               assert(b);
                if (BATcount(b) == 0 && !VIEWparent(i) && i->htype == 
TYPE_void){
                        bat_destroy(b);
                        temp_destroy(c->bat.ibid);
@@ -260,10 +258,8 @@
        BAT *b;
 
        b = temp_descriptor(c->bat.ubid);
-       if(b ==0)
-               return NULL;
-       b->batDirty |= 2;
        assert(b);
+       b->batDirty |= 2;
        c->t->s->base.rtime = c->t->base.rtime = c->base.rtime = tr->stime;
        if (access == INS || access == UPD) {
                bat_set_access(b, BAT_WRITE);
@@ -278,8 +274,7 @@
        BAT *b;
 
        b = temp_descriptor(c->bat.ubid);
-       if(b ==0)
-               return NULL;
+       assert(b);
        if (BATcount(b) == 0 && !VIEWparent(i)){ 
                bat_destroy(b);
                temp_destroy(c->bat.ubid);
@@ -288,7 +283,6 @@
        } else {
                BATappend(b, i, TRUE);
        }
-       assert(b);
        b->batDirty |= 2;
        c->t->s->base.rtime = c->t->base.rtime = c->base.rtime = tr->stime;
        if (access == INS || access == UPD) 
@@ -302,8 +296,7 @@
        BAT *b;
 
        b = temp_descriptor(t->dbid);
-       if(b ==0)
-               return NULL;
+       assert(b);
        b->batDirty |= 2;
        t->s->base.rtime = t->base.rtime = tr->stime;
        assert(access!=RD_UPD && access != UPD);
@@ -311,7 +304,6 @@
                bat_set_access(b, BAT_WRITE);
                t->base.wtime = t->s->base.wtime = tr->wtime = tr->stime;
        }
-       assert(b);
        return b;
 }
 
@@ -328,15 +320,13 @@
                bat_set_access(b, BAT_READ);
                assert(access==RDONLY || access == RD_UPD);
        }
-       if(b ==0)
-               return NULL;
+       assert(b);
        b->batDirty |= 2;
        if (access == INS || access == UPD) {
                bat_set_access(b, BAT_WRITE);
                i->base.wtime = i->t->base.wtime = i->t->s->base.wtime = 
tr->wtime = tr->stime;
        }
        i->base.rtime = i->t->base.rtime = i->t->s->base.rtime = tr->rtime = 
tr->stime;
-       assert(b);
        return b;
 }
 
@@ -348,8 +338,7 @@
        if (isTemp(i) || access == INS || !i->bat.bid) {
                assert(i->bat.ibid);
                b = temp_descriptor(i->bat.ibid);
-               if(b ==0)
-                       return NULL;
+               assert(b);
                if (BATcount(b) == 0 && !VIEWparent(ib) && ib->htype == 
TYPE_void){ 
                        bat_destroy(b);
                        temp_destroy(i->bat.ibid);
@@ -361,7 +350,6 @@
        } else {
                assert(0); /* RDONLY appends ???? */
        }
-       assert(b != NULL);
        b->batDirty |= 2;
        if (access == INS) 
                i->base.wtime = i->t->base.wtime = i->t->s->base.wtime = 
tr->wtime = tr->stime;
@@ -375,10 +363,8 @@
        BAT *b;
 
        b = temp_descriptor(i->bat.ubid);
-       if(b ==0)
-               return NULL;
-       b->batDirty |= 2;
        assert(b);
+       b->batDirty |= 2;
        i->base.rtime = i->t->base.rtime = i->t->s->base.rtime = tr->rtime = 
tr->stime;
        if (access == INS || access == UPD) {
                bat_set_access(b, BAT_WRITE);
@@ -393,8 +379,7 @@
        BAT *b;
 
        b = temp_descriptor(i->bat.ubid);
-       if(b ==0)
-               return NULL;
+       assert(b);
        if (BATcount(b) == 0 && !VIEWparent(ib)){ 
                bat_destroy(b);
                temp_destroy(i->bat.ubid);
@@ -403,7 +388,6 @@
        } else {
                BATappend(b, ib, TRUE);
        }
-       assert(b);
        b->batDirty |= 2;
        if (access == INS || access == UPD) 
                i->base.wtime = i->t->base.wtime = i->t->s->base.wtime = 
tr->wtime = tr->stime;


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to