Changeset: 0cb57526b00d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0cb57526b00d
Modified Files:
        clients/Tests/SQL-dump.stable.out
        clients/Tests/SQL-dump.stable.out.int128
        sql/backends/monet5/sql_statistics.c
        sql/backends/monet5/sql_upgrades.c
        sql/scripts/80_statistics.sql
        sql/test/BugTracker-2016/Tests/storagemodel.stable.out
        sql/test/Tests/systemfunctions.stable.out
        sql/test/Tests/systemfunctions.stable.out.int128
        sql/test/emptydb-upgrade-chain-hge/Tests/check.stable.out.int128
        sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-chain/Tests/check.stable.out
        sql/test/emptydb-upgrade-chain/Tests/check.stable.out.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-hge/Tests/check.stable.out.int128
        sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade/Tests/check.stable.out
        sql/test/emptydb-upgrade/Tests/check.stable.out.int128
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
        sql/test/emptydb/Tests/check.stable.out
        sql/test/emptydb/Tests/check.stable.out.int128
        sql/test/leaks/Tests/check0.stable.out
        sql/test/leaks/Tests/check0.stable.out.int128
        sql/test/leaks/Tests/check1.stable.out
        sql/test/leaks/Tests/check1.stable.out.int128
        sql/test/leaks/Tests/check2.stable.out
        sql/test/leaks/Tests/check2.stable.out.int128
        sql/test/leaks/Tests/check3.stable.out
        sql/test/leaks/Tests/check3.stable.out.int128
        sql/test/leaks/Tests/check4.stable.out
        sql/test/leaks/Tests/check4.stable.out.int128
        sql/test/leaks/Tests/check5.stable.out
        sql/test/leaks/Tests/check5.stable.out.int128
        sql/test/leaks/Tests/drop3.stable.out
        sql/test/leaks/Tests/drop3.stable.out.int128
        sql/test/leaks/Tests/select1.stable.out.int128
        sql/test/leaks/Tests/select2.stable.out.int128
        sql/test/leaks/Tests/temp1.stable.out
        sql/test/leaks/Tests/temp1.stable.out.int128
        sql/test/leaks/Tests/temp2.stable.out
        sql/test/leaks/Tests/temp2.stable.out.int128
        sql/test/leaks/Tests/temp3.stable.out
        sql/test/leaks/Tests/temp3.stable.out.int128
        sql/test/remote/Tests/partition_elim.stable.out
        sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out
        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: default
Log Message:

Add a column revsorted to the statistics table used by ANALYZE.
Also, actually figure out the (reverse) sortedness of the column being
analyzed.


diffs (truncated from 1748 to 300 lines):

diff --git a/clients/Tests/SQL-dump.stable.out 
b/clients/Tests/SQL-dump.stable.out
--- a/clients/Tests/SQL-dump.stable.out
+++ b/clients/Tests/SQL-dump.stable.out
@@ -820,7 +820,7 @@ CREATE TABLE "sys"."privileges" ("obj_id
 CREATE TABLE "sys"."schemas" ("id" INTEGER, "name" VARCHAR(1024), 
"authorization" INTEGER, "owner" INTEGER, "system" BOOLEAN);
 CREATE TABLE "sys"."sequences" ("id" INTEGER, "schema_id" INTEGER, "name" 
VARCHAR(256), "start" BIGINT, "minvalue" BIGINT, "maxvalue" BIGINT, "increment" 
BIGINT, "cacheinc" BIGINT, "cycle" BOOLEAN);
 CREATE TABLE "sys"."spatial_ref_sys" ("srid" INTEGER NOT NULL, "auth_name" 
VARCHAR(256), "auth_srid" INTEGER, "srtext" VARCHAR(2048), "proj4text" 
VARCHAR(2048), CONSTRAINT "spatial_ref_sys_srid_pkey" PRIMARY KEY ("srid"));
-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);
+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);
 CREATE TABLE "sys"."storagemodelinput" ("schema" CHARACTER LARGE OBJECT, 
"table" CHARACTER LARGE OBJECT, "column" CHARACTER LARGE OBJECT, "type" 
CHARACTER LARGE OBJECT, "typewidth" INTEGER, "count" BIGINT, "distinct" BIGINT, 
"atomwidth" INTEGER, "reference" BOOLEAN, "sorted" BOOLEAN, "revsorted" 
BOOLEAN, "unique" BOOLEAN, "orderidx" BIGINT);
 CREATE TABLE "sys"."systemfunctions" ("function_id" INTEGER);
 CREATE TABLE "sys"."table_types" ("table_type_id" SMALLINT NOT NULL, 
"table_type_name" VARCHAR(25) NOT NULL, CONSTRAINT 
"table_types_table_type_id_pkey" PRIMARY KEY ("table_type_id"), CONSTRAINT 
"table_types_table_type_name_unique" UNIQUE ("table_type_name"));
@@ -1632,6 +1632,7 @@ drop function pcre_replace(string, strin
 [ "statistics",        "minval",       "clob", 0,      0,      NULL,   true,   
8,      NULL    ]
 [ "statistics",        "maxval",       "clob", 0,      0,      NULL,   true,   
9,      NULL    ]
 [ "statistics",        "sorted",       "boolean",      1,      0,      NULL,   
true,   10,     NULL    ]
+[ "statistics",        "revsorted",    "boolean",      1,      0,      NULL,   
true,   11,     NULL    ]
 [ "storage",   "schema",       "clob", 0,      0,      NULL,   true,   0,      
NULL    ]
 [ "storage",   "table",        "clob", 0,      0,      NULL,   true,   1,      
NULL    ]
 [ "storage",   "column",       "clob", 0,      0,      NULL,   true,   2,      
NULL    ]
diff --git a/clients/Tests/SQL-dump.stable.out.int128 
b/clients/Tests/SQL-dump.stable.out.int128
--- a/clients/Tests/SQL-dump.stable.out.int128
+++ b/clients/Tests/SQL-dump.stable.out.int128
@@ -816,7 +816,7 @@ CREATE TABLE "sys"."privileges" ("obj_id
 CREATE TABLE "sys"."schemas" ("id" INTEGER, "name" VARCHAR(1024), 
"authorization" INTEGER, "owner" INTEGER, "system" BOOLEAN);
 CREATE TABLE "sys"."sequences" ("id" INTEGER, "schema_id" INTEGER, "name" 
VARCHAR(256), "start" BIGINT, "minvalue" BIGINT, "maxvalue" BIGINT, "increment" 
BIGINT, "cacheinc" BIGINT, "cycle" BOOLEAN);
 CREATE TABLE "sys"."spatial_ref_sys" ("srid" INTEGER NOT NULL, "auth_name" 
VARCHAR(256), "auth_srid" INTEGER, "srtext" VARCHAR(2048), "proj4text" 
VARCHAR(2048), CONSTRAINT "spatial_ref_sys_srid_pkey" PRIMARY KEY ("srid"));
-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);
+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);
 CREATE TABLE "sys"."storagemodelinput" ("schema" CHARACTER LARGE OBJECT, 
"table" CHARACTER LARGE OBJECT, "column" CHARACTER LARGE OBJECT, "type" 
CHARACTER LARGE OBJECT, "typewidth" INTEGER, "count" BIGINT, "distinct" BIGINT, 
"atomwidth" INTEGER, "reference" BOOLEAN, "sorted" BOOLEAN, "revsorted" 
BOOLEAN, "unique" BOOLEAN, "orderidx" BIGINT);
 CREATE TABLE "sys"."systemfunctions" ("function_id" INTEGER);
 CREATE TABLE "sys"."table_types" ("table_type_id" SMALLINT NOT NULL, 
"table_type_name" VARCHAR(25) NOT NULL, CONSTRAINT 
"table_types_table_type_id_pkey" PRIMARY KEY ("table_type_id"), CONSTRAINT 
"table_types_table_type_name_unique" UNIQUE ("table_type_name"));
@@ -1638,6 +1638,7 @@ drop function pcre_replace(string, strin
 [ "statistics",        "minval",       "clob", 0,      0,      NULL,   true,   
8,      NULL    ]
 [ "statistics",        "maxval",       "clob", 0,      0,      NULL,   true,   
9,      NULL    ]
 [ "statistics",        "sorted",       "boolean",      1,      0,      NULL,   
true,   10,     NULL    ]
+[ "statistics",        "revsorted",    "boolean",      1,      0,      NULL,   
true,   11,     NULL    ]
 [ "storage",   "schema",       "clob", 0,      0,      NULL,   true,   0,      
NULL    ]
 [ "storage",   "table",        "clob", 0,      0,      NULL,   true,   1,      
NULL    ]
 [ "storage",   "column",       "clob", 0,      0,      NULL,   true,   2,      
NULL    ]
diff --git a/sql/backends/monet5/sql_statistics.c 
b/sql/backends/monet5/sql_statistics.c
--- a/sql/backends/monet5/sql_statistics.c
+++ b/sql/backends/monet5/sql_statistics.c
@@ -62,7 +62,7 @@ sql_analyze(Client cntxt, MalBlkPtr mb, 
        char *query, *dquery;
        char *maxval = NULL, *minval = NULL;
        str sch = 0, tbl = 0, col = 0;
-       int sorted;
+       int sorted, revsorted;
        lng nils = 0;
        lng uniq = 0;
        lng samplesize = *getArgReference_lng(stk, pci, 2);
@@ -153,7 +153,13 @@ sql_analyze(Client cntxt, MalBlkPtr mb, 
                                                }
                                                if( bsample)
                                                        
BBPunfix(bsample->batCacheid);
-                                               sorted = BATtordered(bn);
+                                               /* use BATordered(_rev)
+                                                * and not
+                                                * BATt(rev)ordered
+                                                * because we want to
+                                                * know for sure */
+                                               sorted = BATordered(bn);
+                                               revsorted = BATordered_rev(bn);
 
                                                // Gather the min/max value for 
builtin types
                                                width = bn->twidth;
@@ -171,7 +177,7 @@ sql_analyze(Client cntxt, MalBlkPtr mb, 
                                                        snprintf(maxval, 4, 
"nil");
                                                        snprintf(minval, 4, 
"nil");
                                                }
-                                               snprintf(query, 8192, "insert 
into sys.statistics values(%d,'%s',%d,now()," LLFMT "," LLFMT "," LLFMT "," 
LLFMT ",'%s','%s',%s);", c->base.id, c->type.type->sqlname, width, (samplesize 
? samplesize : sz), sz, uniq, nils, minval, maxval, sorted ? "true" : "false");
+                                               snprintf(query, 8192, "insert 
into sys.statistics 
(column_id,type,width,stamp,\"sample\",count,\"unique\",nils,minval,maxval,sorted,revsorted)
 values(%d,'%s',%d,now()," LLFMT "," LLFMT "," LLFMT "," LLFMT 
",'%s','%s',%s,%s);", c->base.id, c->type.type->sqlname, width, (samplesize ? 
samplesize : sz), sz, uniq, nils, minval, maxval, sorted ? "true" : "false", 
revsorted ? "true" : "false");
 #ifdef DEBUG_SQL_STATISTICS
                                                mnstr_printf(cntxt->fdout, 
"%s\n", dquery);
                                                mnstr_printf(cntxt->fdout, 
"%s\n", query);
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
@@ -1667,6 +1667,11 @@ sql_update_default(Client c, mvc *sql)
                        " sum(case when sorted = false then 8 * count else 0 
end) as auxiliary\n"
                        "from sys.storagemodel() group by 
\"schema\",\"table\";\n"
                        "update sys._tables set system = true where name in 
('storage', 'storagemodel', 'tablestoragemodel') and schema_id = (select id 
from sys.schemas where name = 'sys');\n");
+
+       /* 80_statistics.sql */
+       pos += snprintf(buf + pos, bufsize - pos,
+                       "alter table sys.statistics add column \"revsorted\" 
boolean;\n");
+
        pos += snprintf(buf + pos, bufsize - pos,
                        "insert into sys.systemfunctions (select f.id from 
sys.functions f, sys.schemas s where f.name in ('storage', 'storagemodel') and 
f.type = %d and f.schema_id = s.id and s.name = 'sys');\n",
                        F_UNION);
diff --git a/sql/scripts/80_statistics.sql b/sql/scripts/80_statistics.sql
--- a/sql/scripts/80_statistics.sql
+++ b/sql/scripts/80_statistics.sql
@@ -20,7 +20,8 @@ CREATE TABLE sys.statistics(
        "nils" bigint,
        minval string,
        maxval string,
-       sorted boolean);
+       sorted boolean,
+       revsorted boolean);
 
 create procedure sys.analyze(minmax int, "sample" bigint)
 external name sql.analyze;
diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out 
b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out
--- a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out
+++ b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out
@@ -74,21 +74,21 @@ Ready.
 [ "sys",       "_tables",      "id",   "int",  "writable",     4,      0,      
false,  0,      true    ]
 [ "sys",       "_tables",      "name", "varchar",      "writable",     8,      
0,      false,  0,      false   ]
 [ "sys",       "_tables",      "schema_id",    "int",  "writable",     4,      
0,      false,  0,      false   ]
-[ "sys",       "_tables",      "query",        "varchar",      "writable",     
34,     0,      false,  0,      false   ]
-[ "sys",       "_tables",      "type", "smallint",     "writable",     2,      
0,      false,  0,      false   ]
-[ "sys",       "_tables",      "system",       "boolean",      "writable",     
1,      0,      false,  0,      false   ]
-[ "sys",       "_tables",      "commit_action",        "smallint",     
"writable",     2,      0,      false,  0,      false   ]
+[ "sys",       "_tables",      "query",        "varchar",      "writable",     
34,     0,      false,  0,      NULL    ]
+[ "sys",       "_tables",      "type", "smallint",     "writable",     2,      
0,      false,  0,      NULL    ]
+[ "sys",       "_tables",      "system",       "boolean",      "writable",     
1,      0,      false,  0,      NULL    ]
+[ "sys",       "_tables",      "commit_action",        "smallint",     
"writable",     2,      0,      false,  0,      NULL    ]
 [ "sys",       "_tables",      "access",       "smallint",     "writable",     
2,      0,      false,  0,      true    ]
 #update storagemodelinput set "count" =10000 where "table" ='bug3923';
 [ 1    ]
 #update storagemodelinput set "distinct" =10 where "table" ='bug3923' and 
"column" ='i';
 [ 1    ]
 #select * from storagemodel() where "table" = 'bug3923';
-% .,   .,      .,      .,      .,      .,      .,      .,      .,      .,      
. # table_name
-% schema,      table,  column, type,   count,  columnsize,     heapsize,       
hashes, imprints,       sorted, orderidx # name
-% clob,        clob,   clob,   clob,   bigint, bigint, bigint, bigint, bigint, 
boolean,        bigint # type
-% 3,   7,      1,      3,      5,      5,      1,      1,      4,      5,      
1 # length
-[ "sys",       "bug3923",      "i",    "int",  10000,  40000,  0,      0,      
1200,   true,   0       ]
+% .,   .,      .,      .,      .,      .,      .,      .,      .,      .,      
.,      .,      . # table_name
+% schema,      table,  column, type,   count,  columnsize,     heapsize,       
hashes, imprints,       sorted, revsorted,      unique, orderidx # name
+% clob,        clob,   clob,   clob,   bigint, bigint, bigint, bigint, bigint, 
boolean,        boolean,        boolean,        bigint # type
+% 3,   7,      1,      3,      5,      5,      1,      1,      4,      5,      
5,      5,      1 # length
+[ "sys",       "bug3923",      "i",    "int",  10000,  40000,  0,      0,      
1200,   true,   true,   NULL,   0       ]
 #drop table bug3923;
 #create table bug3923(i integer);
 #select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, 
imprints, sorted from storage('sys','_tables');
@@ -96,24 +96,24 @@ Ready.
 % schema,      table,  column, type,   mode,   typewidth,      hashes, phash,  
imprints,       sorted # name
 % clob,        clob,   clob,   clob,   clob,   int,    bigint, boolean,        
bigint, boolean # type
 % 3,   7,      13,     8,      8,      2,      4,      5,      1,      5 # 
length
-[ "sys",       "_tables",      "id",   "int",  "writable",     4,      1064,   
false,  0,      false   ]
+[ "sys",       "_tables",      "id",   "int",  "writable",     4,      1064,   
false,  0,      NULL    ]
 [ "sys",       "_tables",      "name", "varchar",      "writable",     8,      
0,      false,  0,      false   ]
 [ "sys",       "_tables",      "schema_id",    "int",  "writable",     4,      
0,      false,  0,      false   ]
-[ "sys",       "_tables",      "query",        "varchar",      "writable",     
33,     0,      false,  0,      false   ]
-[ "sys",       "_tables",      "type", "smallint",     "writable",     2,      
0,      false,  0,      false   ]
-[ "sys",       "_tables",      "system",       "boolean",      "writable",     
1,      0,      false,  0,      false   ]
-[ "sys",       "_tables",      "commit_action",        "smallint",     
"writable",     2,      0,      false,  0,      false   ]
+[ "sys",       "_tables",      "query",        "varchar",      "writable",     
33,     0,      false,  0,      NULL    ]
+[ "sys",       "_tables",      "type", "smallint",     "writable",     2,      
0,      false,  0,      NULL    ]
+[ "sys",       "_tables",      "system",       "boolean",      "writable",     
1,      0,      false,  0,      NULL    ]
+[ "sys",       "_tables",      "commit_action",        "smallint",     
"writable",     2,      0,      false,  0,      NULL    ]
 [ "sys",       "_tables",      "access",       "smallint",     "writable",     
2,      0,      false,  0,      true    ]
 #update storagemodelinput set "count" =10000 where "table" ='bug3923';
 [ 1    ]
 #update storagemodelinput set "distinct" =10 where "table" ='bug3923' and 
"column" ='i';
 [ 1    ]
 #select * from storagemodel() where "table" = 'bug3923';
-% .,   .,      .,      .,      .,      .,      .,      .,      .,      .,      
. # table_name
-% schema,      table,  column, type,   count,  columnsize,     heapsize,       
hashes, imprints,       sorted, orderidx # name
-% clob,        clob,   clob,   clob,   bigint, bigint, bigint, bigint, bigint, 
boolean,        bigint # type
-% 3,   7,      1,      3,      5,      5,      1,      1,      4,      5,      
1 # length
-[ "sys",       "bug3923",      "i",    "int",  10000,  40000,  0,      0,      
1200,   true,   0       ]
+% .,   .,      .,      .,      .,      .,      .,      .,      .,      .,      
.,      .,      . # table_name
+% schema,      table,  column, type,   count,  columnsize,     heapsize,       
hashes, imprints,       sorted, revsorted,      unique, orderidx # name
+% clob,        clob,   clob,   clob,   bigint, bigint, bigint, bigint, bigint, 
boolean,        boolean,        boolean,        bigint # type
+% 3,   7,      1,      3,      5,      5,      1,      1,      4,      5,      
5,      5,      1 # length
+[ "sys",       "bug3923",      "i",    "int",  10000,  40000,  0,      0,      
1200,   true,   true,   NULL,   0       ]
 #drop table bug3923;
 
 # 23:38:44 >  
diff --git a/sql/test/Tests/systemfunctions.stable.out 
b/sql/test/Tests/systemfunctions.stable.out
--- a/sql/test/Tests/systemfunctions.stable.out
+++ b/sql/test/Tests/systemfunctions.stable.out
@@ -58,7 +58,7 @@ Ready.
 % sys.L3,      sys.L3, sys.L3, sys.L3, sys.L3 # table_name
 % schema,      function,       argno,  argtype,        definition # name
 % varchar,     varchar,        int,    varchar,        varchar # type
-% 8,   35,     2,      14,     608 # length
+% 8,   35,     2,      14,     611 # length
 [ "bam",       "bam_drop_file",        0,      "bigint",       "create 
procedure bam.bam_drop_file(file_id bigint, dbschema smallint)\nexternal name 
bam.bam_drop_file;"       ]
 [ "bam",       "bam_drop_file",        1,      "smallint",     ""      ]
 [ "bam",       "bam_export",   0,      "clob", "create procedure 
bam.bam_export(output_path string)\nexternal name bam.bam_export;"    ]
@@ -999,9 +999,11 @@ Ready.
 [ "sys",       "ltrim",        0,      "clob", "ltrim" ]
 [ "sys",       "ltrim",        1,      "clob", ""      ]
 [ "sys",       "ltrim",        2,      "clob", ""      ]
-[ "sys",       "malfunctions", 0,      "clob", "create function 
sys.malfunctions()\n returns table(\"signature\" string, \"address\" string, 
\"comment\" string)\n external name \"manual\".\"functions\";"    ]
+[ "sys",       "malfunctions", 0,      "clob", "create function 
sys.malfunctions()\n returns table(\"module\" string, \"function\" string, 
\"signature\" string, \"address\" string, \"comment\" string)\n external name 
\"manual\".\"functions\";"    ]
 [ "sys",       "malfunctions", 1,      "clob", ""      ]
 [ "sys",       "malfunctions", 2,      "clob", ""      ]
+[ "sys",       "malfunctions", 3,      "clob", ""      ]
+[ "sys",       "malfunctions", 4,      "clob", ""      ]
 [ "sys",       "masklen",      0,      "int",  "create function \"masklen\" (p 
inet) returns int\n external name inet.\"masklen\";"    ]
 [ "sys",       "masklen",      1,      "inet", ""      ]
 [ "sys",       "max",  0,      "any",  "max"   ]
@@ -4126,7 +4128,7 @@ Ready.
 [ "sys",       "stddev_samp",  1,      "timestamp",    ""      ]
 [ "sys",       "stop", 0,      "int",  "create procedure sys.stop(tag 
int)\nexternal name sql.sysmon_stop;"    ]
 [ "sys",       "stop", 0,      "bigint",       "create procedure sys.stop(tag 
bigint)\nexternal name sql.sysmon_stop;" ]
-[ "sys",       "storage",      0,      "clob", "create function 
sys.\"storage\"()\nreturns table (\n \"schema\" string,\n \"table\" string,\n 
\"column\" string,\n \"type\" string,\n \"mode\" string,\n location string,\n 
\"count\" bigint,\n typewidth int,\n columnsize bigint,\n heapsize bigint,\n 
hashes bigint,\n phash boolean,\n \"imprints\" bigint,\n sorted boolean,\n 
orderidx bigint\n)\nexternal name sql.\"storage\";"        ]
+[ "sys",       "storage",      0,      "clob", "create function 
sys.\"storage\"()\nreturns table (\n \"schema\" string,\n \"table\" string,\n 
\"column\" string,\n \"type\" string,\n \"mode\" string,\n location string,\n 
\"count\" bigint,\n typewidth int,\n columnsize bigint,\n heapsize bigint,\n 
hashes bigint,\n phash boolean,\n \"imprints\" bigint,\n sorted boolean,\n 
revsorted boolean,\n \"unique\" boolean,\n orderidx bigint\n)\nexternal name 
sql.\"storage\";"     ]
 [ "sys",       "storage",      1,      "clob", ""      ]
 [ "sys",       "storage",      2,      "clob", ""      ]
 [ "sys",       "storage",      3,      "clob", ""      ]
@@ -4140,8 +4142,10 @@ Ready.
 [ "sys",       "storage",      11,     "boolean",      ""      ]
 [ "sys",       "storage",      12,     "bigint",       ""      ]
 [ "sys",       "storage",      13,     "boolean",      ""      ]
-[ "sys",       "storage",      14,     "bigint",       ""      ]
-[ "sys",       "storage",      0,      "clob", "create function 
sys.\"storage\"( sname string)\nreturns table (\n \"schema\" string,\n 
\"table\" string,\n \"column\" string,\n \"type\" string,\n \"mode\" string,\n 
location string,\n \"count\" bigint,\n typewidth int,\n columnsize bigint,\n 
heapsize bigint,\n hashes bigint,\n phash boolean,\n \"imprints\" bigint,\n 
sorted boolean,\n orderidx bigint\n)\nexternal name sql.\"storage\";"   ]
+[ "sys",       "storage",      14,     "boolean",      ""      ]
+[ "sys",       "storage",      15,     "boolean",      ""      ]
+[ "sys",       "storage",      16,     "bigint",       ""      ]
+[ "sys",       "storage",      0,      "clob", "create function 
sys.\"storage\"( sname string)\nreturns table (\n \"schema\" string,\n 
\"table\" string,\n \"column\" string,\n \"type\" string,\n \"mode\" string,\n 
location string,\n \"count\" bigint,\n typewidth int,\n columnsize bigint,\n 
heapsize bigint,\n hashes bigint,\n phash boolean,\n \"imprints\" bigint,\n 
sorted boolean,\n revsorted boolean,\n \"unique\" boolean,\n orderidx 
bigint\n)\nexternal name sql.\"storage\";"        ]
 [ "sys",       "storage",      1,      "clob", ""      ]
 [ "sys",       "storage",      2,      "clob", ""      ]
 [ "sys",       "storage",      3,      "clob", ""      ]
@@ -4155,9 +4159,11 @@ Ready.
 [ "sys",       "storage",      11,     "boolean",      ""      ]
 [ "sys",       "storage",      12,     "bigint",       ""      ]
 [ "sys",       "storage",      13,     "boolean",      ""      ]
-[ "sys",       "storage",      14,     "bigint",       ""      ]
-[ "sys",       "storage",      15,     "clob", ""      ]
-[ "sys",       "storage",      0,      "clob", "create function 
sys.\"storage\"( sname string, tname string)\nreturns table (\n \"schema\" 
string,\n \"table\" string,\n \"column\" string,\n \"type\" string,\n \"mode\" 
string,\n location string,\n \"count\" bigint,\n typewidth int,\n columnsize 
bigint,\n heapsize bigint,\n hashes bigint,\n phash boolean,\n \"imprints\" 
bigint,\n sorted boolean,\n orderidx bigint\n)\nexternal name sql.\"storage\";" 
    ]
+[ "sys",       "storage",      14,     "boolean",      ""      ]
+[ "sys",       "storage",      15,     "boolean",      ""      ]
+[ "sys",       "storage",      16,     "bigint",       ""      ]
+[ "sys",       "storage",      17,     "clob", ""      ]
+[ "sys",       "storage",      0,      "clob", "create function 
sys.\"storage\"( sname string, tname string)\nreturns table (\n \"schema\" 
string,\n \"table\" string,\n \"column\" string,\n \"type\" string,\n \"mode\" 
string,\n location string,\n \"count\" bigint,\n typewidth int,\n columnsize 
bigint,\n heapsize bigint,\n hashes bigint,\n phash boolean,\n \"imprints\" 
bigint,\n sorted boolean,\n revsorted boolean,\n \"unique\" boolean,\n orderidx 
bigint\n)\nexternal name sql.\"storage\";"  ]
 [ "sys",       "storage",      1,      "clob", ""      ]
 [ "sys",       "storage",      2,      "clob", ""      ]
 [ "sys",       "storage",      3,      "clob", ""      ]
@@ -4171,10 +4177,12 @@ Ready.
 [ "sys",       "storage",      11,     "boolean",      ""      ]
 [ "sys",       "storage",      12,     "bigint",       ""      ]
 [ "sys",       "storage",      13,     "boolean",      ""      ]
-[ "sys",       "storage",      14,     "bigint",       ""      ]
-[ "sys",       "storage",      15,     "clob", ""      ]
-[ "sys",       "storage",      16,     "clob", ""      ]
-[ "sys",       "storage",      0,      "clob", "create function 
sys.\"storage\"( sname string, tname string, cname string)\nreturns table (\n 
\"schema\" string,\n \"table\" string,\n \"column\" string,\n \"type\" 
string,\n \"mode\" string,\n location string,\n \"count\" bigint,\n typewidth 
int,\n columnsize bigint,\n heapsize bigint,\n hashes bigint,\n phash 
boolean,\n \"imprints\" bigint,\n sorted boolean,\n orderidx 
bigint\n)\nexternal name sql.\"storage\";"       ]
+[ "sys",       "storage",      14,     "boolean",      ""      ]
+[ "sys",       "storage",      15,     "boolean",      ""      ]
+[ "sys",       "storage",      16,     "bigint",       ""      ]
+[ "sys",       "storage",      17,     "clob", ""      ]
+[ "sys",       "storage",      18,     "clob", ""      ]
+[ "sys",       "storage",      0,      "clob", "create function 
sys.\"storage\"( sname string, tname string, cname string)\nreturns table (\n 
\"schema\" string,\n \"table\" string,\n \"column\" string,\n \"type\" 
string,\n \"mode\" string,\n location string,\n \"count\" bigint,\n typewidth 
int,\n columnsize bigint,\n heapsize bigint,\n hashes bigint,\n phash 
boolean,\n \"imprints\" bigint,\n sorted boolean,\n revsorted boolean,\n 
\"unique\" boolean,\n orderidx bigint\n)\nexternal name sql.\"storage\";"    ]
 [ "sys",       "storage",      1,      "clob", ""      ]
 [ "sys",       "storage",      2,      "clob", ""      ]
 [ "sys",       "storage",      3,      "clob", ""      ]
@@ -4188,11 +4196,13 @@ Ready.
 [ "sys",       "storage",      11,     "boolean",      ""      ]
 [ "sys",       "storage",      12,     "bigint",       ""      ]
 [ "sys",       "storage",      13,     "boolean",      ""      ]
-[ "sys",       "storage",      14,     "bigint",       ""      ]
-[ "sys",       "storage",      15,     "clob", ""      ]
-[ "sys",       "storage",      16,     "clob", ""      ]
+[ "sys",       "storage",      14,     "boolean",      ""      ]
+[ "sys",       "storage",      15,     "boolean",      ""      ]
+[ "sys",       "storage",      16,     "bigint",       ""      ]
 [ "sys",       "storage",      17,     "clob", ""      ]
-[ "sys",       "storagemodel", 0,      "clob", "create function 
sys.storagemodel()\nreturns table (\n \"schema\" string,\n \"table\" string,\n 
\"column\" string,\n \"type\" string,\n \"count\" bigint,\n columnsize 
bigint,\n heapsize bigint,\n hashes bigint,\n \"imprints\" bigint,\n sorted 
boolean,\n orderidx bigint)\nbegin\n return select i.\"schema\", i.\"table\", 
i.\"column\", i.\"type\", i.\"count\",\n columnsize(i.\"type\", i.count, 
i.\"distinct\"),\n heapsize(i.\"type\", i.\"distinct\", i.\"atomwidth\"),\n 
hashsize(i.\"reference\", i.\"count\"),\n 
imprintsize(i.\"count\",i.\"type\"),\n i.sorted, i.orderidx\n from 
sys.storagemodelinput i;\nend;"      ]
+[ "sys",       "storage",      18,     "clob", ""      ]
+[ "sys",       "storage",      19,     "clob", ""      ]
+[ "sys",       "storagemodel", 0,      "clob", "create function 
sys.storagemodel()\nreturns table (\n \"schema\" string,\n \"table\" string,\n 
\"column\" string,\n \"type\" string,\n \"count\" bigint,\n columnsize 
bigint,\n heapsize bigint,\n hashes bigint,\n \"imprints\" bigint,\n sorted 
boolean,\n revsorted boolean,\n \"unique\" boolean,\n orderidx bigint)\nbegin\n 
return select i.\"schema\", i.\"table\", i.\"column\", i.\"type\", 
i.\"count\",\n columnsize(i.\"type\", i.count, i.\"distinct\"),\n 
heapsize(i.\"type\", i.\"distinct\", i.\"atomwidth\"),\n 
hashsize(i.\"reference\", i.\"count\"),\n 
imprintsize(i.\"count\",i.\"type\"),\n i.sorted, i.revsorted, i.\"unique\", 
i.orderidx\n from sys.storagemodelinput i;\nend;"        ]
 [ "sys",       "storagemodel", 1,      "clob", ""      ]
 [ "sys",       "storagemodel", 2,      "clob", ""      ]
 [ "sys",       "storagemodel", 3,      "clob", ""      ]
@@ -4202,7 +4212,9 @@ Ready.
 [ "sys",       "storagemodel", 7,      "bigint",       ""      ]
 [ "sys",       "storagemodel", 8,      "bigint",       ""      ]
 [ "sys",       "storagemodel", 9,      "boolean",      ""      ]
-[ "sys",       "storagemodel", 10,     "bigint",       ""      ]
+[ "sys",       "storagemodel", 10,     "boolean",      ""      ]
+[ "sys",       "storagemodel", 11,     "boolean",      ""      ]
+[ "sys",       "storagemodel", 12,     "bigint",       ""      ]
 [ "sys",       "str_to_date",  0,      "date", "create function str_to_date(s 
string, format string) returns date\n external name mtime.\"str_to_date\";"     
 ]
 [ "sys",       "str_to_date",  1,      "clob", ""      ]
 [ "sys",       "str_to_date",  2,      "clob", ""      ]
diff --git a/sql/test/Tests/systemfunctions.stable.out.int128 
b/sql/test/Tests/systemfunctions.stable.out.int128
--- a/sql/test/Tests/systemfunctions.stable.out.int128
+++ b/sql/test/Tests/systemfunctions.stable.out.int128
@@ -58,7 +58,7 @@ Ready.
 % sys.L3,      sys.L3, sys.L3, sys.L3, sys.L3 # table_name
 % schema,      function,       argno,  argtype,        definition # name
 % varchar,     varchar,        int,    varchar,        varchar # type
-% 8,   35,     2,      14,     608 # length
+% 8,   35,     2,      14,     611 # length
 [ "bam",       "bam_drop_file",        0,      "bigint",       "create 
procedure bam.bam_drop_file(file_id bigint, dbschema smallint)\nexternal name 
bam.bam_drop_file;"       ]
 [ "bam",       "bam_drop_file",        1,      "smallint",     ""      ]
 [ "bam",       "bam_export",   0,      "clob", "create procedure 
bam.bam_export(output_path string)\nexternal name bam.bam_export;"    ]
@@ -1047,9 +1047,11 @@ Ready.
 [ "sys",       "ltrim",        0,      "clob", "ltrim" ]
 [ "sys",       "ltrim",        1,      "clob", ""      ]
 [ "sys",       "ltrim",        2,      "clob", ""      ]
-[ "sys",       "malfunctions", 0,      "clob", "create function 
sys.malfunctions()\n returns table(\"signature\" string, \"address\" string, 
\"comment\" string)\n external name \"manual\".\"functions\";"    ]
+[ "sys",       "malfunctions", 0,      "clob", "create function 
sys.malfunctions()\n returns table(\"module\" string, \"function\" string, 
\"signature\" string, \"address\" string, \"comment\" string)\n external name 
\"manual\".\"functions\";"    ]
 [ "sys",       "malfunctions", 1,      "clob", ""      ]
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to