Changeset: 9012a3c451b8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9012a3c451b8 Added Files: sql/jdbc/tests/Tests/Bug_PrepStmt_With_Errors_Jira292.SQL.bat sql/jdbc/tests/Tests/Bug_PrepStmt_With_Errors_Jira292.SQL.sh sql/jdbc/tests/Tests/Bug_PrepStmt_With_Errors_Jira292.stable.err sql/jdbc/tests/Tests/Bug_PrepStmt_With_Errors_Jira292.stable.out sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.sql sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.err sql/test/BugTracker-2019/Tests/count-distinct.Bug-6790.stable.out sql/test/BugTracker-2019/Tests/grant-select-column.Bug-6765.stable.err sql/test/BugTracker-2019/Tests/jsonpath-validity.Bug-6792.sql sql/test/BugTracker-2019/Tests/jsonpath-validity.Bug-6792.stable.err sql/test/BugTracker-2019/Tests/jsonpath-validity.Bug-6792.stable.out sql/test/BugTracker-2019/Tests/prepared-select-with-error-causes-hang.Jira-292.sql sql/test/BugTracker-2019/Tests/prepared-select-with-error-causes-hang.Jira-292.stable.err sql/test/BugTracker-2019/Tests/prepared-select-with-error-causes-hang.Jira-292.stable.out sql/test/BugTracker-2019/Tests/str_to_time.Bug-6791.sql sql/test/BugTracker-2019/Tests/str_to_time.Bug-6791.stable.err sql/test/BugTracker-2019/Tests/str_to_time.Bug-6791.stable.out sql/test/analytics/Tests/analytics10.sql sql/test/analytics/Tests/analytics10.stable.err sql/test/analytics/Tests/analytics10.stable.out sql/test/analytics/Tests/analytics11.sql sql/test/analytics/Tests/analytics11.stable.err sql/test/analytics/Tests/analytics11.stable.out sql/test/analytics/Tests/analytics12.sql sql/test/analytics/Tests/analytics12.stable.err sql/test/analytics/Tests/analytics12.stable.out sql/test/analytics/Tests/analytics13.sql sql/test/analytics/Tests/analytics13.stable.err sql/test/analytics/Tests/analytics13.stable.out sql/test/mapi/Tests/utf8test.stable.out.Windows sql/test/scanner/Tests/All sql/test/scanner/Tests/raw_strings.sql sql/test/scanner/Tests/raw_strings.stable.err sql/test/scanner/Tests/raw_strings.stable.out Modified Files: .hgtags ChangeLog MonetDB.spec NT/monetdb_config.h.in NT/rules.msc buildtools/conf/Maddlog buildtools/selinux/monetdb.te clients/Tests/exports.stable.out clients/mapiclient/eventparser.c clients/mapiclient/mhelp.c clients/mapilib/mapi.rc clients/odbc/driver/ODBCConvert.c clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc configure.ag debian/changelog gdk/gdk_analytic.h gdk/gdk_analytic_func.c gdk/gdk_heap.c gdk/gdk_join.c gdk/gdk_storage.c gdk/gdk_utils.c gdk/libbat.rc libversions monetdb5/modules/atoms/json.c monetdb5/modules/atoms/mtime.c monetdb5/modules/kernel/algebra.c monetdb5/modules/mal/clients.c monetdb5/modules/mal/wlc.c monetdb5/optimizer/opt_mitosis.c monetdb5/optimizer/opt_postfix.c monetdb5/tools/libmonetdb5.rc rpm.mk.in sql/ChangeLog sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.c sql/backends/monet5/sql.h sql/backends/monet5/sql_cat.c sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_rank.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_upgrades.c sql/backends/monet5/wlr.c sql/benchmarks/tpch/11.sql sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out sql/benchmarks/tpch/LOCKED/Tests/01-22.stable.out.int128 sql/benchmarks/tpch/LOCKED/Tests/11.stable.out sql/benchmarks/tpch/LOCKED/Tests/11.stable.out.int128 sql/benchmarks/tpch/Tests/01-22.stable.out sql/benchmarks/tpch/Tests/01-22.stable.out.int128 sql/benchmarks/tpch/Tests/11.stable.out sql/benchmarks/tpch/Tests/11.stable.out.int128 sql/benchmarks/tpch/all.sql sql/benchmarks/tpch/queries.sql sql/common/sql_list.c sql/common/sql_types.c sql/common/sql_types.h sql/include/sql_list.h sql/include/sql_relation.h sql/jdbc/tests/Tests/All sql/scripts/25_debug.sql sql/scripts/51_sys_schema_extension.sql sql/server/Makefile.ag sql/server/rel_exp.c sql/server/rel_optimizer.c sql/server/rel_prop.c sql/server/rel_prop.h sql/server/rel_rel.c sql/server/rel_rel.h sql/server/rel_select.c sql/server/rel_unnest.c sql/server/rel_updates.c sql/server/sql_atom.c sql/server/sql_atom.h sql/server/sql_mvc.c sql/server/sql_mvc.h sql/server/sql_parser.y sql/server/sql_partition.c sql/server/sql_scan.c sql/server/sql_semantic.c sql/server/sql_tokens.h sql/storage/bat/bat_storage.c sql/storage/store.c sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.stable.out sql/test/BugTracker-2014/Tests/aggregates-intervals.Bug-3533.stable.out sql/test/BugTracker-2015/Tests/crash.Bug-3736.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-having-not-null-not-in.Bug-6557.stable.out sql/test/BugTracker-2019/Tests/All sql/test/BugTracker-2019/Tests/grant-select-column.Bug-6765.stable.out sql/test/BugTracker-2019/Tests/prepare-types.Bug-6724.stable.out sql/test/Tests/hot-snapshot.py sql/test/Users/Tests/columnRights.stable.err sql/test/Users/Tests/columnRights.stable.out sql/test/analytics/Tests/All sql/test/analytics/Tests/analytics01.sql sql/test/analytics/Tests/analytics01.stable.err sql/test/analytics/Tests/analytics01.stable.out sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 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/mapi/Tests/utf8test.SQL.py sql/test/mergetables/Tests/sqlsmith-exists.sql sql/test/subquery/Tests/subquery2.sql sql/test/subquery/Tests/subquery2.stable.out sql/test/subquery/Tests/subquery3.sql sql/test/subquery/Tests/subquery3.stable.out sql/test/sys-schema/Tests/check_AlternateKey_uniqueness.stable.out sql/test/sys-schema/Tests/check_MaxStrLength_violations.stable.out sql/test/sys-schema/Tests/check_Not_Nullable_columns.stable.out sql/test/sys-schema/Tests/check_PrimaryKey_uniqueness.stable.out sql/test/sys-schema/Tests/geom_tables_checks.stable.out sql/test/sys-schema/Tests/netcdf_tables_checks.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out sql/test/sys-schema/Tests/systemfunctions.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 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 tools/merovingian/daemon/client.c tools/mserver/mserver5.c vertoo.data Branch: gdk_tracer Log Message:
Merge with default diffs (truncated from 143904 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -739,3 +739,6 @@ 6566d90185b83ed95129db9ea68baf52f2de5cc7 d4c1a8c3cbcd965169f1836eaa635101436db81c Nov2019_root 90486f8f87ff0602f3ab143c629ba0aed2153d64 Nov2019_1 90486f8f87ff0602f3ab143c629ba0aed2153d64 Nov2019_release +13efc12c95a279d41dbc4440369defc1d7c21d0f Nov2019_3 +90486f8f87ff0602f3ab143c629ba0aed2153d64 Nov2019_release +13efc12c95a279d41dbc4440369defc1d7c21d0f Nov2019_release diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog file for devel # This file is updated with Maddlog +* Fri Nov 29 2019 Panagiotis Koutsourakis <kutsu...@monetdbsolutions.com> +- Added support for raw strings using the syntax r'' or R''. This means + that C-like escapes will remain uninterpreted within those strings. For + instance SELECT r'\"' returns a string of length two. The user needs + to escape single quotes by doubling them: SELECT r''''. + * Fri Oct 25 2019 Joeri van Ruth <joeri.van.r...@monetdbsolutions.com> - Added SQL function sys.hot_snapshot() which can be used to write a snapshot of the database to a tar file. For example, diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -1059,6 +1059,11 @@ fi %postun -p /sbin/ldconfig %changelog +* Mon Nov 25 2019 Sjoerd Mullender <sjo...@acm.org> - 11.35.3-20191125 +- Rebuilt. +- BZ#3533: SQL aggregate functions avg(), sum() and median() return an + error when used on a column with datatype interval second + * Mon Nov 18 2019 Sjoerd Mullender <sjo...@acm.org> - 11.35.1-20191118 - Rebuilt. - BZ#6134: Query produces error: HEAPalloc: Insufficient space for HEAP diff --git a/buildtools/conf/Maddlog b/buildtools/conf/Maddlog --- a/buildtools/conf/Maddlog +++ b/buildtools/conf/Maddlog @@ -56,13 +56,70 @@ while [ $# -gt 0 ]; do esac done -if ! hg root >& /dev/null ; then - echo "Cannot use this script outside a Mercurial repository" >&2 - exit -1 + +vcs_flavor() { + if hg root >& /dev/null ; then + vcs_kind="hg" + root_dir=$(hg root) + elif git rev-parse --show-toplevel >& /dev/null ; then + vcs_kind="git" + root_dir=$(git rev-parse --show-toplevel) + else + echo "Cannot use this script outside a Mercurial or git repository" >&2 + exit 1 + fi +} + +vcs_current_branch() { + if [[ "$vcs_kind" == "hg" ]] ; then + tag=$(hg branch) + else + if [[ ! -d "$root_dir/.git" ]] ; then + echo "Cannot use this script in a git worktree" >&2 + exit 2 + fi + tag=$(git rev-parse --abbrev-ref HEAD) + tag=${tag#branches/} + if [[ "$tag" == "master" ]] ; then + tag="default" + fi + fi +} + +vcs_identity() { + if [[ "$vcs_kind" == "hg" ]] ; then + IDENTITY=$(hg showconfig ui.username) + else + name=$(git config user.name) + email=$(git config user.email) + IDENTITY="$name <$email>" + fi +} + +check_case_sensitive_filesystem() { + tmpdir=$(mktemp -d) + pushd "$tmpdir" >& /dev/null + touch caseTest + touch casetest + nfiles=$(ls -1 | wc -l) + + popd >& /dev/null + rm -rf "$tmpdir" + + if [[ $nfiles -eq 1 ]] ; then + echo "You are using git in a case insensitive filesystem. I refuse to work like this!" >&2 + exit 3 + fi +} + +vcs_flavor +vcs_current_branch +vcs_identity + +if [[ "$vcs_kind" == "git" ]] ; then + check_case_sensitive_filesystem fi -tag=$(hg branch) - case "$CL" in '') d=. @@ -200,14 +257,14 @@ fi > $file mv $file "$CL" -hg add "$CL" >& /dev/null +"$vcs_kind" add "$CL" >& /dev/null if [ ! "$nocommit" ]; then - hg commit -m "${msg// + ${vcs_kind} commit -m "${msg// / }" "$CL" else - hg diff "$CL" + ${vcs_kind} diff "$CL" echo "Don't forget to COMMIT." fi echo "Don't forget to PUSH." diff --git a/buildtools/selinux/monetdb.te b/buildtools/selinux/monetdb.te --- a/buildtools/selinux/monetdb.te +++ b/buildtools/selinux/monetdb.te @@ -1,4 +1,4 @@ -policy_module(monetdb, 0.6) +policy_module(monetdb, 0.7) # The above line declares that this file is a SELinux policy file. Its # name is monetdb, so the file should be saved as monetdb.te @@ -8,8 +8,10 @@ require { type tmp_t; type var_t; type user_home_t; + type user_home_dir_t; type unconfined_service_t; # for EPEL 7 type proc_t; # for EPEL 7 + type cgroup_t; class dir { read }; class fd { use }; class fifo_file { getattr read write }; @@ -125,6 +127,7 @@ allow mserver5_t self:unix_stream_socket allow mserver5_t self:netlink_selinux_socket create_socket_perms; manage_dirs_pattern(mserver5_t, tmp_t, tmp_t) manage_sock_files_pattern(mserver5_t, tmp_t, tmp_t) +allow mserver5_t tmp_t:file create; manage_sock_files_pattern(mserver5_t, mserver5_db_t, mserver5_db_t) allow mserver5_t monetdbd_t:fifo_file { read write getattr }; allow mserver5_t monetdbd_t:unix_stream_socket { read write getopt shutdown }; @@ -132,10 +135,13 @@ allow mserver5_t var_t:dir { read }; # we want to be able to read some cgroup files fs_search_cgroup_dirs(mserver5_t); fs_read_cgroup_files(mserver5_t); +allow mserver5_t cgroup_t:dir search; +allow mserver5_t self:process execmem; allow monetdbd_t var_t:dir { read }; gen_tunable(mserver5_can_read_home, false) tunable_policy(`mserver5_can_read_home', ` userdom_search_user_home_dirs(mserver5_t) allow mserver5_t user_home_t:file read_file_perms; + allow mserver5_t user_home_dir_t:dir search; ') allow monetdbd_t mserver5_t:unix_stream_socket { connectto }; diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -223,7 +223,7 @@ gdk_return GDKanalyticallead(BAT *r, BAT gdk_return GDKanalyticalmax(BAT *r, BAT *b, BAT *s, BAT *e, int tpe); gdk_return GDKanalyticalmin(BAT *r, BAT *b, BAT *s, BAT *e, int tpe); gdk_return GDKanalyticalnthvalue(BAT *r, BAT *b, BAT *s, BAT *e, BAT *l, const void *restrict bound, int tp1, int tp2); -gdk_return GDKanalyticalntile(BAT *r, BAT *b, BAT *p, int tpe, const void *restrict ntile); +gdk_return GDKanalyticalntile(BAT *r, BAT *b, BAT *p, BAT *n, int tpe, const void *restrict ntile); gdk_return GDKanalyticalprod(BAT *r, BAT *b, BAT *s, BAT *e, int tp1, int tp2); gdk_return GDKanalyticalsum(BAT *r, BAT *b, BAT *s, BAT *e, int tp1, int tp2); gdk_return GDKanalyticalwindowbounds(BAT *r, BAT *b, BAT *p, BAT *l, const void *restrict bound, int tp1, int tp2, int unit, bool preceding, lng first_half); diff --git a/clients/mapiclient/eventparser.c b/clients/mapiclient/eventparser.c --- a/clients/mapiclient/eventparser.c +++ b/clients/mapiclient/eventparser.c @@ -212,7 +212,7 @@ keyvalueparser(char *txt, EventRecord *e if( strstr(key,"clk")){ time_t sec; uint64_t microsec; - struct tm curr_time; + struct tm curr_time = (struct tm) {0}; c = strchr(val,'.'); if (c != NULL) { diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c --- a/clients/mapiclient/mhelp.c +++ b/clients/mapiclient/mhelp.c @@ -72,9 +72,9 @@ SQLhelp sqlhelp1[] = { "See also https://www.monetdb.org/Documentation/SQLreference/Alter"}, {"ALTER SEQUENCE", "", - "ALTER SEQUENCE ident [ AS data_type] [ RESTART [WITH start]] [INCREMENT BY increment]\n" - "[MINVALUE minvalue | NO MINVALUE] [MAXVALUE maxvalue | NO MAXVALUE] [CACHE cachevalue] [[NO] CYCLE]", - "ident,data_type", + "ALTER SEQUENCE qname [ AS int_datatype] [ RESTART [WITH intval]] [INCREMENT BY intval]\n" + "[MINVALUE intval | NO MINVALUE] [MAXVALUE intval | NO MAXVALUE] [CACHE intval] [[NO] CYCLE]", + "int_datatype,intval", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/SerialTypes"}, {"ALTER USER", "Change a user's login name or password or default schema", @@ -209,9 +209,9 @@ SQLhelp sqlhelp1[] = { "See also https://www.monetdb.org/Documentation/SQLreference/Schema"}, {"CREATE SEQUENCE", "Define a new integer number sequence generator", - "CREATE SEQUENCE ident [ AS data_type] [ START [WITH start]] [INCREMENT BY increment]\n" - "[MINVALUE minvalue | NO MINVALUE] [MAXVALUE maxvalue | NO MAXVALUE] [CACHE cachevalue] [[NO] CYCLE]", - "ident,data_type", + "CREATE SEQUENCE qname [ AS int_datatype] [ START [WITH intval]] [INCREMENT BY intval]\n" + "[MINVALUE intval | NO MINVALUE] [MAXVALUE intval | NO MAXVALUE] [CACHE intval] [[NO] CYCLE]", + "int_datatype,intval", "See also https://www.monetdb.org/Documentation/Manuals/SQLreference/SerialTypes"}, {"CREATE STREAM TABLE", "Temporary table, locked during updates/ continues query processing", @@ -295,7 +295,7 @@ SQLhelp sqlhelp1[] = { NULL}, {"EXTRACT", "Built-in function", - "EXTRACT '(' { YEAR | MONTH | DAY | HOUR | MINUTE | SECOND } FROM scalar_expression ')'", + "EXTRACT '(' { YEAR | MONTH | DAY | HOUR | MINUTE | SECOND | CENTURY | DECADE | QUARTER | WEEK | DOW | DOY } FROM scalar_expression ')'", NULL, NULL}, {"DECLARE", @@ -434,14 +434,14 @@ SQLhelp sqlhelp1[] = { "[ FROM from_item [',' ...] ]\n" "[ WINDOW window_definition [',' ...] ]\n" "[ WHERE condition ]\n" - "[ GROUP BY expression [',' ...] ]\n" + "[ GROUP BY group_by_element [',' ...] ]\n" "[ HAVING condition [',' ...] ]\n" "[ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] [ CORRESPONDING ] select ]\n" "[ ORDER BY expression [ ASC | DESC ] [ NULLS { FIRST | LAST } ] [',' ...] ]\n" "[ LIMIT { count | param } ]\n" "[ OFFSET { count | param } ]\n" "[ SAMPLE size [ SEED size ] ]", - "cte_list,expression,window_definition", + "cte_list,expression,group_by_element,window_definition", "See also https://www.monetdb.org/Documentation/SQLreference/TableExpressions"}, {"SET", "Assign a value to a variable or column", @@ -548,8 +548,8 @@ SQLhelp sqlhelp2[] = { NULL}, {"column_def", NULL, - "COLUMN { data_type [ column_option ... ] | SERIAL | BIGSERIAL }", - "data_type,column_option", + "ident { data_type [ column_option ... ] | SERIAL | BIGSERIAL }", + "ident,data_type,column_option", NULL}, {"column_list", NULL, @@ -630,6 +630,12 @@ SQLhelp sqlhelp2[] = { "{ PUBLIC | authid } ", "authid", NULL}, + {"group_by_element", + NULL, + "{ expression | '(' ')' | ROLLUP '(' ident [',' ... ] ')' | CUBE '(' ident [',' ... ] ')'\n" + "| GROUPING SETS '(' group_by_element [',' ... ] ')' }", + "expression", + NULL}, {"headerlist", NULL, "'(' { ident [string] } [',' ...] ')'", @@ -646,6 +652,11 @@ SQLhelp sqlhelp2[] = { "ident [',' ...]", "ident", NULL}, + {"int_datatype", + NULL, + "BIGINT | INTEGER | INT | SMALLINT | TINYINT", + NULL, + NULL}, {"interval", NULL, "INTERVAL [ '+' | '-' ] string start_field TO end_field", diff --git a/clients/odbc/driver/ODBCConvert.c b/clients/odbc/driver/ODBCConvert.c --- a/clients/odbc/driver/ODBCConvert.c +++ b/clients/odbc/driver/ODBCConvert.c @@ -2473,6 +2473,7 @@ ODBCFetch(ODBCStmt *stmt, _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list