Changeset: 585ffa5cadf0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/585ffa5cadf0
Modified Files:
        sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-previous-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/testdb-previous-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/testdb-previous-upgrade/Tests/upgrade.stable.out.32bit
Branch: sqlfuncfix
Log Message:

Approved 32 bit upgrade.


diffs (truncated from 1456 to 300 lines):

diff --git 
a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.32bit 
b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.32bit
--- a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.32bit
+++ b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out.32bit
@@ -2574,7 +2574,7 @@ insert into sys.functions values (688, '
 insert into sys.args values (38438, 688, 'res_0', 'double', 53, 0, 0, 0);
 insert into sys.functions values (689, 'rand', 'rand', 'mmath', 0, 1, true, 
false, false, 2000, true, true);
 insert into sys.args values (38439, 689, 'res_0', 'int', 32, 0, 0, 0);
-insert into sys.functions values (690, 'rand', 'sqlrand', 'mmath', 0, 1, true, 
false, false, 2000, true, true);
+insert into sys.functions values (690, 'rand', 'sqlrand', 'mmath', 0, 1, 
false, false, false, 2000, true, true);
 insert into sys.args values (38440, 690, 'res_0', 'int', 32, 0, 0, 0);
 insert into sys.args values (38441, 690, 'arg_1', 'int', 32, 0, 1, 1);
 insert into sys.functions values (691, 'curdate', 'current_date', 'mtime', 0, 
1, false, false, false, 2000, true, false);
@@ -2860,7 +2860,7 @@ insert into sys.args values (38634, 777,
 insert into sys.functions values (778, 'epoch_ms', 'epoch_ms', 'mtime', 0, 1, 
false, false, false, 2000, true, false);
 insert into sys.args values (38635, 778, 'res_0', 'decimal', 18, 3, 0, 0);
 insert into sys.args values (38636, 778, 'arg_1', 'sec_interval', 13, 0, 1, 1);
-insert into sys.functions values (779, 'next_value_for', 'next_value', 'sql', 
0, 1, true, false, false, 2000, true, true);
+insert into sys.functions values (779, 'next_value_for', 'next_value', 'sql', 
0, 1, false, false, false, 2000, true, true);
 insert into sys.args values (38637, 779, 'res_0', 'bigint', 64, 0, 0, 0);
 insert into sys.args values (38638, 779, 'arg_1', 'clob', 0, 0, 1, 1);
 insert into sys.args values (38639, 779, 'arg_2', 'clob', 0, 0, 1, 2);
@@ -3081,7 +3081,7 @@ insert into sys.args values (38799, 833,
 insert into sys.args values (38800, 833, 'arg_3', 'int', 32, 0, 1, 3);
 insert into sys.args values (38801, 833, 'arg_4', 'int', 32, 0, 1, 4);
 insert into sys.args values (38802, 833, 'arg_5', 'int', 32, 0, 1, 5);
-insert into sys.functions values (834, 'next_value_for', 'next_value', 'sql', 
0, 1, true, false, false, 2000, true, true);
+insert into sys.functions values (834, 'next_value_for', 'next_value', 'sql', 
0, 1, false, false, false, 2000, true, true);
 insert into sys.args values (38803, 834, 'res_0', 'bigint', 64, 0, 0, 0);
 insert into sys.args values (38804, 834, 'arg_1', 'varchar', 0, 0, 1, 1);
 insert into sys.args values (38805, 834, 'arg_2', 'varchar', 0, 0, 1, 2);
@@ -3302,7 +3302,7 @@ insert into sys.args values (38965, 888,
 insert into sys.args values (38966, 888, 'arg_3', 'int', 32, 0, 1, 3);
 insert into sys.args values (38967, 888, 'arg_4', 'int', 32, 0, 1, 4);
 insert into sys.args values (38968, 888, 'arg_5', 'int', 32, 0, 1, 5);
-insert into sys.functions values (889, 'next_value_for', 'next_value', 'sql', 
0, 1, true, false, false, 2000, true, true);
+insert into sys.functions values (889, 'next_value_for', 'next_value', 'sql', 
0, 1, false, false, false, 2000, true, true);
 insert into sys.args values (38969, 889, 'res_0', 'bigint', 64, 0, 0, 0);
 insert into sys.args values (38970, 889, 'arg_1', 'char', 0, 0, 1, 1);
 insert into sys.args values (38971, 889, 'arg_2', 'char', 0, 0, 1, 2);
@@ -3523,7 +3523,7 @@ insert into sys.args values (39131, 943,
 insert into sys.args values (39132, 943, 'arg_3', 'int', 32, 0, 1, 3);
 insert into sys.args values (39133, 943, 'arg_4', 'int', 32, 0, 1, 4);
 insert into sys.args values (39134, 943, 'arg_5', 'int', 32, 0, 1, 5);
-insert into sys.functions values (944, 'copyfrom', 'copy_from', 'sql', 0, 5, 
false, true, false, 2000, true, true);
+insert into sys.functions values (944, 'copyfrom', 'copy_from', 'sql', 0, 5, 
true, true, false, 2000, true, true);
 insert into sys.args values (39135, 944, 'res_0', 'table', 0, 0, 0, 0);
 insert into sys.args values (39136, 944, 'arg_1', 'ptr', 0, 0, 1, 1);
 insert into sys.args values (39137, 944, 'arg_2', 'clob', 0, 0, 1, 2);
@@ -3537,13 +3537,13 @@ insert into sys.args values (39144, 944,
 insert into sys.args values (39145, 944, 'arg_10', 'clob', 0, 0, 1, 10);
 insert into sys.args values (39146, 944, 'arg_11', 'int', 32, 0, 1, 11);
 insert into sys.args values (39147, 944, 'arg_12', 'int', 32, 0, 1, 12);
-insert into sys.functions values (945, 'copyfrom', 'importTable', 'sql', 0, 5, 
false, true, false, 2000, true, true);
+insert into sys.functions values (945, 'copyfrom', 'importTable', 'sql', 0, 5, 
true, true, false, 2000, true, true);
 insert into sys.args values (39148, 945, 'res_0', 'table', 0, 0, 0, 0);
 insert into sys.args values (39149, 945, 'arg_1', 'clob', 0, 0, 1, 1);
 insert into sys.args values (39150, 945, 'arg_2', 'clob', 0, 0, 1, 2);
 insert into sys.args values (39151, 945, 'arg_3', 'int', 32, 0, 1, 3);
-insert into sys.functions values (946, 'sys_update_schemas', 'update_schemas', 
'sql', 0, 2, false, false, false, 2000, true, true);
-insert into sys.functions values (947, 'sys_update_tables', 'update_tables', 
'sql', 0, 2, false, false, false, 2000, true, true);
+insert into sys.functions values (946, 'sys_update_schemas', 'update_schemas', 
'sql', 0, 2, true, false, false, 2000, true, true);
+insert into sys.functions values (947, 'sys_update_tables', 'update_tables', 
'sql', 0, 2, true, false, false, 2000, true, true);
 set schema "sys";
 
 Running database upgrade commands:
@@ -4540,8 +4540,13 @@ external name mtime.epoch;
 grant execute on function sys.epoch (DECIMAL(18,3)) to public;
 update sys.functions set system = true where system <> true and name in 
('epoch') and schema_id = 2000 and type = 1;
 set schema "sys";
+drop function sys.malfunctions();
+create function sys.malfunctions()
+ returns table("module" string, "function" string, "signature" string, 
"address" string, "comment" string)
+ external name "manual"."functions";
 create view sys.malfunctions as select * from sys.malfunctions();
 update sys._tables set system = true where system <> true and schema_id = 2000 
and name = 'malfunctions';
+update sys.functions set system = true where system <> true and schema_id = 
2000 and name = 'malfunctions';
 drop view sys.dependencies_vw;
 drop view sys.ids;
 CREATE VIEW sys.ids (id, name, schema_id, table_id, table_name, obj_type, 
sys_table, system) AS
@@ -5185,4 +5190,284 @@ JOIN sys.fkey_actions upd ON fks.update_
 JOIN sys.fkey_actions del ON fks.delete_action_id = del.action_id;
 GRANT SELECT ON sys.fkeys TO PUBLIC;
 update sys._tables set system = true where name in ('fkey_actions', 'fkeys') 
AND schema_id = 2000;
+drop view logging.compinfo;
+drop function logging.compinfo;
+drop procedure sys.storagemodelinit();
+drop view sys.schemastorage;
+drop view sys.tablestorage;
+drop view sys.storage;
+drop function sys.storage();
+drop function wlr.tick;
+drop function wlr.clock;
+drop function wlc.tick;
+drop function wlc.clock;
+drop function profiler.getlimit;
+drop view sys.rejects;
+drop function sys.rejects;
+drop function sys.user_statistics;
+drop view sys.queue;
+drop function sys.queue;
+drop function sys.debugflags;
+drop function sys.bbp;
+drop view sys.optimizers;
+drop function sys.optimizers;
+drop function sys.querycache;
+drop function sys.optimizer_stats;
+drop function sys.current_sessionid;
+drop view sys.prepared_statements_args;
+drop function sys.prepared_statements_args;
+drop view sys.prepared_statements;
+drop function sys.prepared_statements;
+drop view sys.sessions;
+drop function sys.sessions;
+drop view sys.querylog_history;
+drop view sys.querylog_calls;
+drop function sys.querylog_calls;
+drop view sys.querylog_catalog;
+drop function sys.querylog_catalog;
+create function sys.querylog_catalog()
+returns table(
+ id oid,
+ owner string,
+ defined timestamp,
+ query string,
+ pipe string,
+ "plan" string,
+ mal int,
+ optimize bigint
+)
+external name sql.querylog_catalog;
+create view sys.querylog_catalog as select * from sys.querylog_catalog();
+create function sys.querylog_calls()
+returns table(
+ id oid,
+ "start" timestamp,
+ "stop" timestamp,
+ arguments string,
+ tuples bigint,
+ run bigint,
+ ship bigint,
+ cpu int,
+ io int
+)
+external name sql.querylog_calls;
+create view sys.querylog_calls as select * from sys.querylog_calls();
+create view sys.querylog_history as
+select qd.*, ql."start",ql."stop", ql.arguments, ql.tuples, ql.run, ql.ship, 
ql.cpu, ql.io
+from sys.querylog_catalog() qd, sys.querylog_calls() ql
+where qd.id = ql.id and qd.owner = user;
+create function sys.sessions()
+returns table(
+ "sessionid" int,
+ "username" string,
+ "login" timestamp,
+ "idle" timestamp,
+ "optimizer" string,
+ "sessiontimeout" int,
+ "querytimeout" int,
+ "workerlimit" int,
+ "memorylimit" int
+)
+external name sql.sessions;
+create view sys.sessions as select * from sys.sessions();
+create function sys.prepared_statements()
+returns table(
+ "sessionid" int,
+ "username" string,
+ "statementid" int,
+ "statement" string,
+ "created" timestamp
+)
+external name sql.prepared_statements;
+grant execute on function sys.prepared_statements to public;
+create view sys.prepared_statements as select * from sys.prepared_statements();
+grant select on sys.prepared_statements to public;
+create function sys.prepared_statements_args()
+returns table(
+ "statementid" int,
+ "type" string,
+ "type_digits" int,
+ "type_scale" int,
+ "inout" tinyint,
+ "number" int,
+ "schema" string,
+ "table" string,
+ "column" string
+)
+external name sql.prepared_statements_args;
+grant execute on function sys.prepared_statements_args to public;
+create view sys.prepared_statements_args as select * from 
sys.prepared_statements_args();
+grant select on sys.prepared_statements_args to public;
+create function sys.current_sessionid() returns int
+external name clients.current_sessionid;
+grant execute on function sys.current_sessionid to public;
+create function sys.optimizer_stats()
+ returns table (optname string, count int, timing bigint)
+ external name inspect.optimizer_stats;
+create function sys.querycache()
+ returns table (query string, count int)
+ external name sql.dump_cache;
+create function sys.optimizers ()
+ returns table (name string, def string, status string)
+ external name sql.optimizers;
+create view sys.optimizers as select * from sys.optimizers();
+create function sys.bbp ()
+ returns table (id int, name string,
+ ttype string, count bigint, refcnt int, lrefcnt int,
+ location string, heat int, dirty string,
+ status string, kind string)
+ external name bbp.get;
+create function sys.debugflags()
+ returns table(flag string, val bool)
+ external name mdb."getDebugFlags";
+create function sys.queue()
+returns table(
+ "tag" bigint,
+ "sessionid" int,
+ "username" string,
+ "started" timestamp,
+ "status" string,
+ "query" string,
+ "finished" timestamp,
+ "maxworkers" int,
+ "footprint" int
+)
+external name sysmon.queue;
+grant execute on function sys.queue to public;
+create view sys.queue as select * from sys.queue();
+grant select on sys.queue to public;
+create function sys.user_statistics()
+returns table(
+ username string,
+ querycount bigint,
+ totalticks bigint,
+ started timestamp,
+ finished timestamp,
+ maxticks bigint,
+ maxquery string
+)
+external name sysmon.user_statistics;
+create function sys.rejects()
+returns table(
+ rowid bigint,
+ fldid int,
+ "message" string,
+ "input" string
+)
+external name sql.copy_rejects;
+grant execute on function rejects to public;
+create view sys.rejects as select * from sys.rejects();
+create function profiler.getlimit() returns integer external name 
profiler.getlimit;
+create function wlc.clock() returns string
+external name wlc."getclock";
+create function wlc.tick() returns bigint
+external name wlc."gettick";
+create function wlr.clock() returns string
+external name wlr."getclock";
+create function wlr.tick() returns bigint
+external name wlr."gettick";
+create function sys."storage"()
+returns table (
+ "schema" varchar(1024),
+ "table" varchar(1024),
+ "column" varchar(1024),
+ "type" varchar(1024),
+ "mode" varchar(15),
+ location varchar(1024),
+ "count" bigint,
+ typewidth int,
+ columnsize bigint,
+ heapsize bigint,
+ hashes bigint,
+ phash boolean,
+ "imprints" bigint,
+ sorted boolean,
+ revsorted boolean,
+ "unique" boolean,
+ orderidx bigint
+)
+external name sql."storage";
+create view sys."storage" as
+select * from sys."storage"()
+ where ("schema", "table") in (
+ select sch."name", tbl."name"
+ from sys."tables" as tbl join sys."schemas" as sch on tbl.schema_id = sch.id
+ where tbl."system" = false)
+order by "schema", "table", "column";
+create view sys."tablestorage" as
+select "schema", "table",
+ max("count") as "rowcount",
+ count(*) as "storages",
+ sum(columnsize) as columnsize,
+ sum(heapsize) as heapsize,
+ sum(hashes) as hashsize,
+ sum("imprints") as imprintsize,
+ sum(orderidx) as orderidxsize
+ from sys."storage"
+group by "schema", "table"
+order by "schema", "table";
+create view sys."schemastorage" as
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to