Changeset: f810b91c8eb5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f810b91c8eb5 Modified Files: ChangeLog gdk/gdk.h gdk/gdk_bbp.c gdk/gdk_storage.c Branch: default Log Message:
Merge with Oct2020 branch. diffs (truncated from 1911 to 300 lines): diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,19 +1,3 @@ # ChangeLog file for devel # This file is updated with Maddlog -* Mon Aug 10 2020 Ying Zhang <y.zh...@cwi.nl> -- Finished a first version of the new monitoring function - user_statistics(), which is only intended for the DBAs. - For each database user who has logged in during the current mserver5 - session, it returns - "username": login name of the database user, - "querycount": the number of queries this user has executed since his/her - first login, - "totalticks": the total execution time (in microsecond) of the queries ran - by this user, - "maxquery": the query with the longest execution time (if two queries have - the same execution time, the newer overwrites the older), - "maxticks": the execution time of the 'maxquery' (in microsecond), - "started": the start timestamp of the 'maxquery', - "finished": the finish timestamp of the 'maxquery'. - diff --git a/ChangeLog.Oct2020 b/ChangeLog.Oct2020 --- a/ChangeLog.Oct2020 +++ b/ChangeLog.Oct2020 @@ -1,6 +1,22 @@ # ChangeLog file for devel # This file is updated with Maddlog +* Mon Aug 10 2020 Ying Zhang <y.zh...@cwi.nl> +- Finished a first version of the new monitoring function + user_statistics(), which is only intended for the DBAs. + For each database user who has logged in during the current mserver5 + session, it returns + "username": login name of the database user, + "querycount": the number of queries this user has executed since his/her + first login, + "totalticks": the total execution time (in microsecond) of the queries ran + by this user, + "maxquery": the query with the longest execution time (if two queries have + the same execution time, the newer overwrites the older), + "maxticks": the execution time of the 'maxquery' (in microsecond), + "started": the start timestamp of the 'maxquery', + "finished": the finish timestamp of the 'maxquery'. + * Wed Jun 10 2020 Sjoerd Mullender <sjo...@acm.org> - Removed support for LiDAR data, that is the SQL procedures sys.lidarattach, sys.lidarload, and sys.lidarexport. diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c --- a/clients/mapiclient/mhelp.c +++ b/clients/mapiclient/mhelp.c @@ -57,9 +57,9 @@ SQLhelp sqlhelp1[] = { "See also https://www.monetdb.org/Documentation/SQLreference/Alter"}, {"ALTER SEQUENCE", "", - "ALTER SEQUENCE qname [ AS int_datatype] [ RESTART [WITH intval]] [INCREMENT BY intval]\n" + "ALTER SEQUENCE qname [ AS seq_int_datatype] [ RESTART [WITH intval]] [INCREMENT BY intval]\n" "[MINVALUE intval | NO MINVALUE] [MAXVALUE intval | NO MAXVALUE] [CACHE intval] [[NO] CYCLE]", - "int_datatype,intval", + "seq_int_datatype,intval", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/SerialTypes"}, {"ALTER TABLE", "", @@ -126,36 +126,36 @@ SQLhelp sqlhelp1[] = { "qname,scalar_expression", NULL}, {"CREATE AGGREGATE", - "Create an user-defined aggregate function. The body of the aggregate function\n" + "Create a user-defined aggregate function. The body of the aggregate function\n" "can also be defined in other programming languages such as Python, R, C or CPP.", "CREATE [ OR REPLACE ] AGGREGATE [ FUNCTION ] qname '(' { '*' | [ param [',' ...]] } ')'\n" - " RETURNS data_type\n" + " RETURNS function_return_data_type\n" " EXTERNAL NAME ident ',' ident\n" "CREATE [ OR REPLACE ] AGGREGATE [ FUNCTION ] qname '(' { '*' | [ param [',' ...]] } ')'\n" - " RETURNS data_type\n" + " RETURNS function_return_data_type\n" " LANGUAGE language_keyword external_code", - "qname,param,data_type,ident,language_keyword,external_code", + "qname,param,function_return_data_type,ident,language_keyword,external_code", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/Functions"}, {"CREATE FILTER FUNCTION", - "", + "Create a user-defined filter function. Currently only MAL definitions\n" "CREATE [ OR REPLACE ] FILTER [ FUNCTION ] qname '(' { '*' | [ param [',' ...]] } ')'\n" - " RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n" + " RETURNS function_return_data_type\n" " EXTERNAL NAME ident ',' ident", - "qname,param,data_type,function_return,ident", + "qname,param,function_return_data_type,ident", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/Functions"}, {"CREATE FUNCTION", - "Create an user-defined function. Besides standard SQL the body of the function\n" - "can also be defined in other programming languages such as Python, R, C or CPP.", + "Create a user-defined function (UDF). The body of the function can be defined in\n" + " PL/SQL or programming languages such as Python, R, C or CPP when embedded on the server.", "CREATE [ OR REPLACE ] FUNCTION qname '(' { '*' | [ param [',' ...]] } ')'\n" - " RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n" + " RETURNS function_return_data_type\n" " BEGIN [ ATOMIC ] statement [ ';' ...] END\n" "CREATE [ OR REPLACE ] FUNCTION qname '(' { '*' | [ param [',' ...]] } ')'\n" - " RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n" + " RETURNS function_return_data_type\n" " EXTERNAL NAME ident ',' ident\n" "CREATE [ OR REPLACE ] FUNCTION qname '(' { '*' | [ param [',' ...]] } ')'\n" - " RETURNS { data_type | TABLE '(' function_return [',' ...] ')' }\n" + " RETURNS function_return_data_type\n" " LANGUAGE language_keyword external_code", - "qname,param,data_type,function_return,statement,ident,language_keyword,external_code", + "qname,param,function_return_data_type,statement,ident,language_keyword,external_code", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/Functions"}, {"CREATE INDEX", "Create a hint for a secondary index on a column or set of columns of a table", @@ -174,7 +174,7 @@ SQLhelp sqlhelp1[] = { "table_source,partition_by", "See also https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/DataPartitioning"}, {"CREATE PROCEDURE", - "Create an user-defined procedure", + "Create a user-defined procedure", "CREATE [ OR REPLACE ] PROCEDURE qname '(' { '*' | [ param [',' ...]] } ')'\n" " BEGIN [ ATOMIC ] procedure_statement [ ';' ...] END\n" "CREATE [ OR REPLACE ] PROCEDURE qname '(' { '*' | [ param [',' ...]] } ')'\n" @@ -204,9 +204,9 @@ SQLhelp sqlhelp1[] = { "See also https://www.monetdb.org/Documentation/SQLreference/Schema"}, {"CREATE SEQUENCE", "Define a new integer number sequence generator", - "CREATE SEQUENCE qname [ AS int_datatype] [ START [WITH intval]] [INCREMENT BY intval]\n" + "CREATE SEQUENCE qname [ AS seq_int_datatype] [ START [WITH intval]] [INCREMENT BY intval]\n" "[MINVALUE intval | NO MINVALUE] [MAXVALUE intval | NO MAXVALUE] [CACHE intval] [[NO] CYCLE]", - "int_datatype,intval", + "seq_int_datatype,intval", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/SerialTypes"}, {"CREATE STREAM TABLE", "Temporary table, locked during updates/ continues query processing", @@ -244,12 +244,12 @@ SQLhelp sqlhelp1[] = { "qname,column_list,query_expression", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/Views"}, {"CREATE WINDOW", - "Create an user-defined window function. Currently only MAL definitions\n" + "Create a user-defined window function. Currently only MAL definitions\n" "are supported.", - "CREATE [ OR REPLACE ] WINDOW qname '(' { '*' | [ param [',' ...]] } ')'\n" - " RETURNS data_type\n" + "CREATE [ OR REPLACE ] WINDOW [ FUNCTION ] qname '(' { '*' | [ param [',' ...]] } ')'\n" + " RETURNS function_return_data_type\n" " EXTERNAL NAME ident ',' ident", - "qname,param,data_type,function_return,ident", + "qname,param,function_return_data_type,ident", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/Functions"}, {"CURRENT_DATE", "Pseudo column or function to get the current date", @@ -381,7 +381,7 @@ SQLhelp sqlhelp1[] = { "DROP VIEW [ IF EXISTS ] qname [ RESTRICT | CASCADE ]", NULL, NULL}, - {"DROP WINDOW [ FUNCTION ]", + {"DROP WINDOW", "", "DROP ALL WINDOW [ FUNCTION ] qname [ RESTRICT | CASCADE ]\n" "DROP WINDOW [ FUNCTION ] [ IF EXISTS ] qname [ '(' [ param [',' ...]] ')' ] [ RESTRICT | CASCADE ]", @@ -484,9 +484,9 @@ SQLhelp sqlhelp1[] = { "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/Variables"}, {"SET LOCAL TRANSACTION", "", - "START LOCAL TRANSACTION transactionmode", - "transactionmode,isolevel", - "DIAGNOSTICS is not yet supported"}, + "SET LOCAL TRANSACTION [ transactionmode ]", + "transactionmode", + "See also https://www.monetdb.org/Documentation/SQLreference/SQLSyntaxOverview#SET_LOCAL_TRANSACTION"}, {"SET ROLE", "Change current role", "SET ROLE ident", @@ -514,9 +514,9 @@ SQLhelp sqlhelp1[] = { NULL}, {"SET TRANSACTION", "", - "SET TRANSACTION transactionmode", - "transactionmode,isolevel", - "DIAGNOSTICS is not yet supported"}, + "SET TRANSACTION [ transactionmode ]", + "transactionmode", + "See also https://www.monetdb.org/Documentation/SQLreference/SQLSyntaxOverview#SET_TRANSACTION"}, {"SET USER", "Change current user", "SET USER '=' ident", @@ -525,7 +525,7 @@ SQLhelp sqlhelp1[] = { {"START TRANSACTION", "Change transaction mode from auto-commit to user controlled commit/rollback", "{ START | BEGIN } TRANSACTION transactionmode", - "transactionmode,isolevel", + "transactionmode", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/Transactions"}, {"TABLE JOINS", "", @@ -650,14 +650,14 @@ SQLhelp sqlhelp2[] = { "SECOND timestamp_precision\n,timestamp_precision", NULL, NULL}, - {"function_return", + {"function_return_data_type", NULL, - "ident data_type", + "data_type | TABLE '(' ident data_type [',' ...] ')'", NULL, NULL}, {"function_type", NULL, - "{ FUNCTION | PROCEDURE | { AGGREGATE | FILTER | LOADER | WINDOW [ FUNCTION ] } }", + "{ FUNCTION | PROCEDURE | { { AGGREGATE | FILTER | LOADER | WINDOW } [ FUNCTION ] } }", NULL, NULL}, {"generated_column", @@ -705,7 +705,7 @@ SQLhelp sqlhelp2[] = { "[ ELSE procedure_statement ... ] END IF", "search_condition,procedure_statement", "See also https://www.monetdb.org/Documentation/SQLreference/Flowofcontrol"}, - {"int_datatype", + {"seq_int_datatype", NULL, "BIGINT | INTEGER | INT | SMALLINT | TINYINT", NULL, @@ -780,7 +780,7 @@ SQLhelp sqlhelp2[] = { NULL}, {"partition_list", NULL, - "query_expression [ ',' ... ]", + "query_expression [',' ...]", "query_expression", NULL}, {"partition_range_from", @@ -931,7 +931,7 @@ SQLhelp sqlhelp2[] = { NULL, "{ READ ONLY | READ WRITE | ISOLATION LEVEL isolevel | DIAGNOSTICS intval } [ , ... ]", "isolevel", - NULL}, + "Note: DIAGNOSTICS is not yet implemented"}, {"trigger_reference", NULL, "{ OLD | NEW } { [ROW] | TABLE } [AS] ident", @@ -997,8 +997,8 @@ SQLhelp sqlhelp2[] = { {"window_specification", NULL, "[ ident ]\n" - "[ PARTITION BY expression [ ',' ... ] ]\n" - "[ ORDER BY expression [ ASC | DESC ] [ NULLS { FIRST | LAST } ] [ ',' ... ] ]\n" + "[ PARTITION BY expression [',' ...] ]\n" + "[ ORDER BY expression [ ASC | DESC ] [ NULLS { FIRST | LAST } ] [',' ...] ]\n" "[ { ROWS | RANGE | GROUPS } { window_frame_start | BETWEEN window_bound AND window_bound }\n" " [ EXCLUDING { CURRENT ROW | GROUP | TIES | NO OTHERS } ] ]", "window_bound,window_frame_start", diff --git a/documentation/source/manual_pages/mserver5.rst.in b/documentation/source/manual_pages/mserver5.rst.in --- a/documentation/source/manual_pages/mserver5.rst.in +++ b/documentation/source/manual_pages/mserver5.rst.in @@ -34,11 +34,10 @@ OPERATION ========= When the build-time configuration did not disable this, a *mserver5* -process presents the user with a console prompt. On this prompt, MAL -commands can be executed. The architecture is setup to handle multiple -streams of requests. The first thread started represents the server, -which is the console prompt, reading from standard input and writing to -standard output. +process presents the user with server startup information and internal +exceptions due to errors in commands sent by clients. The architecture +is setup to handle multiple streams of requests. The first thread +started represents the server, which only writes to standard output. The server thread started remains in existence until all other threads die. The server is stopped by sending it a termination signal (SIGINT, diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -1070,6 +1070,9 @@ gdk_export restrict_t BATgetaccess(BAT * (b)->batDirtydesc || \ (b)->theap.dirty || \ ((b)->tvheap != NULL && (b)->tvheap->dirty)) +#define BATdirtydata(b) (!(b)->batCopiedtodisk || \ + (b)->theap.dirty || \ + ((b)->tvheap != NULL && (b)->tvheap->dirty)) #define BATcapacity(b) (b)->batCapacity /* @@ -1191,8 +1194,9 @@ static inline void BATsettrivprop(BAT *b) { assert(!is_oid_nil(b->hseqbase)); - b->batDirtydesc = true; /* likely already set */ assert(is_oid_nil(b->tseqbase) || ATOMtype(b->ttype) == TYPE_oid); + if (!b->batDirtydesc) + return; if (b->ttype == TYPE_void) { if (is_oid_nil(b->tseqbase)) { b->tnonil = b->batCount == 0; diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c --- a/gdk/gdk_align.c +++ b/gdk/gdk_align.c @@ -435,6 +435,7 @@ VIEWdestroy(BAT *b) HASHdestroy(b); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list