Test check.SQL.py (id c952acc49888) (err)
check.stable.out.int128.FILTERED 2019-12-03 09:33:07.344506692 +0100check.test.out.FILTERED 2019-12-03 09:33:07.680508533 +0100
1 Statistics about stdout of test 'check` in directory 'sql/test/emptydb`: 1 1 Statistics about stdout of test 'check` in directory 'sql/test/emptydb`: 1
2 5629 lines, 217260 words, 1421978 chars in lines not matching '^$|^(\| |)#|^=` 2 ! 2 5633 lines, 217318 words, 1422485 chars in lines not matching '^$|^(\| |)#|^=` 2
3 = 5629 lines, 217260 words, 1421978 chars in lines not matching '^$|^(\| |)#` 3 ! 3 = 5633 lines, 217318 words, 1422485 chars in lines not matching '^$|^(\| |)#` 3
4 # 5710 lines, 219699 words, 1439132 chars in all lines 4 ! 4 # 5713 lines, 219753 words, 1439637 chars in all lines 4
5 5 5 5
..................
# 10:17:18 >
909 CREATE TABLE "sys"."statistics" ("column_id" INTEGER, "type" CHARACTER LARGE OBJECT, "width" INTEGER, "stamp" TIMESTAMP, "sample" BIGINT, "count" BIGINT, "unique" BIGINT, "nils" BIGINT, "minval" CHARACTER LARGE OBJECT, "maxval" CHARACTER LARGE OBJECT, "sorted" BOOLEAN, "revsorted" BOOLEAN); 909 908 CREATE TABLE "sys"."statistics" ("column_id" INTEGER, "type" CHARACTER LARGE OBJECT, "width" INTEGER, "stamp" TIMESTAMP, "sample" BIGINT, "count" BIGINT, "unique" BIGINT, "nils" BIGINT, "minval" CHARACTER LARGE OBJECT, "maxval" CHARACTER LARGE OBJECT, "sorted" BOOLEAN, "revsorted" BOOLEAN); 908
910 CREATE TABLE "sys"."storagemodelinput" ("schema" VARCHAR(1024) NOT NULL, "table" VARCHAR(1024) NOT NULL, "column" VARCHAR(1024) NOT NULL, "type" VARCHAR(1024) NOT NULL, "typewidth" INTEGER NOT NULL, "count" BIGINT NOT NULL, "distinct" BIGINT NOT NULL, "atomwidth" INTEGER NOT NULL, "reference" BOOLEAN NOT NULL DEFAULT false, "sorted" BOOLEAN, "unique" BOOLEAN, "isacolumn" BOOLEAN NOT NULL DEFAULT true); 910 + 909 CREATE TABLE "sys"."storagemodelinput" ("schema" VARCHAR(1024) NOT NULL, "table" VARCHAR(1024) NOT NULL, "column" VARCHAR(1024) NOT NULL, "type" VARCHAR(1024) NOT NULL, "typewidth" INTEGER NOT NULL, "count" BIGINT NOT NULL, "distinct" BIGINT NOT NULL, "atomwidth" INTEGER NOT NULL, "reference" BOOLEAN NOT NULL DEFAULT false, "sorted" BOOLEAN, "unique" BOOLEAN, "isacolumn" BOOLEAN NOT NULL DEFAULT true, "compressed" BOOLEAN); 909
911 CREATE TABLE "sys"."table_partitions" ("id" INTEGER, "table_id" INTEGER, "column_id" INTEGER, "expression" VARCHAR(2048), "type" TINYINT); 911 910 CREATE TABLE "sys"."table_partitions" ("id" INTEGER, "table_id" INTEGER, "column_id" INTEGER, "expression" VARCHAR(2048), "type" TINYINT); 910
..................
# 10:17:18 >
1308 create procedure sys.stopsession("sessionid" int) external name clients.stopsession; 1308 1307 create procedure sys.stopsession("sessionid" int) external name clients.stopsession; 1307
1309 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"; 1309 + 1308 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, compressed boolean) external name sql."storage"; 1308
1310 create function sys."storage"(sname varchar(1024)) 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"; 1310 + 1309 create function sys."storage"(sname varchar(1024)) 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, compressed boolean) external name sql."storage"; 1309
1311 create function sys."storage"(sname varchar(1024), tname varchar(1024)) 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"; 1311 + 1310 create function sys."storage"(sname varchar(1024), tname varchar(1024)) 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, compressed boolean) external name sql."storage"; 1310
1312 create function sys."storage"(sname varchar(1024), tname varchar(1024), cname varchar(1024)) 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"; 1312 + 1311 create function sys."storage"(sname varchar(1024), tname varchar(1024), cname varchar(1024)) 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, compressed boolean) external name sql."storage"; 1311
1313 create procedure sys.storagemodelinit() begin delete from sys.storagemodelinput; insert into sys.storagemodelinput select "schema", "table", "column", "type", typewidth, "count", case when ("unique" or "type" in ('varchar', 'char', 'clob', 'json', 'url', 'blob', 'geometry', 'geometrya')) then "count" else 0 end, case when "count" > 0 and heapsize >= 8192 and "type" in ('varchar', 'char', 'clob', 'json', 'url') then cast((heapsize - 8192) / "count" as bigint) when "count" > 0 and heapsize >= 32 and "type" in ('blob', 'geometry', 'geometrya') then cast((heapsize - 32) / "count" as bigint) else typewidth end, false, case sorted when true then true else false end, "unique", true from sys."storage"; update sys.storagemodelinput set reference = true where ("schema", "table", "column") in (select fkschema."name", fktable."name", fkkeycol."name" from sys."keys" as fkkey, sys."objects" as fkkeycol, sys."tables" as fktable, sys."schemas" as fkschema where fktable."id" = fkkey."table_id" and fkkey."id" = fkkeycol."id" and fkschema."id" = fktable."schema_id" and fkkey."rkey" > -1); update sys.storagemodelinput set isacolumn = false where ("schema", "table", "column") not in (select sch."name", tbl."name", col."name" from sys."schemas" as sch, sys."tables" as tbl, sys."columns" as col where sch."id" = tbl."schema_id" and tbl."id" = col."table_id"); end; 1313 + 1312 create procedure sys.storagemodelinit() begin delete from sys.storagemodelinput; insert into sys.storagemodelinput select "schema", "table", "column", "type", typewidth, "count", case when ("unique" or "type" in ('varchar', 'char', 'clob', 'json', 'url', 'blob', 'geometry', 'geometrya')) then "count" else 0 end, case when "count" > 0 and heapsize >= 8192 and "type" in ('varchar', 'char', 'clob', 'json', 'url') then cast((heapsize - 8192) / "count" as bigint) when "count" > 0 and heapsize >= 32 and "type" in ('blob', 'geometry', 'geometrya') then cast((heapsize - 32) / "count" as bigint) else typewidth end, false, case sorted when true then true else false end, "unique", true, compressed from sys."storage"; update sys.storagemodelinput set reference = true where ("schema", "table", "column") in (select fkschema."name", fktable."name", fkkeycol."name" from sys."keys" as fkkey, sys."objects" as fkkeycol, sys."tables" as fktable, sys."schemas" as fkschema where fktable."id" = fkkey."table_id" and fkkey."id" = fkkeycol."id" and fkschema."id" = fktable."schema_id" and fkkey."rkey" > -1); update sys.storagemodelinput set isacolumn = false where ("schema", "table", "column") not in (select sch."name", tbl."name", col."name" from sys."schemas" as sch, sys."tables" as tbl, sys."columns" as col where sch."id" = tbl."schema_id" and tbl."id" = col."table_id"); end; 1312
1314 create function str_to_date(s string, format string) returns date external name mtime."str_to_date"; 1314 1313 create function str_to_date(s string, format string) returns date external name mtime."str_to_date"; 1313
..................
#select t.name, c.name, c.type, c.type_d
2050 [ "storage", "orderidx", "bigint", 64, 0, NULL, true, 16, NULL ] 2050 2049 [ "storage", "orderidx", "bigint", 64, 0, NULL, true, 16, NULL ] 2049
+ 2050 [ "storage", "compressed", "boolean", 1, 0, NULL, true, 17, NULL ] 2050
2051 [ "storagemodel", "schema", "varchar", 1024, 0, NULL, true, 0, NULL ] 2051 2051 [ "storagemodel", "schema", "varchar", 1024, 0, NULL, true, 0, NULL ] 2051
..................
#select t.name, c.name, c.type, c.type_d
2075 [ "storagemodelinput", "isacolumn", "boolean", 1, 0, "true", false, 11, NULL ] 2075 2075 [ "storagemodelinput", "isacolumn", "boolean", 1, 0, "true", false, 11, NULL ] 2075
+ 2076 [ "storagemodelinput", "compressed", "boolean", 1, 0, NULL, true, 12, NULL ] 2076
2076 [ "systemfunctions", "function_id", "int", 32, 0, NULL, true, 0, NULL ] 2076 2077 [ "systemfunctions", "function_id", "int", 32, 0, NULL, true, 0, NULL ] 2077
..................
# .s, .f, .L47, .L50, .f,
2175 % varchar, varchar, char, varchar, varchar, varchar, varchar, boolean, boolean, boolean, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char # type 2175 2176 % varchar, varchar, char, varchar, varchar, varchar, varchar, boolean, boolean, boolean, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char, varchar, varchar, int, int, char # type 2176
2176 % 8, 24, 6, 1362, 9, 10, 26, 5, 5, 5, 11, 14, 4, 1, 3, 16, 14, 4, 1, 3, 16, 14, 4, 1, 3, 27, 12, 4, 1, 3, 9, 7, 2, 1, 3, 14, 14, 4, 1, 3, 12, 14, 3, 1, 3, 11, 7, 2, 1, 3, 11, 7, 2, 1, 3, 8, 6, 2, 1, 3, 6, 6, 2, 1, 3, 6, 7, 1, 1, 3, 8, 6, 2, 1, 3, 6, 7, 1, 1, 3, 9, 7, 1, 1, 3, 6, 7, 1, 1, 3 # length 2176 ! 2177 % 8, 24, 6, 1374, 9, 10, 26, 5, 5, 5, 11, 14, 4, 1, 3, 16, 14, 4, 1, 3, 16, 14, 4, 1, 3, 27, 12, 4, 1, 3, 10, 7, 2, 1, 3, 14, 14, 4, 1, 3, 12, 14, 3, 1, 3, 11, 7, 2, 1, 3, 11, 7, 2, 1, 3, 8, 6, 2, 1, 3, 6, 6, 2, 1, 3, 6, 7, 1, 1, 3, 8, 6, 2, 1, 3, 6, 7, 1, 1, 3, 9, 7, 1, 1, 3, 6, 7, 1, 1, 3 # length 2177
2177 [ "bam", "bam_drop_file", "SYSTEM", "create procedure bam.bam_drop_file(file_id bigint, dbschema smallint) external name bam.bam_drop_file;", "bam", "MAL", "Procedure", true, false, false, "file_id", "bigint", 64, 0, "in", "dbschema", "smallint", 16, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] 2177 2178 [ "bam", "bam_drop_file", "SYSTEM", "create procedure bam.bam_drop_file(file_id bigint, dbschema smallint) external name bam.bam_drop_file;", "bam", "MAL", "Procedure", true, false, false, "file_id", "bigint", 64, 0, "in", "dbschema", "smallint", 16, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] 2178
..................
# .s, .f, .L47, .L50, .f,
3927 [ "sys", "stopsession", "SYSTEM", "create procedure sys.stopsession(\"sessionid\" int) external name clients.stopsession;", "clients", "MAL", "Procedure", true, false, false, "sessionid", "int", 32, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] 3927 3928 [ "sys", "stopsession", "SYSTEM", "create procedure sys.stopsession(\"sessionid\" int) external name clients.stopsession;", "clients", "MAL", "Procedure", true, false, false, "sessionid", "int", 32, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] 3928
3928 [ "sys", "storage", "SYSTEM", "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\";", "sql", "MAL", "Function returning a table", true, false, false, "schema", "varchar", 1024, 0, "out", "table", "varchar", 1024, 0, "out", "column", "varchar", 1024, 0, "out", "type", "varchar", 1024, 0, "out", "mode", "varchar", 15, 0, "out", "location", "varchar", 1024, 0, "out", "count", "bigint", 64, 0, "out", "typewidth", "int", 32, 0, "out", "columnsize", "bigint", 64, 0, "out", "heapsize", "bigint", 64, 0, "out", "hashes", "bigint", 64, 0, "out", "phash", "boolean", 1, 0, "out", "imprints", "bigint", 64, 0, "out", "sorted", "boolean", 1, 0, "out", "revsorted", "boolean", 1, 0, "out", "unique", "boolean", 1, 0, "out" ] 3928 ! 3929 [ "sys", "storage", "SYSTEM", "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, compressed boolean) external name sql.\"storage\";", "sql", "MAL", "Function returning a table", true, false, false, "schema", "varchar", 1024, 0, "out", "table", "varchar", 1024, 0, "out", "column", "varchar", 1024, 0, "out", "type", "varchar", 1024, 0, "out", "mode", "varchar", 15, 0, "out", "location", "varchar", 1024, 0, "out", "count", "bigint", 64, 0, "out", "typewidth", "int", 32, 0, "out", "columnsize", "bigint", 64, 0, "out", "heapsize", "bigint", 64, 0, "out", "hashes", "bigint", 64, 0, "out", "phash", "boolean", 1, 0, "out", "imprints", "bigint", 64, 0, "out", "sorted", "boolean", 1, 0, "out", "revsorted", "boolean", 1, 0, "out", "unique", "boolean", 1, 0, "out" ] 3929
3929 [ "sys", "storage", "SYSTEM", "create function sys.\"storage\"(sname varchar(1024)) 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\";", "sql", "MAL", "Function returning a table", false, false, false, "schema", "varchar", 1024, 0, "out", "table", "varchar", 1024, 0, "out", "column", "varchar", 1024, 0, "out", "type", "varchar", 1024, 0, "out", "mode", "varchar", 15, 0, "out", "location", "varchar", 1024, 0, "out", "count", "bigint", 64, 0, "out", "typewidth", "int", 32, 0, "out", "columnsize", "bigint", 64, 0, "out", "heapsize", "bigint", 64, 0, "out", "hashes", "bigint", 64, 0, "out", "phash", "boolean", 1, 0, "out", "imprints", "bigint", 64, 0, "out", "sorted", "boolean", 1, 0, "out", "revsorted", "boolean", 1, 0, "out", "unique", "boolean", 1, 0, "out" ] 3929 ! 3930 [ "sys", "storage", "SYSTEM", "create function sys.\"storage\"(sname varchar(1024)) 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, compressed boolean) external name sql.\"storage\";", "sql", "MAL", "Function returning a table", false, false, false, "schema", "varchar", 1024, 0, "out", "table", "varchar", 1024, 0, "out", "column", "varchar", 1024, 0, "out", "type", "varchar", 1024, 0, "out", "mode", "varchar", 15, 0, "out", "location", "varchar", 1024, 0, "out", "count", "bigint", 64, 0, "out", "typewidth", "int", 32, 0, "out", "columnsize", "bigint", 64, 0, "out", "heapsize", "bigint", 64, 0, "out", "hashes", "bigint", 64, 0, "out", "phash", "boolean", 1, 0, "out", "imprints", "bigint", 64, 0, "out", "sorted", "boolean", 1, 0, "out", "revsorted", "boolean", 1, 0, "out", "unique", "boolean", 1, 0, "out" ] 3930
3930 [ "sys", "storage", "SYSTEM", "create function sys.\"storage\"(sname varchar(1024), tname varchar(1024)) 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\";", "sql", "MAL", "Function returning a table", false, false, false, "schema", "varchar", 1024, 0, "out", "table", "varchar", 1024, 0, "out", "column", "varchar", 1024, 0, "out", "type", "varchar", 1024, 0, "out", "mode", "varchar", 15, 0, "out", "location", "varchar", 1024, 0, "out", "count", "bigint", 64, 0, "out", "typewidth", "int", 32, 0, "out", "columnsize", "bigint", 64, 0, "out", "heapsize", "bigint", 64, 0, "out", "hashes", "bigint", 64, 0, "out", "phash", "boolean", 1, 0, "out", "imprints", "bigint", 64, 0, "out", "sorted", "boolean", 1, 0, "out", "revsorted", "boolean", 1, 0, "out", "unique", "boolean", 1, 0, "out" ] 3930 ! 3931 [ "sys", "storage", "SYSTEM", "create function sys.\"storage\"(sname varchar(1024), tname varchar(1024)) 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, compressed boolean) external name sql.\"storage\";", "sql", "MAL", "Function returning a table", false, false, false, "schema", "varchar", 1024, 0, "out", "table", "varchar", 1024, 0, "out", "column", "varchar", 1024, 0, "out", "type", "varchar", 1024, 0, "out", "mode", "varchar", 15, 0, "out", "location", "varchar", 1024, 0, "out", "count", "bigint", 64, 0, "out", "typewidth", "int", 32, 0, "out", "columnsize", "bigint", 64, 0, "out", "heapsize", "bigint", 64, 0, "out", "hashes", "bigint", 64, 0, "out", "phash", "boolean", 1, 0, "out", "imprints", "bigint", 64, 0, "out", "sorted", "boolean", 1, 0, "out", "revsorted", "boolean", 1, 0, "out", "unique", "boolean", 1, 0, "out" ] 3931
3931 [ "sys", "storage", "SYSTEM", "create function sys.\"storage\"(sname varchar(1024), tname varchar(1024), cname varchar(1024)) 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\";", "sql", "MAL", "Function returning a table", false, false, false, "schema", "varchar", 1024, 0, "out", "table", "varchar", 1024, 0, "out", "column", "varchar", 1024, 0, "out", "type", "varchar", 1024, 0, "out", "mode", "varchar", 15, 0, "out", "location", "varchar", 1024, 0, "out", "count", "bigint", 64, 0, "out", "typewidth", "int", 32, 0, "out", "columnsize", "bigint", 64, 0, "out", "heapsize", "bigint", 64, 0, "out", "hashes", "bigint", 64, 0, "out", "phash", "boolean", 1, 0, "out", "imprints", "bigint", 64, 0, "out", "sorted", "boolean", 1, 0, "out", "revsorted", "boolean", 1, 0, "out", "unique", "boolean", 1, 0, "out" ] 3931 ! 3932 [ "sys", "storage", "SYSTEM", "create function sys.\"storage\"(sname varchar(1024), tname varchar(1024), cname varchar(1024)) 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, compressed boolean) external name sql.\"storage\";", "sql", "MAL", "Function returning a table", false, false, false, "schema", "varchar", 1024, 0, "out", "table", "varchar", 1024, 0, "out", "column", "varchar", 1024, 0, "out", "type", "varchar", 1024, 0, "out", "mode", "varchar", 15, 0, "out", "location", "varchar", 1024, 0, "out", "count", "bigint", 64, 0, "out", "typewidth", "int", 32, 0, "out", "columnsize", "bigint", 64, 0, "out", "heapsize", "bigint", 64, 0, "out", "hashes", "bigint", 64, 0, "out", "phash", "boolean", 1, 0, "out", "imprints", "bigint", 64, 0, "out", "sorted", "boolean", 1, 0, "out", "revsorted", "boolean", 1, 0, "out", "unique", "boolean", 1, 0, "out" ] 3932
3932 [ "sys", "storagemodelinit", "SYSTEM", "create procedure sys.storagemodelinit() begin delete from sys.storagemodelinput; insert into sys.storagemodelinput select \"schema\", \"table\", \"column\", \"type\", typewidth, \"count\", case when (\"unique\" or \"type\" in ('varchar', 'char', 'clob', 'json', 'url', 'blob', 'geometry', 'geometrya')) then \"count\" else 0 end, case when \"count\" > 0 and heapsize >= 8192 and \"type\" in ('varchar', 'char', 'clob', 'json', 'url') then cast((heapsize - 8192) / \"count\" as bigint) when \"count\" > 0 and heapsize >= 32 and \"type\" in ('blob', 'geometry', 'geometrya') then cast((heapsize - 32) / \"count\" as bigint) else typewidth end, false, case sorted when true then true else false end, \"unique\", true from sys.\"storage\"; update sys.storagemodelinput set reference = true where (\"schema\", \"table\", \"column\") in (select fkschema.\"name\", fktable.\"name\", fkkeycol.\"name\" from sys.\"keys\" as fkkey, sys.\"objects\" as fkkeycol, sys.\"tables\" as fktable, sys.\"schemas\" as fkschema where fktable.\"id\" = fkkey.\"table_id\" and fkkey.\"id\" = fkkeycol.\"id\" and fkschema.\"id\" = fktable.\"schema_id\" and fkkey.\"rkey\" > -1); update sys.storagemodelinput set isacolumn = false where (\"schema\", \"table\", \"column\") not in (select sch.\"name\", tbl.\"name\", col.\"name\" from sys.\"schemas\" as sch, sys.\"tables\" as tbl, sys.\"columns\" as col where sch.\"id\" = tbl.\"schema_id\" and tbl.\"id\" = col.\"table_id\"); end;", "user", "SQL", "Procedure", true, false, false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] 3932 ! 3933 [ "sys", "storagemodelinit", "SYSTEM", "create procedure sys.storagemodelinit() begin delete from sys.storagemodelinput; insert into sys.storagemodelinput select \"schema\", \"table\", \"column\", \"type\", typewidth, \"count\", case when (\"unique\" or \"type\" in ('varchar', 'char', 'clob', 'json', 'url', 'blob', 'geometry', 'geometrya')) then \"count\" else 0 end, case when \"count\" > 0 and heapsize >= 8192 and \"type\" in ('varchar', 'char', 'clob', 'json', 'url') then cast((heapsize - 8192) / \"count\" as bigint) when \"count\" > 0 and heapsize >= 32 and \"type\" in ('blob', 'geometry', 'geometrya') then cast((heapsize - 32) / \"count\" as bigint) else typewidth end, false, case sorted when true then true else false end, \"unique\", true, compressed from sys.\"storage\"; update sys.storagemodelinput set reference = true where (\"schema\", \"table\", \"column\") in (select fkschema.\"name\", fktable.\"name\", fkkeycol.\"name\" from sys.\"keys\" as fkkey, sys.\"objects\" as fkkeycol, sys.\"tables\" as fktable, sys.\"schemas\" as fkschema where fktable.\"id\" = fkkey.\"table_id\" and fkkey.\"id\" = fkkeycol.\"id\" and fkschema.\"id\" = fktable.\"schema_id\" and fkkey.\"rkey\" > -1); update sys.storagemodelinput set isacolumn = false where (\"schema\", \"table\", \"column\") not in (select sch.\"name\", tbl.\"name\", col.\"name\" from sys.\"schemas\" as sch, sys.\"tables\" as tbl, sys.\"columns\" as col where sch.\"id\" = tbl.\"schema_id\" and tbl.\"id\" = col.\"table_id\"); end;", "user", "SQL", "Procedure", true, false, false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] 3933
3933 [ "sys", "str_to_date", "SYSTEM", "create function str_to_date(s string, format string) returns date external name mtime.\"str_to_date\";", "mtime", "MAL", "Scalar function", false, false, false, "result", "date", 0, 0, "out", "s", "clob", 0, 0, "in", "format", "clob", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] 3933 3934 [ "sys", "str_to_date", "SYSTEM", "create function str_to_date(s string, format string) returns date external name mtime.\"str_to_date\";", "mtime", "MAL", "Scalar function", false, false, false, "result", "date", 0, 0, "out", "s", "clob", 0, 0, "in", "format", "clob", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] 3934
..................
#select s1.name, t.name, c.name, s2.name
4185 [ "sys", "storage", "columnsize", "sys", "storagemodelinit", "PROCEDURE" ] 4185 4186 [ "sys", "storage", "columnsize", "sys", "storagemodelinit", "PROCEDURE" ] 4186
+ 4187 [ "sys", "storage", "compressed", "sys", "storagemodelinit", "PROCEDURE" ] 4187
4186 [ "sys", "storage", "count", "sys", "storagemodelinit", "PROCEDURE" ] 4186 4188 [ "sys", "storage", "count", "sys", "storagemodelinit", "PROCEDURE" ] 4188
..................
#select s1.name, t.name, c.name, s2.name
4202 [ "sys", "storagemodelinput", "column", "sys", "storagemodelinit", "PROCEDURE" ] 4202 4204 [ "sys", "storagemodelinput", "column", "sys", "storagemodelinit", "PROCEDURE" ] 4204
+ 4205 [ "sys", "storagemodelinput", "compressed", "sys", "storagemodelinit", "PROCEDURE" ] 4205
4203 [ "sys", "storagemodelinput", "count", "sys", "storagemodelinit", "PROCEDURE" ] 4203 4206 [ "sys", "storagemodelinput", "count", "sys", "storagemodelinit", "PROCEDURE" ] 4206