Changeset: 364c8289686d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=364c8289686d
Modified Files:
        sql/backends/monet5/sql_upgrades.c
        sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.ppc64.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64.int128
        sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade/Tests/upgrade.stable.out
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
Branch: oscar
Log Message:

Fixing some upgrades.


diffs (truncated from 609 to 300 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
@@ -2254,13 +2254,20 @@ sql_update_default(Client c, mvc *sql, c
                                        "external name 
\"sql\".\"sql_variables\";\n"
                                        "grant execute on function 
\"sys\".\"var\" to public;\n");
 
+                       pos += snprintf(buf + pos, bufsize - pos,
+                                       "create procedure 
sys.hot_snapshot(tarfile string, onserver bool)\n"
+                                       "external name sql.hot_snapshot;\n"
+                                       "update sys.functions set system = true 
where system <> true and schema_id = (select id from sys.schemas where name = 
'sys')"
+                                       " and name in ('hot_snapshot') and type 
= %d;\n",
+                                       (int) F_PROC);
                        /* .snapshot user */
                        pos += snprintf(buf + pos, bufsize - pos,
-                               "create user \".snapshot\""
-                               " with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'"
-                               " name 'Snapshot User'"
-                               " schema sys;"
-                               "grant execute on procedure sys.hot_snapshot to 
\".snapshot\";"
+                               "create user \".snapshot\"\n"
+                               " with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'\n"
+                               " name 'Snapshot User'\n"
+                               " schema sys;\n"
+                               "grant execute on procedure 
sys.hot_snapshot(string) to \".snapshot\";\n"
+                               "grant execute on procedure 
sys.hot_snapshot(string, bool) to \".snapshot\";\n"
                        );
 
                        /* update system tables so that the content
@@ -2416,7 +2423,8 @@ sql_update_default(Client c, mvc *sql, c
                                        "('octet_length', 'nbytes'),\n"
                                        "('soundex', 'soundex'),\n"
                                        "('qgramnormalize', 'qgramnormalize')\n"
-                                       ");\n");
+                                       ") and type <> %d;\n",
+                                       F_ANALYTIC);
 
                        pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", prev_schema);
                        assert(pos < bufsize);
diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
@@ -5769,7 +5769,16 @@ update sys._tables set system = true whe
 drop function "sys"."var"();
 create function "sys"."var"() returns table("schema" string, "name" string, 
"type" string, "value" string) external name "sql"."sql_variables";
 grant execute on function "sys"."var" to public;
-create user ".snapshot" with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
 name 'Snapshot User' schema sys;grant execute on procedure sys.hot_snapshot to 
".snapshot";update sys.functions set system = true, language = 2, side_effect = 
false where name = 'var' and schema_id = (select id from sys.schemas where name 
= 'sys') and type = 5;
+create procedure sys.hot_snapshot(tarfile string, onserver bool)
+external name sql.hot_snapshot;
+update sys.functions set system = true where system <> true and schema_id = 
(select id from sys.schemas where name = 'sys') and name in ('hot_snapshot') 
and type = 2;
+create user ".snapshot"
+ with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+ name 'Snapshot User'
+ schema sys;
+grant execute on procedure sys.hot_snapshot(string) to ".snapshot";
+grant execute on procedure sys.hot_snapshot(string, bool) to ".snapshot";
+update sys.functions set system = true, language = 2, side_effect = false 
where name = 'var' and schema_id = (select id from sys.schemas where name = 
'sys') and type = 5;
 update sys.args set type = 'char' where func_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5) and type = 'clob';
 update sys.privileges set grantor = 0 where obj_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5);
 DROP FUNCTION "sys"."getcontent"(url);
@@ -5900,7 +5909,7 @@ UPDATE sys.functions set semantics = fal
 ('octet_length', 'nbytes'),
 ('soundex', 'soundex'),
 ('qgramnormalize', 'qgramnormalize')
-);
+) and type <> 6;
 set schema "sys";
 
 # MonetDB/SQL module loaded
diff --git 
a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.ppc64.int128 
b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.ppc64.int128
--- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.ppc64.int128
+++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.ppc64.int128
@@ -5769,7 +5769,16 @@ update sys._tables set system = true whe
 drop function "sys"."var"();
 create function "sys"."var"() returns table("schema" string, "name" string, 
"type" string, "value" string) external name "sql"."sql_variables";
 grant execute on function "sys"."var" to public;
-create user ".snapshot" with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
 name 'Snapshot User' schema sys;grant execute on procedure sys.hot_snapshot to 
".snapshot";update sys.functions set system = true, language = 2, side_effect = 
false where name = 'var' and schema_id = (select id from sys.schemas where name 
= 'sys') and type = 5;
+create procedure sys.hot_snapshot(tarfile string, onserver bool)
+external name sql.hot_snapshot;
+update sys.functions set system = true where system <> true and schema_id = 
(select id from sys.schemas where name = 'sys') and name in ('hot_snapshot') 
and type = 2;
+create user ".snapshot"
+ with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+ name 'Snapshot User'
+ schema sys;
+grant execute on procedure sys.hot_snapshot(string) to ".snapshot";
+grant execute on procedure sys.hot_snapshot(string, bool) to ".snapshot";
+update sys.functions set system = true, language = 2, side_effect = false 
where name = 'var' and schema_id = (select id from sys.schemas where name = 
'sys') and type = 5;
 update sys.args set type = 'char' where func_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5) and type = 'clob';
 update sys.privileges set grantor = 0 where obj_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5);
 DROP FUNCTION "sys"."getcontent"(url);
@@ -5900,7 +5909,7 @@ UPDATE sys.functions set semantics = fal
 ('octet_length', 'nbytes'),
 ('soundex', 'soundex'),
 ('qgramnormalize', 'qgramnormalize')
-);
+) and type <> 6;
 set schema "sys";
 
 # MonetDB/SQL module loaded
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
@@ -5011,7 +5011,16 @@ update sys._tables set system = true whe
 drop function "sys"."var"();
 create function "sys"."var"() returns table("schema" string, "name" string, 
"type" string, "value" string) external name "sql"."sql_variables";
 grant execute on function "sys"."var" to public;
-create user ".snapshot" with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
 name 'Snapshot User' schema sys;grant execute on procedure sys.hot_snapshot to 
".snapshot";update sys.functions set system = true, language = 2, side_effect = 
false where name = 'var' and schema_id = (select id from sys.schemas where name 
= 'sys') and type = 5;
+create procedure sys.hot_snapshot(tarfile string, onserver bool)
+external name sql.hot_snapshot;
+update sys.functions set system = true where system <> true and schema_id = 
(select id from sys.schemas where name = 'sys') and name in ('hot_snapshot') 
and type = 2;
+create user ".snapshot"
+ with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+ name 'Snapshot User'
+ schema sys;
+grant execute on procedure sys.hot_snapshot(string) to ".snapshot";
+grant execute on procedure sys.hot_snapshot(string, bool) to ".snapshot";
+update sys.functions set system = true, language = 2, side_effect = false 
where name = 'var' and schema_id = (select id from sys.schemas where name = 
'sys') and type = 5;
 update sys.args set type = 'char' where func_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5) and type = 'clob';
 update sys.privileges set grantor = 0 where obj_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5);
 DROP FUNCTION "sys"."getcontent"(url);
@@ -5142,7 +5151,7 @@ UPDATE sys.functions set semantics = fal
 ('octet_length', 'nbytes'),
 ('soundex', 'soundex'),
 ('qgramnormalize', 'qgramnormalize')
-);
+) and type <> 6;
 set schema "sys";
 
 # MonetDB/SQL module loaded
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
@@ -5011,7 +5011,16 @@ update sys._tables set system = true whe
 drop function "sys"."var"();
 create function "sys"."var"() returns table("schema" string, "name" string, 
"type" string, "value" string) external name "sql"."sql_variables";
 grant execute on function "sys"."var" to public;
-create user ".snapshot" with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
 name 'Snapshot User' schema sys;grant execute on procedure sys.hot_snapshot to 
".snapshot";update sys.functions set system = true, language = 2, side_effect = 
false where name = 'var' and schema_id = (select id from sys.schemas where name 
= 'sys') and type = 5;
+create procedure sys.hot_snapshot(tarfile string, onserver bool)
+external name sql.hot_snapshot;
+update sys.functions set system = true where system <> true and schema_id = 
(select id from sys.schemas where name = 'sys') and name in ('hot_snapshot') 
and type = 2;
+create user ".snapshot"
+ with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+ name 'Snapshot User'
+ schema sys;
+grant execute on procedure sys.hot_snapshot(string) to ".snapshot";
+grant execute on procedure sys.hot_snapshot(string, bool) to ".snapshot";
+update sys.functions set system = true, language = 2, side_effect = false 
where name = 'var' and schema_id = (select id from sys.schemas where name = 
'sys') and type = 5;
 update sys.args set type = 'char' where func_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5) and type = 'clob';
 update sys.privileges set grantor = 0 where obj_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5);
 DROP FUNCTION "sys"."getcontent"(url);
@@ -5142,7 +5151,7 @@ UPDATE sys.functions set semantics = fal
 ('octet_length', 'nbytes'),
 ('soundex', 'soundex'),
 ('qgramnormalize', 'qgramnormalize')
-);
+) and type <> 6;
 set schema "sys";
 
 # MonetDB/SQL module loaded
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
@@ -5843,7 +5843,16 @@ update sys._tables set system = true whe
 drop function "sys"."var"();
 create function "sys"."var"() returns table("schema" string, "name" string, 
"type" string, "value" string) external name "sql"."sql_variables";
 grant execute on function "sys"."var" to public;
-create user ".snapshot" with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
 name 'Snapshot User' schema sys;grant execute on procedure sys.hot_snapshot to 
".snapshot";update sys.functions set system = true, language = 2, side_effect = 
false where name = 'var' and schema_id = (select id from sys.schemas where name 
= 'sys') and type = 5;
+create procedure sys.hot_snapshot(tarfile string, onserver bool)
+external name sql.hot_snapshot;
+update sys.functions set system = true where system <> true and schema_id = 
(select id from sys.schemas where name = 'sys') and name in ('hot_snapshot') 
and type = 2;
+create user ".snapshot"
+ with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+ name 'Snapshot User'
+ schema sys;
+grant execute on procedure sys.hot_snapshot(string) to ".snapshot";
+grant execute on procedure sys.hot_snapshot(string, bool) to ".snapshot";
+update sys.functions set system = true, language = 2, side_effect = false 
where name = 'var' and schema_id = (select id from sys.schemas where name = 
'sys') and type = 5;
 update sys.args set type = 'char' where func_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5) and type = 'clob';
 update sys.privileges set grantor = 0 where obj_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5);
 DROP FUNCTION "sys"."getcontent"(url);
@@ -5974,7 +5983,7 @@ UPDATE sys.functions set semantics = fal
 ('octet_length', 'nbytes'),
 ('soundex', 'soundex'),
 ('qgramnormalize', 'qgramnormalize')
-);
+) and type <> 6;
 set schema "sys";
 
 # MonetDB/SQL module loaded
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64
@@ -5011,7 +5011,16 @@ update sys._tables set system = true whe
 drop function "sys"."var"();
 create function "sys"."var"() returns table("schema" string, "name" string, 
"type" string, "value" string) external name "sql"."sql_variables";
 grant execute on function "sys"."var" to public;
-create user ".snapshot" with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
 name 'Snapshot User' schema sys;grant execute on procedure sys.hot_snapshot to 
".snapshot";update sys.functions set system = true, language = 2, side_effect = 
false where name = 'var' and schema_id = (select id from sys.schemas where name 
= 'sys') and type = 5;
+create procedure sys.hot_snapshot(tarfile string, onserver bool)
+external name sql.hot_snapshot;
+update sys.functions set system = true where system <> true and schema_id = 
(select id from sys.schemas where name = 'sys') and name in ('hot_snapshot') 
and type = 2;
+create user ".snapshot"
+ with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+ name 'Snapshot User'
+ schema sys;
+grant execute on procedure sys.hot_snapshot(string) to ".snapshot";
+grant execute on procedure sys.hot_snapshot(string, bool) to ".snapshot";
+update sys.functions set system = true, language = 2, side_effect = false 
where name = 'var' and schema_id = (select id from sys.schemas where name = 
'sys') and type = 5;
 update sys.args set type = 'char' where func_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5) and type = 'clob';
 update sys.privileges set grantor = 0 where obj_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5);
 DROP FUNCTION "sys"."getcontent"(url);
@@ -5142,7 +5151,7 @@ UPDATE sys.functions set semantics = fal
 ('octet_length', 'nbytes'),
 ('soundex', 'soundex'),
 ('qgramnormalize', 'qgramnormalize')
-);
+) and type <> 6;
 set schema "sys";
 
 # MonetDB/SQL module loaded
diff --git 
a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64.int128 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64.int128
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64.int128
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.ppc64.int128
@@ -5843,7 +5843,16 @@ update sys._tables set system = true whe
 drop function "sys"."var"();
 create function "sys"."var"() returns table("schema" string, "name" string, 
"type" string, "value" string) external name "sql"."sql_variables";
 grant execute on function "sys"."var" to public;
-create user ".snapshot" with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
 name 'Snapshot User' schema sys;grant execute on procedure sys.hot_snapshot to 
".snapshot";update sys.functions set system = true, language = 2, side_effect = 
false where name = 'var' and schema_id = (select id from sys.schemas where name 
= 'sys') and type = 5;
+create procedure sys.hot_snapshot(tarfile string, onserver bool)
+external name sql.hot_snapshot;
+update sys.functions set system = true where system <> true and schema_id = 
(select id from sys.schemas where name = 'sys') and name in ('hot_snapshot') 
and type = 2;
+create user ".snapshot"
+ with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+ name 'Snapshot User'
+ schema sys;
+grant execute on procedure sys.hot_snapshot(string) to ".snapshot";
+grant execute on procedure sys.hot_snapshot(string, bool) to ".snapshot";
+update sys.functions set system = true, language = 2, side_effect = false 
where name = 'var' and schema_id = (select id from sys.schemas where name = 
'sys') and type = 5;
 update sys.args set type = 'char' where func_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5) and type = 'clob';
 update sys.privileges set grantor = 0 where obj_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5);
 DROP FUNCTION "sys"."getcontent"(url);
@@ -5974,7 +5983,7 @@ UPDATE sys.functions set semantics = fal
 ('octet_length', 'nbytes'),
 ('soundex', 'soundex'),
 ('qgramnormalize', 'qgramnormalize')
-);
+) and type <> 6;
 set schema "sys";
 
 # MonetDB/SQL module loaded
diff --git a/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
@@ -5774,7 +5774,16 @@ update sys._tables set system = true whe
 drop function "sys"."var"();
 create function "sys"."var"() returns table("schema" string, "name" string, 
"type" string, "value" string) external name "sql"."sql_variables";
 grant execute on function "sys"."var" to public;
-create user ".snapshot" with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
 name 'Snapshot User' schema sys;grant execute on procedure sys.hot_snapshot to 
".snapshot";update sys.functions set system = true, language = 2, side_effect = 
false where name = 'var' and schema_id = (select id from sys.schemas where name 
= 'sys') and type = 5;
+create procedure sys.hot_snapshot(tarfile string, onserver bool)
+external name sql.hot_snapshot;
+update sys.functions set system = true where system <> true and schema_id = 
(select id from sys.schemas where name = 'sys') and name in ('hot_snapshot') 
and type = 2;
+create user ".snapshot"
+ with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+ name 'Snapshot User'
+ schema sys;
+grant execute on procedure sys.hot_snapshot(string) to ".snapshot";
+grant execute on procedure sys.hot_snapshot(string, bool) to ".snapshot";
+update sys.functions set system = true, language = 2, side_effect = false 
where name = 'var' and schema_id = (select id from sys.schemas where name = 
'sys') and type = 5;
 update sys.args set type = 'char' where func_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5) and type = 'clob';
 update sys.privileges set grantor = 0 where obj_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5);
 DROP FUNCTION "sys"."getcontent"(url);
@@ -5905,7 +5914,7 @@ UPDATE sys.functions set semantics = fal
 ('octet_length', 'nbytes'),
 ('soundex', 'soundex'),
 ('qgramnormalize', 'qgramnormalize')
-);
+) and type <> 6;
 set schema "sys";
 
 # MonetDB/SQL module loaded
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out 
b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
--- a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
@@ -5016,7 +5016,16 @@ update sys._tables set system = true whe
 drop function "sys"."var"();
 create function "sys"."var"() returns table("schema" string, "name" string, 
"type" string, "value" string) external name "sql"."sql_variables";
 grant execute on function "sys"."var" to public;
-create user ".snapshot" with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
 name 'Snapshot User' schema sys;grant execute on procedure sys.hot_snapshot to 
".snapshot";update sys.functions set system = true, language = 2, side_effect = 
false where name = 'var' and schema_id = (select id from sys.schemas where name 
= 'sys') and type = 5;
+create procedure sys.hot_snapshot(tarfile string, onserver bool)
+external name sql.hot_snapshot;
+update sys.functions set system = true where system <> true and schema_id = 
(select id from sys.schemas where name = 'sys') and name in ('hot_snapshot') 
and type = 2;
+create user ".snapshot"
+ with encrypted password 
'00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+ name 'Snapshot User'
+ schema sys;
+grant execute on procedure sys.hot_snapshot(string) to ".snapshot";
+grant execute on procedure sys.hot_snapshot(string, bool) to ".snapshot";
+update sys.functions set system = true, language = 2, side_effect = false 
where name = 'var' and schema_id = (select id from sys.schemas where name = 
'sys') and type = 5;
 update sys.args set type = 'char' where func_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5) and type = 'clob';
 update sys.privileges set grantor = 0 where obj_id = (select id from 
sys.functions where name = 'var' and schema_id = (select id from sys.schemas 
where name = 'sys') and type = 5);
 DROP FUNCTION "sys"."getcontent"(url);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to