Update of /cvsroot/monetdb/sql/src/storage/bat
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22365/src/storage/bat
Modified Files:
Tag: SQL_2-18
bat_store.mx
Log Message:
make sure we only clear tables which need that, ie not those with AC_PRESERVE
Index: bat_store.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/bat/bat_store.mx,v
retrieving revision 1.138.2.5
retrieving revision 1.138.2.6
diff -u -d -r1.138.2.5 -r1.138.2.6
--- bat_store.mx 30 Jun 2007 13:21:21 -0000 1.138.2.5
+++ bat_store.mx 3 Jul 2007 10:16:31 -0000 1.138.2.6
@@ -4036,15 +4036,18 @@
if (isTempSchema(fs)) {
if (fs->tables.set) {
node *n;
- for (n = fs->tables.set->h; n; n = n->next) {
+ for (n = fs->tables.set->h; n; ) {
+ node *nxt = n->next;
sql_table *t = n->data;
- if ((isTable(t) && isGlobalTable(t)) ||
+ if ((isTable(t) && isGlobalTable(t) &&
+ t->commit_action != CA_PRESERVE) ||
t->commit_action == CA_DELETE) {
sql_trans_clear_table(tr, t);
} else if (t->commit_action == CA_DROP) {
sql_trans_drop_table(tr, t->s,
t->base.id, DROP_RESTRICT);
}
+ n = nxt;
}
}
return ok;
@@ -4387,15 +4390,18 @@
if (isTempSchema(fs)) {
if (fs->tables.set) {
node *n;
- for (n = fs->tables.set->h; n; n = n->next) {
+ for (n = fs->tables.set->h; n; ) {
+ node *nxt = n->next;
sql_table *t = n->data;
- if ((isTable(t) && isGlobalTable(t)) ||
- t->commit_action == CA_DELETE) {
+ if ((isTable(t) && isGlobalTable(t) &&
+ t->commit_action != CA_PRESERVE) ||
+ t->commit_action == CA_DELETE) {
sql_trans_clear_table(tr, t);
} else if (t->commit_action == CA_DROP) {
sql_trans_drop_table(tr, t->s,
t->base.id, DROP_RESTRICT);
}
+ n = nxt;
}
}
return ok;
-------------------------------------------------------------------------
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