Changeset: 568c691f8d93 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=568c691f8d93
Modified Files:
        sql/backends/monet5/sql_upgrades.c
Branch: default
Log Message:

Merge with Apr2019


diffs (176 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
@@ -21,10 +21,6 @@
 #include "rel_remote.h"
 #include "mal_authorize.h"
 
-#ifdef HAVE_EMBEDDED
-#define printf(fmt,...) ((void) 0)
-#endif
-
 /* this function can be used to recreate the system tables (types,
  * functions, args) when internal types and/or functions have changed
  * (i.e. the ones in sql_types.c) */
@@ -252,7 +248,6 @@ sql_update_hugeint(Client c, mvc *sql)
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
        assert(pos < bufsize);
 
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -304,7 +299,6 @@ sql_update_geom(Client c, mvc *sql, int 
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
        assert(pos < bufsize);
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -420,7 +414,6 @@ sql_update_jul2017(Client c, mvc *sql)
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
        assert(pos < bufsize);
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -465,7 +458,6 @@ sql_update_jul2017_sp2(Client c)
                                "GRANT EXECUTE ON FUNCTION sys.environment() TO 
PUBLIC;\n"
                                "GRANT SELECT ON sys.environment TO PUBLIC;\n"
                                );
-                       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
                        assert(pos < bufsize);
                        printf("Running database upgrade commands:\n%s\n", buf);
                        err = SQLstatementIntern(c, &buf, "update", 1, 0, NULL);
@@ -518,7 +510,6 @@ sql_update_jul2017_sp3(Client c, mvc *sq
                        "create trigger system_update_tables after update on 
sys._tables for each statement call sys_update_tables();\n");
                if (schema)
                        pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-               pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
                assert(pos < bufsize);
                printf("Running database upgrade commands:\n%s\n", buf);
                err = SQLstatementIntern(c, &buf, "update", 1, 0, NULL);
@@ -557,7 +548,6 @@ sql_update_mar2018_geom(Client c, mvc *s
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
        assert(pos < bufsize);
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1028,7 +1018,6 @@ sql_update_mar2018(Client c, mvc *sql)
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
        assert(pos < bufsize);
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1041,7 +1030,7 @@ sql_update_mar2018(Client c, mvc *sql)
                               "ALTER TABLE sys.function_languages SET READ 
ONLY;\n");
                if (schema)
                        pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-               pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
+               assert(pos < bufsize);
                printf("Running database upgrade commands:\n%s\n", buf);
                err = SQLstatementIntern(c, &buf, "update", 1, 0, NULL);
        }
@@ -1076,7 +1065,6 @@ sql_update_mar2018_netcdf(Client c, mvc 
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
        assert(pos < bufsize);
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1155,7 +1143,6 @@ sql_update_mar2018_samtools(Client c, mv
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
        assert(pos < bufsize);
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1183,7 +1170,6 @@ sql_update_mar2018_sp1(Client c, mvc *sq
                        "update sys.functions set system = true where name in 
('dependencies_functions_on_triggers') and schema_id = (select id from 
sys.schemas where name = 'sys');\n");
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
        assert(pos < bufsize);
 
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1217,7 +1203,6 @@ sql_update_remote_tables(Client c, mvc *
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
        assert(pos < bufsize);
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1345,7 +1330,6 @@ sql_replace_Mar2018_ids_view(Client c, m
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
        assert(pos < bufsize);
 
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1368,7 +1352,6 @@ sql_update_gsl(Client c, mvc *sql)
                        "drop function sys.chi2prob(double, double);\n");
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
        assert(pos < bufsize);
 
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1398,7 +1381,6 @@ sql_update_aug2018(Client c, mvc *sql)
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
        assert(pos < bufsize);
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1443,7 +1425,6 @@ sql_update_aug2018_sp2(Client c, mvc *sq
 
                        if (schema)
                                pos += snprintf(buf + pos, bufsize - pos, "set 
schema \"%s\";\n", schema);
-                       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
                        assert(pos < bufsize);
                        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1488,7 +1469,6 @@ sql_drop_functions_dependencies_Xs_on_Ys
                        "DROP FUNCTION dependencies_keys_on_foreignKeys();\n");
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
        assert(pos < bufsize);
 
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1579,7 +1559,6 @@ sql_update_apr2019(Client c, mvc *sql)
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
 
        assert(pos < bufsize);
        printf("Running database upgrade commands:\n%s\n", buf);
@@ -1590,7 +1569,7 @@ sql_update_apr2019(Client c, mvc *sql)
                               "ALTER TABLE sys.keywords SET READ ONLY;\n");
                if (schema)
                        pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-               pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
+               assert(pos < bufsize);
                printf("Running database upgrade commands:\n%s\n", buf);
                err = SQLstatementIntern(c, &buf, "update", 1, 0, NULL);
        }
@@ -1911,7 +1890,6 @@ sql_update_storagemodel(Client c, mvc *s
 
        if (schema)
                pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", schema);
-       pos += snprintf(buf + pos, bufsize - pos, "commit;\n");
        assert(pos < bufsize);
 
        printf("Running database upgrade commands:\n%s\n", buf);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to