Update of /cvsroot/monetdb/sql/src/storage/bat
In directory sc8-pr-cvs16:/tmp/cvs-serv3357
Modified Files:
bat_store.mx
Log Message:
The routines have been protected against NULL BATs leading to
a segmentation fault. The underlying cause still needs attention.
Index: bat_store.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/bat/bat_store.mx,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- bat_store.mx 3 May 2007 23:31:55 -0000 1.133
+++ bat_store.mx 7 May 2007 21:11:11 -0000 1.134
@@ -212,6 +212,8 @@
bat_set_access(b, BAT_READ);
assert(access==RDONLY);
}
+ if(b ==0)
+ return NULL;
b->batDirty |= 2;
if (access == INS || access == UPD) {
bat_set_access(b, BAT_WRITE);
@@ -230,6 +232,8 @@
if (isTemp(c) || access == INS || !c->bat.bid) {
assert(c->bat.ibid);
b = temp_descriptor(c->bat.ibid);
+ if(b ==0)
+ return NULL;
if (BATcount(b) == 0 && !VIEWparent(i) && i->htype ==
TYPE_void){
bat_destroy(b);
temp_destroy(c->bat.ibid);
@@ -256,6 +260,8 @@
BAT *b;
b = temp_descriptor(c->bat.ubid);
+ if(b ==0)
+ return NULL;
b->batDirty |= 2;
assert(b);
c->t->s->base.rtime = c->t->base.rtime = c->base.rtime = tr->stime;
@@ -272,6 +278,8 @@
BAT *b;
b = temp_descriptor(c->bat.ubid);
+ if(b ==0)
+ return NULL;
if (BATcount(b) == 0 && !VIEWparent(i)){
bat_destroy(b);
temp_destroy(c->bat.ubid);
@@ -294,6 +302,8 @@
BAT *b;
b = temp_descriptor(t->dbid);
+ if(b ==0)
+ return NULL;
b->batDirty |= 2;
t->s->base.rtime = t->base.rtime = tr->stime;
assert(access!=RD_UPD && access != UPD);
@@ -318,6 +328,8 @@
bat_set_access(b, BAT_READ);
assert(access==RDONLY || access == RD_UPD);
}
+ if(b ==0)
+ return NULL;
b->batDirty |= 2;
if (access == INS || access == UPD) {
bat_set_access(b, BAT_WRITE);
@@ -336,6 +348,8 @@
if (isTemp(i) || access == INS || !i->bat.bid) {
assert(i->bat.ibid);
b = temp_descriptor(i->bat.ibid);
+ if(b ==0)
+ return NULL;
if (BATcount(b) == 0 && !VIEWparent(ib) && ib->htype ==
TYPE_void){
bat_destroy(b);
temp_destroy(i->bat.ibid);
@@ -361,6 +375,8 @@
BAT *b;
b = temp_descriptor(i->bat.ubid);
+ if(b ==0)
+ return NULL;
b->batDirty |= 2;
assert(b);
i->base.rtime = i->t->base.rtime = i->t->s->base.rtime = tr->rtime =
tr->stime;
@@ -377,6 +393,8 @@
BAT *b;
b = temp_descriptor(i->bat.ubid);
+ if(b ==0)
+ return NULL;
if (BATcount(b) == 0 && !VIEWparent(ib)){
bat_destroy(b);
temp_destroy(i->bat.ubid);
-------------------------------------------------------------------------
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