Changeset: 12560647dcc1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=12560647dcc1 Modified Files: sql/backends/monet5/sql_scenario.c sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out Branch: Oct2014 Log Message:
Fix upgrade code and approve output after changesets 938e614078b6, 7bd0698c0cdd. diffs (51 lines): diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -1439,6 +1439,8 @@ CREATE FUNCTION \"left_shift\"(i1 inet, CREATE FUNCTION \"right_shift\"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet.\">>\";\n\ CREATE FUNCTION \"left_shift_assign\"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet.\"<<=\";\n\ CREATE FUNCTION \"right_shift_assign\"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet.\">>=\";\n"); + pos += snprintf(buf + pos, bufsize - pos, "insert into sys.systemfunctions (select id from sys.functions where name in ('left_shift', 'right_shift', 'left_shift_assign', 'right_shift_assign') and schema_id = (select id from sys.schemas where name = 'sys') and id not in (select function_id from sys.systemfunctions));\n"); + pos += snprintf(buf + pos, bufsize - pos, "update sys.types set eclass = eclass + 1 where eclass >= %d and sqlname <> 'oid';\n", EC_POS); if (schema) { pos += snprintf(buf + pos, bufsize - pos, "set schema \"%s\";\n", schema); diff --git a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out --- a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out +++ b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out @@ -19,6 +19,15 @@ stdout of test 'upgrade` in directory 's # MonetDB/SQL module loaded Ready. +Running database upgrade commands: +set schema "sys"; +CREATE FUNCTION "left_shift"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet."<<"; +CREATE FUNCTION "right_shift"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet.">>"; +CREATE FUNCTION "left_shift_assign"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet."<<="; +CREATE FUNCTION "right_shift_assign"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet.">>="; +insert into sys.systemfunctions (select id from sys.functions where name in ('left_shift', 'right_shift', 'left_shift_assign', 'right_shift_assign') and schema_id = (select id from sys.schemas where name = 'sys') and id not in (select function_id from sys.systemfunctions)); +update sys.types set eclass = eclass + 1 where eclass >= 6 and sqlname <> 'oid'; +set schema "testschema"; # 09:43:35 > # 09:43:35 > "/usr/bin/python2" "upgrade.SQL.py" "upgrade" diff --git a/sql/test/testdb-upgrade/Tests/upgrade.stable.out b/sql/test/testdb-upgrade/Tests/upgrade.stable.out --- a/sql/test/testdb-upgrade/Tests/upgrade.stable.out +++ b/sql/test/testdb-upgrade/Tests/upgrade.stable.out @@ -16,6 +16,16 @@ stdout of test 'upgrade` in directory 's Ready. +Running database upgrade commands: +set schema "sys"; +CREATE FUNCTION "left_shift"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet."<<"; +CREATE FUNCTION "right_shift"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet.">>"; +CREATE FUNCTION "left_shift_assign"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet."<<="; +CREATE FUNCTION "right_shift_assign"(i1 inet, i2 inet) RETURNS boolean EXTERNAL NAME inet.">>="; +insert into sys.systemfunctions (select id from sys.functions where name in ('left_shift', 'right_shift', 'left_shift_assign', 'right_shift_assign') and schema_id = (select id from sys.schemas where name = 'sys') and id not in (select function_id from sys.systemfunctions)); +update sys.types set eclass = eclass + 1 where eclass >= 6 and sqlname <> 'oid'; +set schema "testschema"; + # 17:31:24 > # 17:31:24 > "/usr/bin/python2" "upgrade.SQL.py" "upgrade" _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list