Re: MonetDB: comment-on - Use separate SQLstatementIntern to SET sys...
On 12/01/18 14:55, Joeri van Ruth wrote:
Changeset: ae04d7842803 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae04d7842803 Modified Files: sql/backends/monet5/sql_upgrades.c Branch: comment-on Log Message:
Use separate SQLstatementIntern to SET sys.keywords READ ONLY
Hopefully this fixes the upgrade failures.
It doesn't. :-(
diffs (45 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 @@ -1070,12 +1070,12 @@ sql_remove_environment_func(Client c, mv static str sql_create_comments_table(Client c) { - char *err, *q1, *q2; + char *err, *q;
- q1 = "" + q = "" "ALTER TABLE sys.keywords SET READ WRITE;\n" "INSERT INTO sys.keywords VALUES ('COMMENT');\n" - "ALTER TABLE sys.keywords SET READ ONLY;\n" + "-- ALTER TABLE sys.keywords SET READ ONLY;\n" "\n" "CREATE TABLE sys.comments (\n" " id INTEGER NOT NULL PRIMARY KEY,\n" @@ -1223,16 +1223,22 @@ sql_create_comments_table(Client c) "FROM commented_function_params\n" "ORDER BY line;\n" "GRANT SELECT ON sys.commented_function_signatures TO PUBLIC;\n"; - err = SQLstatementIntern(c, &q1, "update", 1, 0, NULL); + err = SQLstatementIntern(c, &q, "update", 1, 0, NULL); if (err) return err;
- q2 = "" + q = "" "UPDATE sys._tables\n" "SET system = true\n" "WHERE name = 'comments'\n" "AND schema_id = (SELECT id FROM sys.schemas WHERE name = 'sys');\n"; - return SQLstatementIntern(c, &q2, "update", 1, 0, NULL); + + err = SQLstatementIntern(c, &q, "update", 1, 0, NULL); + if (err) + return err; + + q = "ALTER TABLE sys.keywords SET READ ONLY;"; + return SQLstatementIntern(c, &q, "update", 1, 0, NULL); }
void _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
-- Sjoerd Mullender
On Fri, Jan 12, 2018 at 03:07:40PM +0100, Sjoerd Mullender wrote:
On 12/01/18 14:55, Joeri van Ruth wrote:
Changeset: ae04d7842803 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ae04d7842803 Modified Files: sql/backends/monet5/sql_upgrades.c Branch: comment-on Log Message:
Use separate SQLstatementIntern to SET sys.keywords READ ONLY
Hopefully this fixes the upgrade failures.
It doesn't. :-(
I'll disable it for the weekend and look for a fix next week.
participants (2)
-
Joeri van Ruth
-
Sjoerd Mullender