Changeset: 5ddf5163da0c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5ddf5163da0c
Modified Files:
        sql/storage/store.c
Branch: hammertime
Log Message:

Remerge patch on validate_tables (r=c6fe2bd9de87) back in.


diffs (42 lines):

diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -4611,32 +4611,16 @@ validate_tables(sql_schema *s, sql_schem
        if (cs_size(&s->tables))
                for (n = s->tables.set->h; n; n = n->next) {
                        sql_table *t = n->data;
-                       sql_table *ot;
 
                        if (!t->base.wtime && !t->base.rtime)
                                continue;
 
-                       ot = find_sql_table_id(os, t->base.id);
-
-                       if (!ot) {
-                               // table might be deleted search the set of 
deleted tables.
-                               if (!os->tables.dset) {
-                                       // table must have been created in this 
transaction.
-                                       continue;
-                               }
-
-                               for (o = os->tables.dset->h; o; o = o->next) {
-                                       ot = o->data;
-                                       if (t->base.id == ot->base.id) {
-
-                                               /* We may have accessed a table 
wich has been removed by a previous committed transaction.
-                                                * If this is the case, we have 
to invalidate this transaction.
-                                                */
-                                               return 0;
-                                       }
-                               }
-                       }
-                       else if (isKindOfTable(ot) && isKindOfTable(t) && 
!isDeclaredTable(ot) && !isDeclaredTable(t)) {
+                       sql_table *ot = find_sql_table_id(os, t->base.id);
+
+                       if (!ot && os->tables.dset && 
list_find_base_id(os->tables.dset, t->base.id) != NULL) {
+                               /* dropped table */
+                               return 0;
+                       } else if (ot && isKindOfTable(ot) && isKindOfTable(t) 
&& !isDeclaredTable(ot) && !isDeclaredTable(t)) {
                                if ((t->base.wtime && (t->base.wtime < 
ot->base.rtime || t->base.wtime < ot->base.wtime)) ||
                                    (t->base.rtime && (t->base.rtime < 
ot->base.wtime)))
                                        return 0;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to