Changeset: 0f5ba6e73f36 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0f5ba6e73f36
Modified Files:
        sql/storage/sql_catalog.c
        sql/storage/store.c
Branch: Jun2020
Log Message:

don't return already deleted nodes in cs_find_id
more cleanup (cleanup deleted tables in the spare transactions).


diffs (52 lines):

diff --git a/sql/storage/sql_catalog.c b/sql/storage/sql_catalog.c
--- a/sql/storage/sql_catalog.c
+++ b/sql/storage/sql_catalog.c
@@ -113,17 +113,6 @@ cs_find_id(changeset * cs, sqlid id)
                                return n;
                        }
                }
-       if (cs->dset) {
-               l = cs->dset;
-               for (n = l->h; n; n = n->next) {
-                       sql_base *b = n->data;
-
-                       /* check if names match */
-                       if (b && b->id == id) {
-                               return n;
-                       }
-               }
-       }
        return NULL;
 }
 
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -2357,6 +2357,11 @@ cleanup_table(sql_table *t)
                for (int i = 0; i<spares; i++) {
                        for (node *m = spare_trans[i]->schemas.set->h; m; m = 
m->next) {
                                sql_schema * schema = m->data;
+
+                               if (schema->tables.dset) {
+                                       list_destroy(schema->tables.dset);
+                                       schema->tables.dset = NULL;
+                               }
                                node *o = find_sql_table_node(schema, 
t->base.id);
                                if (o) {
                                        list_remove_node(schema->tables.set, o);
@@ -4082,6 +4087,7 @@ rollforward_changeset_updates(sql_trans 
                        list_destroy(fs->dset);
                        fs->dset = NULL;
                }
+               /*
                if (!apply && ts->dset) {
                        for (n = ts->dset->h; ok == LOG_OK && n; n = n->next) {
                                sql_base *tb = n->data;
@@ -4090,6 +4096,7 @@ rollforward_changeset_updates(sql_trans 
                                        ok = rollforward_deletes(tr, tb, mode);
                        }
                }
+               */
                if (apply && ts->dset && !cf) {
                        list_destroy(ts->dset);
                        ts->dset = NULL;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to