Changeset: 49cedcb28409 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=49cedcb28409
Branch: mtest
Log Message:

Merged with default


diffs (76 lines):

diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -2568,12 +2568,14 @@ sql_update_default(Client c, mvc *sql, c
 
                        pos = snprintf(buf, bufsize, "set schema \"sys\";\n");
 
-                       /* 51_sys_schema_extensions, remove stream table 
entries */
+                       /* 51_sys_schema_extensions, remove stream table 
entries and update window function description */
                        pos += snprintf(buf + pos, bufsize - pos,
                                        "ALTER TABLE sys.keywords SET READ 
WRITE;\n"
                                        "DELETE FROM sys.keywords where keyword 
= 'STREAM';\n"
                                        "ALTER TABLE sys.table_types SET READ 
WRITE;\n"
-                                       "DELETE FROM sys.table_types where 
table_type_id = 4;\n");
+                                       "DELETE FROM sys.table_types where 
table_type_id = 4;\n"
+                                       "ALTER TABLE sys.function_types SET 
READ WRITE;\n"
+                                       "UPDATE sys.function_types SET 
function_type_keyword = 'WINDOW' WHERE function_type_id = 6;\n");
 
                        pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
                        pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", prev_schema);
@@ -2585,7 +2587,8 @@ sql_update_default(Client c, mvc *sql, c
 
                        pos = snprintf(buf, bufsize, "set schema \"sys\";\n"
                                        "ALTER TABLE sys.keywords SET READ 
ONLY;\n"
-                                       "ALTER TABLE sys.table_types SET READ 
ONLY;\n");
+                                       "ALTER TABLE sys.table_types SET READ 
ONLY;\n"
+                                       "ALTER TABLE sys.function_types SET 
READ ONLY;\n");
                        pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", prev_schema);
                        assert(pos < bufsize);
                        printf("Running database upgrade commands:\n%s\n", buf);
@@ -2593,14 +2596,6 @@ sql_update_default(Client c, mvc *sql, c
                }
        }
 
-       if (!err)
-               err = SQLstatementIntern(
-                                       c,
-                                       "ALTER TABLE sys.function_types SET 
READ WRITE;\n"
-                                       "UPDATE sys.function_types SET 
function_type_keyword = 'WINDOW' WHERE function_type_id = 6;\n",
-                                       "ALTER TABLE sys.function_types SET 
READ ONLY;\n"
-                                       "update", true, false, NULL);
-
 bailout:
        if (b)
                BBPunfix(b->batCacheid);
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -2363,6 +2363,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);
@@ -4125,6 +4130,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;
@@ -4133,6 +4139,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