Changeset: 4c270abe4e2d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c270abe4e2d
Removed Files:
        sql/scripts/10_math.sql
Modified Files:
        sql/backends/monet5/CMakeLists.txt
        sql/backends/monet5/sql_upgrades.c
        sql/common/sql_types.c
        sql/common/sql_types.h
        sql/scripts/CMakeLists.txt
        sql/storage/bat/bat_logger.c
        sql/storage/sql_storage.h
        sql/storage/store.c
        sql/test/emptydb/Tests/check.stable.out
        sql/test/emptydb/Tests/check.stable.out.32bit
        sql/test/emptydb/Tests/check.stable.out.int128
        sql/test/sys-schema/Tests/systemfunctions.stable.out
        sql/test/sys-schema/Tests/systemfunctions.stable.out.int128
Branch: default
Log Message:

Removed 10_math.sql script. Mada functions degree and radians SQL compliant, ie 
without schema. This fixes bug 6814


diffs (truncated from 484 to 300 lines):

diff --git a/sql/backends/monet5/CMakeLists.txt 
b/sql/backends/monet5/CMakeLists.txt
--- a/sql/backends/monet5/CMakeLists.txt
+++ b/sql/backends/monet5/CMakeLists.txt
@@ -15,7 +15,6 @@ add_library(sql SHARED)
 
 set(include_sql_files
   09_like
-  10_math
   12_url
   13_date
   14_inet
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
@@ -2971,6 +2971,20 @@ sql_update_default(Client c, mvc *sql, c
                                        "DROP FUNCTION 
\"sys\".\"getcontent\"(url);\n"
                                        "DROP AGGREGATE 
\"json\".\"output\"(json);\n");
 
+                       /* Move sys.degrees and sys.radians to sql_types.c 
definitions */
+                       pos += snprintf(buf + pos, bufsize - pos,
+                                       "delete from args where args.id in 
(select args.id from args left join functions on args.func_id = functions.id 
where args.name in ('r', 'd') and functions.id is null);\n"
+                                       "delete from privileges where obj_id in 
(select obj_id from privileges left join functions on privileges.obj_id = 
functions.id where functions.id is null and privileges.obj_id not in ((SELECT 
tables.id from tables), 0));\n");
+
+                       sql_subtype *types[2] = {sql_bind_localtype("flt"), 
sql_bind_localtype("dbl")};
+                       list *functions = sa_list(sql->sa);
+                       for (int i = 0; i < 2; i++) {
+                               sql_subtype *next = types[i];
+                               list_append(functions, sql_create_func(sql->sa, 
"degrees", "mmath", "degrees", FALSE, FALSE, SCALE_FIX, 0, next->type, 1, 
next->type));
+                               list_append(functions, sql_create_func(sql->sa, 
"radians", "mmath", "radians", FALSE, FALSE, SCALE_FIX, 0, next->type, 1, 
next->type));
+                       }
+                       insert_functions(sql->session->tr, mvc_bind_table(sql, 
sys, "functions"), functions, mvc_bind_table(sql, sys, "args"));
+
                        pos += snprintf(buf + pos, bufsize - pos, "set schema 
\"%s\";\n", prev_schema);
                        assert(pos < bufsize);
 
diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c
--- a/sql/common/sql_types.c
+++ b/sql/common/sql_types.c
@@ -1072,7 +1072,7 @@ sql_create_procedure(sql_allocator *sa, 
        return res;
 }
 
-static sql_func *
+sql_func *
 sql_create_func(sql_allocator *sa, const char *name, const char *mod, const 
char *imp, bit semantics, bit side_effect, int fix_scale,
                                unsigned int res_scale, sql_type *fres, int 
nargs, ...)
 {
@@ -1725,6 +1725,8 @@ sqltypeinit( sql_allocator *sa)
                sql_create_func(sa, "log", "mmath", "log", FALSE, FALSE, 
SCALE_FIX, 0, *t, 2, *t, *t);
                sql_create_func(sa, "log10", "mmath", "log10", FALSE, FALSE, 
SCALE_FIX, 0, *t, 1, *t);
                sql_create_func(sa, "log2", "mmath", "log2", FALSE, FALSE, 
SCALE_FIX, 0, *t, 1, *t);
+               sql_create_func(sa, "degrees", "mmath", "degrees", FALSE, 
FALSE, SCALE_FIX, 0, *t, 1, *t);
+               sql_create_func(sa, "radians", "mmath", "radians", FALSE, 
FALSE, SCALE_FIX, 0, *t, 1, *t);
        }
        sql_create_func(sa, "pi", "mmath", "pi", FALSE, FALSE, SCALE_NONE, 0, 
DBL, 0);
 
diff --git a/sql/common/sql_types.h b/sql/common/sql_types.h
--- a/sql/common/sql_types.h
+++ b/sql/common/sql_types.h
@@ -68,4 +68,8 @@ extern int is_sqlfunc(sql_func *f);
 
 extern void types_init(sql_allocator *sa);
 
+/* This function should be used in exceptional cases such as dealing with 
tricky upgrades! */
+extern sql_func *sql_create_func(sql_allocator *sa, const char *name, const 
char *mod, const char *imp, bit semantics, bit side_effect, int fix_scale,
+                                                                unsigned int 
res_scale, sql_type *fres, int nargs, ...);
+
 #endif /* SQL_TYPES_H */
diff --git a/sql/scripts/10_math.sql b/sql/scripts/10_math.sql
deleted file mode 100644
--- a/sql/scripts/10_math.sql
+++ /dev/null
@@ -1,16 +0,0 @@
--- This Source Code Form is subject to the terms of the Mozilla Public
--- License, v. 2.0.  If a copy of the MPL was not distributed with this
--- file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
--- Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V.
-
-CREATE FUNCTION degrees(r double)
-RETURNS double
-       RETURN r*180/pi();
-
-CREATE FUNCTION radians(d double)
-RETURNS double
-       RETURN d*pi()/180;
-
-grant execute on function degrees to public;
-grant execute on function radians to public;
diff --git a/sql/scripts/CMakeLists.txt b/sql/scripts/CMakeLists.txt
--- a/sql/scripts/CMakeLists.txt
+++ b/sql/scripts/CMakeLists.txt
@@ -9,7 +9,6 @@
 #[[
 install(FILES
   09_like.sql
-  10_math.sql
   12_url.sql
   13_date.sql
   14_inet.sql
diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c
--- a/sql/storage/bat/bat_logger.c
+++ b/sql/storage/bat/bat_logger.c
@@ -64,6 +64,8 @@ bl_preversion(int oldversion, int newver
 
 #define N(schema, table, column)       schema "_" table "_" column
 
+#define D(schema, table)       "D_" schema "_" table
+
 #if defined CATALOG_AUG2018 || defined CATALOG_JUN2020
 static int
 find_table_id(logger *lg, const char *val, int *sid)
@@ -862,7 +864,43 @@ bl_postversion(void *lg)
                           "storage", str_nil,
                           NULL) != GDK_SUCCEED)
                        return GDK_FAIL;
+               {       /* move sql.degrees and sql.radians functions from 
10_math.sql script to sql_types list */
+                       BAT *func_func = temp_descriptor(logger_find_bat(lg, 
N("sys", "functions", "name"), 0, 0));
+                       if (func_func == NULL) {
+                               return GDK_FAIL;
+                       }
+                       BAT *degrees_func = BATselect(func_func, NULL, 
"degrees", NULL, 1, 1, 0);
+                       if (degrees_func == NULL) {
+                               bat_destroy(func_func);
+                               return GDK_FAIL;
+                       }
+                       BAT *radians_func = BATselect(func_func, NULL, 
"radians", NULL, 1, 1, 0);
+                       bat_destroy(func_func);
+                       if (radians_func == NULL) {
+                               bat_destroy(degrees_func);
+                               return GDK_FAIL;
+                       }
 
+                       BAT *cands = BATmergecand(degrees_func, radians_func);
+                       bat_destroy(degrees_func);
+                       bat_destroy(radians_func);
+                       if (cands == NULL) {
+                               return GDK_FAIL;
+                       }
+
+                       BAT *sys_funcs = temp_descriptor(logger_find_bat(lg, 
D("sys", "functions"), 0, 0));
+                       if (sys_funcs == NULL) {
+                               bat_destroy(cands);
+                               return GDK_FAIL;
+                       }
+                       gdk_return res = BATappend(sys_funcs, cands, NULL, 
true);
+                       bat_destroy(cands);
+                       bat_destroy(sys_funcs);
+                       if (res != GDK_SUCCEED)
+                               return res;
+                       if ((res = logger_upgrade_bat(lg, D("sys", 
"functions"), LOG_TAB, 0)) != GDK_SUCCEED)
+                               return res;
+               }
                {       /* Fix SQL aggregation functions defined on the wrong 
modules: sql.null, sql.all, sql.zero_or_one and sql.not_unique */
                        BAT *func_mod = temp_descriptor(logger_find_bat(lg, 
N("sys", "functions", "mod"), 0, 0));
                        if (func_mod == NULL)
diff --git a/sql/storage/sql_storage.h b/sql/storage/sql_storage.h
--- a/sql/storage/sql_storage.h
+++ b/sql/storage/sql_storage.h
@@ -503,4 +503,7 @@ extern sql_part *sql_trans_copy_part(sql
 extern void sql_trans_drop_any_comment(sql_trans *tr, sqlid id);
 extern void sql_trans_drop_obj_priv(sql_trans *tr, sqlid obj_id);
 
+/* This function should be used in exceptional cases such as dealing with 
tricky upgrades! */
+extern void insert_functions(sql_trans *tr, sql_table *sysfunc, list 
*funcs_list, sql_table *sysarg);
+
 #endif /*SQL_STORAGE_H */
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -1534,10 +1534,10 @@ insert_args(sql_trans *tr, sql_table *sy
        }
 }
 
-static void
-insert_functions(sql_trans *tr, sql_table *sysfunc, sql_table *sysarg)
-{
-       for (node *n = funcs->h; n; n = n->next) {
+void
+insert_functions(sql_trans *tr, sql_table *sysfunc, list *funcs_list, 
sql_table *sysarg)
+{
+       for (node *n = funcs_list->h; n; n = n->next) {
                sql_func *f = n->data;
                bit se = (f->type == F_AGGR) ? FALSE : f->side_effect;
                int number = 0, ftype = (int) f->type, flang = (int) 
FUNC_LANG_INT;
@@ -1829,7 +1829,7 @@ store_load(backend_stack stk) {
 
        sql_allocator *sa;
        sql_trans *tr;
-       sql_table *t, *types, *funcs, *args;
+       sql_table *t, *types, *functions, *arguments;
        sql_schema *s, *p = NULL;
 
        lng lng_store_oid;
@@ -1893,7 +1893,7 @@ store_load(backend_stack stk) {
        bootstrap_create_column(tr, t, "eclass", "int", 32);
        bootstrap_create_column(tr, t, "schema_id", "int", 32);
 
-       funcs = t = bootstrap_create_table(tr, s, "functions");
+       functions = t = bootstrap_create_table(tr, s, "functions");
        bootstrap_create_column(tr, t, "id", "int", 32);
        bootstrap_create_column(tr, t, "name", "varchar", 256);
        bootstrap_create_column(tr, t, "func", "varchar", 8196);
@@ -1911,7 +1911,7 @@ store_load(backend_stack stk) {
        bootstrap_create_column(tr, t, "system", "boolean", 1);
        bootstrap_create_column(tr, t, "semantics", "boolean", 1);
 
-       args = t = bootstrap_create_table(tr, s, "args");
+       arguments = t = bootstrap_create_table(tr, s, "args");
        bootstrap_create_column(tr, t, "id", "int", 32);
        bootstrap_create_column(tr, t, "func_id", "int", 32);
        bootstrap_create_column(tr, t, "name", "varchar", 256);
@@ -2021,7 +2021,7 @@ store_load(backend_stack stk) {
 
        if (first) {
                insert_types(tr, types);
-               insert_functions(tr, funcs, args);
+               insert_functions(tr, functions, funcs, arguments);
                insert_schemas(tr);
 
                if (sql_trans_commit(tr) != SQL_OK) {
diff --git a/sql/test/emptydb/Tests/check.stable.out 
b/sql/test/emptydb/Tests/check.stable.out
--- a/sql/test/emptydb/Tests/check.stable.out
+++ b/sql/test/emptydb/Tests/check.stable.out
@@ -150,7 +150,6 @@ stdout of test 'check` in directory 'sql
 \dSf sys."db_users"
 \dSf sys."debug"
 \dSf sys."debugflags"
-\dSf sys."degrees"
 \dSf sys."deltas"
 \dSf sys."droporderindex"
 \dSf sys."env"
@@ -225,7 +224,6 @@ stdout of test 'check` in directory 'sql
 \dSf sys."querylog_empty"
 \dSf sys."querylog_enable"
 \dSf sys."queue"
-\dSf sys."radians"
 \dSf sys."rejects"
 \dSf sys."remote_table_credentials"
 \dSf sys."resume"
@@ -1040,7 +1038,6 @@ CREATE FUNCTION db_users () RETURNS TABL
 create function sys.debug(debug int) returns integer external name 
mdb."setDebug";
 create function sys.debug(flag string) returns integer external name 
mdb."setDebug";
 create function sys.debugflags() returns table(flag string, val bool) external 
name mdb."getDebugFlags";
-create function degrees(r double) returns double return r*180/pi();
 create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
 create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
 create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
@@ -1173,7 +1170,6 @@ create procedure sys.querylog_empty() ex
 create procedure sys.querylog_enable() external name sql.querylog_enable;
 create procedure sys.querylog_enable(threshold integer) external name 
sql.querylog_enable;
 create function sys.queue() returns table("tag" bigint, "sessionid" int, 
"username" string, "started" timestamp, "status" string, "query" string, 
"finished" timestamp, "workers" int, "memory" int) external name sysmon.queue;
-create function radians(d double) returns double return d*pi()/180;
 create function sys.rejects() returns table(rowid bigint, fldid int, "message" 
string, "input" string) external name sql.copy_rejects;
 create function sys.remote_table_credentials (tablename string) returns table 
("uri" string, "username" string, "hash" string) external name 
sql.rt_credentials;
 create procedure sys.resume(tag bigint) external name sysmon.resume;
@@ -2455,7 +2451,8 @@ drop function pcre_replace(string, strin
 [ "sys.functions",     "sys",  "decade",       "SYSTEM",       "decade",       
"mtime",        "Internal C",   "Scalar function",      false,  false,  false,  
false,  "res_0",        "int",  32,     0,      "out",  "arg_1",        "date", 
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,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
 [ "sys.functions",     "sys",  "decade",       "SYSTEM",       "decade",       
"mtime",        "Internal C",   "Scalar function",      false,  false,  false,  
false,  "res_0",        "int",  32,     0,      "out",  "arg_1",        
"timestamp",    7,      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    ]
 [ "sys.functions",     "sys",  "decade",       "SYSTEM",       "decade",       
"mtime",        "Internal C",   "Scalar function",      false,  false,  false,  
false,  "res_0",        "int",  32,     0,      "out",  "arg_1",        
"timestamptz",  7,      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    ]
-[ "sys.functions",     "sys",  "degrees",      "SYSTEM",       "create 
function degrees(r double) returns double return r*180/pi();",  "user", "SQL",  
"Scalar function",      false,  false,  false,  true,   "result",       
"double",       53,     0,      "out",  "r",    "double",       53,     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    ]
+[ "sys.functions",     "sys",  "degrees",      "SYSTEM",       "degrees",      
"mmath",        "Internal C",   "Scalar function",      false,  false,  false,  
false,  "res_0",        "double",       53,     0,      "out",  "arg_1",        
"double",       53,     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    ]
+[ "sys.functions",     "sys",  "degrees",      "SYSTEM",       "degrees",      
"mmath",        "Internal C",   "Scalar function",      false,  false,  false,  
false,  "res_0",        "real", 24,     0,      "out",  "arg_1",        "real", 
24,     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    ]
 [ "sys.functions",     "sys",  "deltas",       "SYSTEM",       "create 
function sys.deltas (\"schema\" string) returns table (\"id\" int, \"cleared\" 
boolean, \"immutable\" bigint, \"inserted\" bigint, \"updates\" bigint, 
\"deletes\" bigint, \"level\" int) external name \"sql\".\"deltas\";",   "sql", 
 "MAL",  "Function returning a table",   false,  false,  false,  true,   "id",  
 "int",  32,     0,      "out",  "cleared",      "boolean",      1,      0,     
 "out",  "immutable",    "bigint",       64,     0,      "out",  "inserted",    
 "bigint",       64,     0,      "out",  "updates",      "bigint",       64,    
 0,      "out",  "deletes",      "bigint",       64,     0,      "out",  
"level",        "int",  32,     0,      "out",  "schema",       "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    ]
 [ "sys.functions",     "sys",  "deltas",       "SYSTEM",       "create 
function sys.deltas (\"schema\" string, \"table\" string) returns table (\"id\" 
int, \"cleared\" boolean, \"immutable\" bigint, \"inserted\" bigint, 
\"updates\" bigint, \"deletes\" bigint, \"level\" int) external name 
\"sql\".\"deltas\";", "sql",  "MAL",  "Function returning a table",   false,  
false,  false,  true,   "id",   "int",  32,     0,      "out",  "cleared",      
"boolean",      1,      0,      "out",  "immutable",    "bigint",       64,     
0,      "out",  "inserted",     "bigint",       64,     0,      "out",  
"updates",      "bigint",       64,     0,      "out",  "deletes",      
"bigint",       64,     0,      "out",  "level",        "int",  32,     0,      
"out",  "schema",       "clob", 0,      0,      "in",   "table",        "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    ]
 [ "sys.functions",     "sys",  "deltas",       "SYSTEM",       "create 
function sys.deltas (\"schema\" string, \"table\" string, \"column\" string) 
returns table (\"id\" int, \"cleared\" boolean, \"immutable\" bigint, 
\"inserted\" bigint, \"updates\" bigint, \"deletes\" bigint, \"level\" int) 
external name \"sql\".\"deltas\";",      "sql",  "MAL",  "Function returning a 
table",   false,  false,  false,  true,   "id",   "int",  32,     0,      
"out",  "cleared",      "boolean",      1,      0,      "out",  "immutable",    
"bigint",       64,     0,      "out",  "inserted",     "bigint",       64,     
0,      "out",  "updates",      "bigint",       64,     0,      "out",  
"deletes",      "bigint",       64,     0,      "out",  "level",        "int",  
32,     0,      "out",  "schema",       "clob", 0,      0,      "in",   
"table",        "clob", 0,      0,      "in",   "column",       "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    ]
@@ -2824,7 +2821,8 @@ drop function pcre_replace(string, strin
 [ "sys.functions",     "sys",  "querylog_enable",      "SYSTEM",       "create 
procedure sys.querylog_enable() external name sql.querylog_enable;",    "sql",  
"MAL",  "Procedure",    true,   false,  false,  true,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys.functions",     "sys",  "querylog_enable",      "SYSTEM",       "create 
procedure sys.querylog_enable(threshold integer) external name 
sql.querylog_enable;",   "sql",  "MAL",  "Procedure",    true,   false,  false, 
 true,   "threshold",    "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    ]
 [ "sys.functions",     "sys",  "queue",        "SYSTEM",       "create 
function sys.queue() returns table(\"tag\" bigint, \"sessionid\" int, 
\"username\" string, \"started\" timestamp, \"status\" string, \"query\" 
string, \"finished\" timestamp, \"workers\" int, \"memory\" int) external name 
sysmon.queue;",   "sysmon",       "MAL",  "Function returning a table",   true, 
  false,  false,  true,   "tag",  "bigint",       64,     0,      "out",  
"sessionid",    "int",  32,     0,      "out",  "username",     "clob", 0,      
0,      "out",  "started",      "timestamp",    7,      0,      "out",  
"status",       "clob", 0,      0,      "out",  "query",        "clob", 0,      
0,      "out",  "finished",     "timestamp",    7,      0,      "out",  
"workers",      "int",  32,     0,      "out",  "memory",       "int",  32,     
0,      "out",  NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
-[ "sys.functions",     "sys",  "radians",      "SYSTEM",       "create 
function radians(d double) returns double return d*pi()/180;",  "user", "SQL",  
"Scalar function",      false,  false,  false,  true,   "result",       
"double",       53,     0,      "out",  "d",    "double",       53,     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    ]
+[ "sys.functions",     "sys",  "radians",      "SYSTEM",       "radians",      
"mmath",        "Internal C",   "Scalar function",      false,  false,  false,  
false,  "res_0",        "double",       53,     0,      "out",  "arg_1",        
"double",       53,     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    ]
+[ "sys.functions",     "sys",  "radians",      "SYSTEM",       "radians",      
"mmath",        "Internal C",   "Scalar function",      false,  false,  false,  
false,  "res_0",        "real", 24,     0,      "out",  "arg_1",        "real", 
24,     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    ]
 [ "sys.functions",     "sys",  "rand", "SYSTEM",       "rand", "mmath",        
"Internal C",   "Scalar function",      true,   false,  false,  true,   
"res_0",        "int",  32,     0,      "out",  NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys.functions",     "sys",  "rand", "SYSTEM",       "sqlrand",      
"mmath",        "Internal C",   "Scalar function",      true,   false,  false,  
true,   "res_0",        "int",  32,     0,      "out",  "arg_1",        "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    ]
 [ "sys.functions",     "sys",  "rank", "SYSTEM",       "rank", "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  true,   
"res_0",        "int",  32,     0,      "out",  "arg_1",        "any",  0,      
0,      "in",   "arg_2",        "boolean",      1,      0,      "in",   
"arg_3",        "boolean",      1,      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    ]
@@ -4974,7 +4972,6 @@ drop function pcre_replace(string, strin
 [ "grant on function", "date_to_str",  "public",       "EXECUTE",      
"monetdb",      0       ]
 [ "grant on function", "date_trunc",   "public",       "EXECUTE",      
"monetdb",      0       ]
 [ "grant on function", "date_trunc",   "public",       "EXECUTE",      
"monetdb",      0       ]
-[ "grant on function", "degrees",      "public",       "EXECUTE",      
"monetdb",      0       ]
 [ "grant on function", "env",  "public",       "EXECUTE",      NULL,   0       
]
 [ "grant on function", "epoch",        "public",       "EXECUTE",      
"monetdb",      0       ]
 [ "grant on function", "epoch",        "public",       "EXECUTE",      
"monetdb",      0       ]
@@ -5080,7 +5077,6 @@ drop function pcre_replace(string, strin
 [ "grant on function", "quantile_avg", "public",       "EXECUTE",      
"monetdb",      0       ]
 [ "grant on function", "quantile_avg", "public",       "EXECUTE",      
"monetdb",      0       ]
 [ "grant on function", "queue",        "public",       "EXECUTE",      
"monetdb",      0       ]
-[ "grant on function", "radians",      "public",       "EXECUTE",      
"monetdb",      0       ]
 [ "grant on function", "rejects",      "public",       "EXECUTE",      
"monetdb",      0       ]
 [ "grant on function", "resume",       "public",       "EXECUTE",      
"monetdb",      0       ]
 [ "grant on function", "right_shift",  "public",       "EXECUTE",      
"monetdb",      0       ]
diff --git a/sql/test/emptydb/Tests/check.stable.out.32bit 
b/sql/test/emptydb/Tests/check.stable.out.32bit
--- a/sql/test/emptydb/Tests/check.stable.out.32bit
+++ b/sql/test/emptydb/Tests/check.stable.out.32bit
@@ -150,7 +150,6 @@ stdout of test 'check` in directory 'sql
 \dSf sys."db_users"
 \dSf sys."debug"
 \dSf sys."debugflags"
-\dSf sys."degrees"
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to