Changeset: a5183cb9607d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a5183cb9607d Added Files: sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.sql sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.stable.err sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.stable.out Modified Files: MonetDB.spec NT/monetdb_config.h.in buildtools/ChangeLog.Jun2016 clients/ChangeLog.Jun2016 clients/R/MonetDB.R/NAMESPACE clients/R/MonetDB.R/R/dplyr.R clients/R/Tests/dplyr-flights.R clients/R/Tests/dplyr.R debian/monetdb5-sql.install sql/server/rel_updates.c sql/test/BugTracker-2016/Tests/All tools/embedded/build-rpkg.sh tools/embedded/rpackage/DESCRIPTION tools/embedded/rpackage/configure tools/merovingian/daemon/monetdbd.1.in tools/merovingian/daemon/monetdbd.service.in tools/mserver/monet_version.c.in Branch: default Log Message:
Merge with Jun2016 branch. diffs (truncated from 442 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -106,6 +106,8 @@ License: MPLv2.0 URL: http://www.monetdb.org/ Source: http://dev.monetdb.org/downloads/sources/Jul2015-SP3/%{name}-%{version}.tar.bz2 +# we need systemd for the _unitdir macro to exist +BuildRequires: systemd BuildRequires: bison BuildRequires: bzip2-devel %if %{?with_fits:1}%{!?with_fits:0} diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in --- a/NT/monetdb_config.h.in +++ b/NT/monetdb_config.h.in @@ -148,7 +148,7 @@ /* #undef HAVE_FDATASYNC */ /* Define to 1 if you have the <fenv.h> header file. */ -#if !defined(_MSV_VER) || _MSC_VER > 1600 +#if !defined(_MSC_VER) || _MSC_VER > 1600 #define HAVE_FENV_H 1 #endif @@ -240,7 +240,7 @@ #define HAVE_IO_H 1 /* Define to 1 if you have the `isinf' function. */ -#if !defined(_MSV_VER) || _MSC_VER > 1600 +#if !defined(_MSC_VER) || _MSC_VER > 1600 #define HAVE_ISINF 1 #endif @@ -309,7 +309,7 @@ /* Define to 1 if you have the `llabs' function. */ #define HAVE_LLABS 1 -#if defined(_MSV_VER) && _MSC_VER <= 1500 +#if defined(_MSC_VER) && _MSC_VER <= 1500 #define llabs _abs64 #endif @@ -460,7 +460,7 @@ /* #undef HAVE_RLIMIT_H */ /* Define to 1 if you have the `round' function. */ -#if !defined(_MSV_VER) || _MSC_VER > 1600 +#if !defined(_MSC_VER) || _MSC_VER > 1600 #define HAVE_ROUND 1 #endif diff --git a/buildtools/ChangeLog.Jun2016 b/buildtools/ChangeLog.Jun2016 --- a/buildtools/ChangeLog.Jun2016 +++ b/buildtools/ChangeLog.Jun2016 @@ -7,5 +7,5 @@ * Sat Jan 23 2016 Sjoerd Mullender <sjo...@acm.org> - Implemented a systemd configuration file for a monetdbd.service - on Fedora. + on systems that support it (Fedora, newer Ubuntu). diff --git a/clients/ChangeLog.Jun2016 b/clients/ChangeLog.Jun2016 --- a/clients/ChangeLog.Jun2016 +++ b/clients/ChangeLog.Jun2016 @@ -1,3 +1,7 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Wed Mar 16 2016 Sjoerd Mullender <sjo...@acm.org> +- The Ruby client is now in a separate repository + (http://dev.monetdb.org/hg/monetdb-ruby) and released independently. + diff --git a/clients/R/MonetDB.R/NAMESPACE b/clients/R/MonetDB.R/NAMESPACE --- a/clients/R/MonetDB.R/NAMESPACE +++ b/clients/R/MonetDB.R/NAMESPACE @@ -21,18 +21,4 @@ export(monetdb.server.getpid) # dplyr.R export(src_monetdb) -export(src_translate_env.src_monetdb) -export(src_desc.src_monetdb) -export(tbl.src_monetdb) -export(db_query_fields.MonetDBConnection) -export(db_query_fields.MonetDBEmbeddedConnection) -export(db_query_rows.MonetDBConnection) -export(db_query_rows.MonetDBEmbeddedConnection) -export(db_save_query.MonetDBConnection) -export(db_insert_into.MonetDBConnection) -export(db_create_index.MonetDBConnection) -export(db_analyze.MonetDBConnection) -export(sql_subquery.MonetDBConnection) -export(monetdb_queryinfo) -export(sample_n.tbl_monetdb) -export(sample_frac.tbl_monetdb) +# rest of dplyr.R exported via hack in src_monetdb diff --git a/clients/R/MonetDB.R/R/dplyr.R b/clients/R/MonetDB.R/R/dplyr.R --- a/clients/R/MonetDB.R/R/dplyr.R +++ b/clients/R/MonetDB.R/R/dplyr.R @@ -4,7 +4,26 @@ src_monetdb <- function(dbname="demo", h con <- DBI::dbConnect(MonetDB.R(), dbname = dbname , host = host, port = port, user = user, password = password, ...) } - dplyr::src_sql("monetdb", con, info = DBI::dbGetInfo(con)) + s <- dplyr::src_sql("monetdb", con, info = DBI::dbGetInfo(con)) + + # this is a (dirty) hack so we don't need to depend on dplyr + dplyrMt <- getNamespace("dplyr")$.__S3MethodsTable__. + + dplyrMt[["src_translate_env.src_monetdb"]] <- src_translate_env.src_monetdb + dplyrMt[["src_desc.src_monetdb"]] <- src_desc.src_monetdb + dplyrMt[["tbl.src_monetdb"]] <- tbl.src_monetdb + dplyrMt[["db_query_fields.MonetDBConnection"]] <- db_query_fields.MonetDBEmbeddedConnection + dplyrMt[["db_query_rows.MonetDBConnection"]] <- db_query_rows.MonetDBConnection + dplyrMt[["db_query_rows.MonetDBEmbeddedConnection"]] <- db_query_rows.MonetDBEmbeddedConnection + dplyrMt[["db_save_query.MonetDBConnection"]] <- db_save_query.MonetDBConnection + dplyrMt[["db_insert_into.MonetDBConnection"]] <- db_insert_into.MonetDBConnection + dplyrMt[["db_create_index.MonetDBConnection"]] <- db_create_index.MonetDBConnection + dplyrMt[["db_analyze.MonetDBConnection"]] <- db_analyze.MonetDBConnection + dplyrMt[["sql_subquery.MonetDBConnection"]] <- sql_subquery.MonetDBConnection + dplyrMt[["sample_n.tbl_monetdb"]] <- sample_n.tbl_monetdb + dplyrMt[["sample_frac.tbl_monetdb"]] <- sample_frac.tbl_monetdb + + s } src_translate_env.src_monetdb <- function(x) { diff --git a/clients/R/Tests/dplyr-flights.R b/clients/R/Tests/dplyr-flights.R --- a/clients/R/Tests/dplyr-flights.R +++ b/clients/R/Tests/dplyr-flights.R @@ -10,9 +10,6 @@ dd <- capture.output( suppressMessages ( library(dplyr, quietly=T) -# FIXME: this should no longer be required -library(MonetDB.R, quietly = T) - args <- commandArgs(trailingOnly = TRUE) dbport <- 50000 dbname <- "mTests_clients_R" diff --git a/clients/R/Tests/dplyr.R b/clients/R/Tests/dplyr.R --- a/clients/R/Tests/dplyr.R +++ b/clients/R/Tests/dplyr.R @@ -10,9 +10,6 @@ dd <- capture.output( suppressMessages ( library(dplyr, quietly = T) -# FIXME: this should no longer be required -library(MonetDB.R, quietly = T) - args <- commandArgs(trailingOnly = TRUE) dbport <- 50000 dbname <- "mTests_clients_R" diff --git a/debian/monetdb5-sql.install b/debian/monetdb5-sql.install --- a/debian/monetdb5-sql.install +++ b/debian/monetdb5-sql.install @@ -2,6 +2,7 @@ debian/tmp/usr/bin/monetdbd usr/bin debian/tmp/usr/bin/monetdb usr/bin debian/tmp/usr/lib/monetdb5/*.sql usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/autoload/??_sql.mal usr/lib/monetdb5/autoload +debian/tmp/usr/lib/systemd/system/monetdbd.service lib/systemd/system # usr/lib/monetdb5/sql*.mal EXCEPT: sql*_hge.mal debian/tmp/usr/lib/monetdb5/sql.mal usr/lib/monetdb5 debian/tmp/usr/lib/monetdb5/sql_aggr_[!h]*.mal usr/lib/monetdb5 diff --git a/sql/server/rel_updates.c b/sql/server/rel_updates.c --- a/sql/server/rel_updates.c +++ b/sql/server/rel_updates.c @@ -964,6 +964,7 @@ update_table(mvc *sql, dlist *qname, dli sql->errstr[0] = 0; sql->session->status = status; if (single) { + rel_val = NULL; v = rel_value_exp(sql, &r, a, sql_sel, ek); } else if (!rel_val && r) { r = rel_subquery(sql, r, a, ek, APPLY_LOJ); diff --git a/sql/test/BugTracker-2016/Tests/All b/sql/test/BugTracker-2016/Tests/All --- a/sql/test/BugTracker-2016/Tests/All +++ b/sql/test/BugTracker-2016/Tests/All @@ -15,3 +15,4 @@ stream_table_crash.Bug-3952 null_in_null.Bug-3900 rank_rewrite.Bug-3890 HAVE_LIBBZ2?min-max-uuid-column-wrong-results.Bug-3953 +update_crash.Bug-3954 diff --git a/sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.sql b/sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.sql @@ -0,0 +1,19 @@ +create table temp (t timestamp, sensor integer, val decimal(8,2)) ; + +insert into temp values(timestamp '2016-03-13 08:58:14', 1, 23.4); + +select * from temp; + +create table temp_aggregate(temp_total decimal(8,2), temp_count decimal(8,2)); +insert into temp_aggregate values(0.0,0.0); + +create procedure collect() +begin + update temp_aggregate + set temp_total = temp_total + (select sum(val) from temp), + temp_count = temp_count + (select count(*) from temp); +end; + +drop procedure collect; +drop table temp; +drop table temp_aggregate; diff --git a/sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.stable.err b/sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.stable.err @@ -0,0 +1,37 @@ +stderr of test 'update_crash.Bug-3954` in directory 'sql/test/BugTracker-2016` itself: + + +# 09:50:14 > +# 09:50:14 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=33995" "--set" "mapi_usock=/var/tmp/mtest-24151/.s.monetdb.33995" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/home/niels/scratch/rc-monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2016" "--set" "mal_listing=0" "--set" "embedded_r=yes" +# 09:50:14 > + +# builtin opt gdk_dbpath = /home/niels/scratch/rc-monetdb/Linux-x86_64/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = no +# builtin opt monet_prompt = > +# builtin opt monet_daemon = no +# builtin opt mapi_port = 50000 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 33995 +# cmdline opt mapi_usock = /var/tmp/mtest-24151/.s.monetdb.33995 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /home/niels/scratch/rc-monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2016 +# cmdline opt mal_listing = 0 +# cmdline opt embedded_r = yes +# cmdline opt gdk_debug = 536870922 + +# 09:50:15 > +# 09:50:15 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-24151" "--port=33995" +# 09:50:15 > + + +# 09:50:15 > +# 09:50:15 > "Done." +# 09:50:15 > + diff --git a/sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.stable.out b/sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2016/Tests/update_crash.Bug-3954.stable.out @@ -0,0 +1,57 @@ +stdout of test 'update_crash.Bug-3954` in directory 'sql/test/BugTracker-2016` itself: + + +# 09:50:14 > +# 09:50:14 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=33995" "--set" "mapi_usock=/var/tmp/mtest-24151/.s.monetdb.33995" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/home/niels/scratch/rc-monetdb/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2016" "--set" "mal_listing=0" "--set" "embedded_r=yes" +# 09:50:14 > + +# MonetDB 5 server v11.21.12 +# This is an unreleased version +# Serving database 'mTests_sql_test_BugTracker-2016', using 4 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked +# Found 7.332 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://localhost.nes.nl:33995/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-24151/.s.monetdb.33995 +# MonetDB/GIS module loaded +# Start processing logs sql/sql_logs version 52200 +# Start reading the write-ahead log 'sql_logs/sql/log.9' +# Finished reading the write-ahead log 'sql_logs/sql/log.9' +# Finished processing logs sql/sql_logs +# MonetDB/SQL module loaded +# MonetDB/R module loaded + +Ready. + +# 09:50:15 > +# 09:50:15 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-24151" "--port=33995" +# 09:50:15 > + +#create table temp (t timestamp, sensor integer, val decimal(8,2)) ; +#insert into temp values(timestamp '2016-03-13 08:58:14', 1, 23.4); +[ 1 ] +#select * from temp; +% sys.temp, sys.temp, sys.temp # table_name +% t, sensor, val # name +% timestamp, int, decimal # type +% 26, 1, 10 # length +[ 2016-03-13 08:58:14.000000, 1, 23.40 ] +#create table temp_aggregate(temp_total decimal(8,2), temp_count decimal(8,2)); +#insert into temp_aggregate values(0.0,0.0); +[ 1 ] +#create procedure collect() +#begin +# update temp_aggregate +# set temp_total = temp_total + (select sum(val) from temp), _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list