Changeset: e6e1477b6578 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e6e1477b6578 Added Files: clients/Tests/MAL-signatures_nogeom.malC.src clients/Tests/MAL-signatures_nogeom.stable.err clients/Tests/MAL-signatures_nogeom.stable.out clients/Tests/SQL-dump_nogeom.sql.src clients/Tests/SQL-dump_nogeom.stable.err clients/Tests/SQL-dump_nogeom.stable.out sql/benchmarks/tpch/fileleak/Tests/delete_all_nogeom.SQL.py.src sql/benchmarks/tpch/fileleak/Tests/delete_all_nogeom.stable.err sql/benchmarks/tpch/fileleak/Tests/delete_all_nogeom.stable.out sql/benchmarks/tpch/fileleak/Tests/leaks_nogeom.SQL.py.src sql/benchmarks/tpch/fileleak/Tests/leaks_nogeom.stable.err sql/benchmarks/tpch/fileleak/Tests/leaks_nogeom.stable.out Modified Files: clients/R/MonetDB.R/R/monetdb.R clients/R/MonetDB.R/src/mapi.c clients/Tests/All clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.Windows clients/Tests/exports.stable.out common/stream/stream.c gdk/gdk_select.c monetdb5/mal/mal_dataflow.c sql/backends/monet5/sql.mx sql/benchmarks/tpch/fileleak/Tests/All sql/server/rel_select.c sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out sql/test/Tests/systemfunctions_nogeom.stable.out sql/test/leaks/Tests/check1_nogeom.stable.out sql/test/leaks/Tests/check2_nogeom.stable.out sql/test/leaks/Tests/check3_nogeom.stable.out sql/test/leaks/Tests/check4_nogeom.stable.out sql/test/leaks/Tests/check5_nogeom.stable.out sql/test/leaks/Tests/temp2_nogeom.stable.out Branch: mutation Log Message:
merge with default diffs (truncated from 52039 to 300 lines): diff --git a/clients/R/MonetDB.R/R/monetdb.R b/clients/R/MonetDB.R/R/monetdb.R --- a/clients/R/MonetDB.R/R/monetdb.R +++ b/clients/R/MonetDB.R/R/monetdb.R @@ -540,7 +540,15 @@ REPLY_SIZE <- 100 # Apparently, -1 me #.mapiWrite(conObj@socket,msg) #resp <- .mapiRead(conObj@socket) + if (DEBUG_IO) cat(paste("TX: '",msg,"'\n",sep="")) resp <- .Call("mapiRequest",conObj@socket,msg,PACKAGE=C_LIBRARY) + if (DEBUG_IO) { + dstr <- resp + if (nchar(dstr) > 300) { + dstr <- paste0(substring(dstr,1,200),"...",substring(dstr,nchar(dstr)-100,nchar(dstr))) + } + cat(paste0("RX: '",dstr,"'\n")) + } # get deferred statements from deferred list and execute while (length(conObj@connenv$deferred) > 0) { @@ -630,7 +638,8 @@ REPLY_SIZE <- 100 # Apparently, -1 me env$lengths <- .mapiParseTableHeader(lines[5]) env$tuples <-lines[6:length(lines)] - + + stopifnot(length(env$tuples) == header$index) return(env) } # Continuation of Q_TABLE without headers describing table structure @@ -645,6 +654,8 @@ REPLY_SIZE <- 100 # Apparently, -1 me env$index <- header$index env$tuples <- lines[2:length(lines)] + stopifnot(length(env$tuples) == header$rows) + return(env) } diff --git a/clients/R/MonetDB.R/src/mapi.c b/clients/R/MonetDB.R/src/mapi.c --- a/clients/R/MonetDB.R/src/mapi.c +++ b/clients/R/MonetDB.R/src/mapi.c @@ -156,7 +156,7 @@ SEXP mapiConnect(SEXP host, SEXP port, S } size_t sockRead(int fd, void *buf, size_t size) { - ssize_t retval; + ssize_t retval = -1; do { retval = recv(fd, buf, size, MSG_WAITALL); } while (retval == -1 && errno == EINTR); @@ -171,7 +171,7 @@ size_t sockRead(int fd, void *buf, size_ } size_t sockWrite(int fd, const void *buf, size_t size) { - ssize_t retval; + ssize_t retval = -1; do { retval = send(fd, buf, size, 0); } while (retval == -1 && errno == EINTR); @@ -224,11 +224,11 @@ SEXP mapiRead(SEXP conn) { block_length, block_final ? "true" : "false", n); } } + read_buf[block_length] = '\0'; if (DEBUG) { printf("II: Received block of %u bytes, final=%s\n", block_length, block_final ? "true" : "false"); } - read_buf[block_length] = '\0'; // lets see whether we need moar memory for the response while (response_buf_offset + block_length > response_buf_len) { response_buf_len += ALLOCSIZE; @@ -245,8 +245,21 @@ SEXP mapiRead(SEXP conn) { memcpy(response_buf + response_buf_offset, read_buf, block_length); response_buf_offset += block_length; } + response_buf[response_buf_offset] = '\0'; - response_buf[response_buf_offset] = '\0'; + // We have this issue that on Windows sometimes a \0 appears in the middle of the response... + // since it always appears instead of a \t, let's replace it for now and pray + // MonetDB Bug #3369 http://bugs.monetdb.org/show_bug.cgi?id=3369 +#ifdef __WIN32__ + size_t i; + for (i = 0; i < response_buf_offset; i++) { + if (response_buf[i] == '\0') { + warning("Removed a NULL character from response at offset %lu of %lu",i,response_buf_offset); + response_buf[i] = '\t'; + } + } +#endif + PROTECT(lines = NEW_STRING(1)); SET_STRING_ELT(lines, 0, mkChar(response_buf)); free(response_buf); diff --git a/clients/Tests/All b/clients/Tests/All --- a/clients/Tests/All +++ b/clients/Tests/All @@ -1,3 +1,5 @@ exports -MAL-signatures -SQL-dump +HAVE_GEOM?MAL-signatures +!HAVE_GEOM?MAL-signatures_nogeom +HAVE_GEOM?SQL-dump +!HAVE_GEOM?SQL-dump_nogeom diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -39778,7 +39778,7 @@ pattern language.dataflow():bit address MALstartDataflow; comment The current guarded block is executed using dataflow control. -pattern language.pass(v:any_1):any_1 +pattern language.pass(v:any_1):void address MALpass; comment Cheap instruction to disgard storage while retaining the dataflow dependency diff --git a/clients/Tests/MAL-signatures.stable.out.Windows b/clients/Tests/MAL-signatures.stable.out.Windows --- a/clients/Tests/MAL-signatures.stable.out.Windows +++ b/clients/Tests/MAL-signatures.stable.out.Windows @@ -39754,7 +39754,7 @@ pattern language.dataflow():bit address MALstartDataflow; comment The current guarded block is executed using dataflow control. -pattern language.pass(v:any_1):any_1 +pattern language.pass(v:any_1):void address MALpass; comment Cheap instruction to disgard storage while retaining the dataflow dependency diff --git a/clients/Tests/MAL-signatures_nogeom.malC.src b/clients/Tests/MAL-signatures_nogeom.malC.src new file mode 100644 --- /dev/null +++ b/clients/Tests/MAL-signatures_nogeom.malC.src @@ -0,0 +1,1 @@ +$RELSRCDIR/MAL-signatures.malC diff --git a/clients/Tests/MAL-signatures_nogeom.stable.err b/clients/Tests/MAL-signatures_nogeom.stable.err new file mode 100644 --- /dev/null +++ b/clients/Tests/MAL-signatures_nogeom.stable.err @@ -0,0 +1,29 @@ +stderr of test 'MAL-signatures_nogeom` in directory 'clients` itself: + + +# 20:07:36 > +# 20:07:36 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=31131" "--set" "mapi_usock=/var/tmp/mtest-1103/.s.monetdb.31131" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/ufs/manegold/_/Monet/HG/Feb2013/prefix/--disable-debug_--enable-assert_--enable-optimize/var/MonetDB/mTests_clients" "MAL-signatures_nogeom.mal" +# 20:07:36 > + +# builtin opt gdk_dbpath = /ufs/manegold/_/Monet/HG/Feb2013/prefix/--disable-debug_--enable-assert_--enable-optimize/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = yes +# 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 = 31131 +# cmdline opt mapi_usock = /var/tmp/mtest-1103/.s.monetdb.31131 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /ufs/manegold/_/Monet/HG/Feb2013/prefix/--disable-debug_--enable-assert_--enable-optimize/var/MonetDB/mTests_clients + +# 20:07:38 > +# 20:07:38 > "Done." +# 20:07:38 > + diff --git a/clients/Tests/MAL-signatures_nogeom.stable.out b/clients/Tests/MAL-signatures_nogeom.stable.out new file mode 100644 --- /dev/null +++ b/clients/Tests/MAL-signatures_nogeom.stable.out @@ -0,0 +1,43108 @@ +stdout of test 'MAL-signatures_nogeom` in directory 'clients` itself: + + +# 20:07:36 > +# 20:07:36 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=31131" "--set" "mapi_usock=/var/tmp/mtest-1103/.s.monetdb.31131" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/ufs/manegold/_/Monet/HG/Feb2013/prefix/--disable-debug_--enable-assert_--enable-optimize/var/MonetDB/mTests_clients" "MAL-signatures_nogeom.mal" +# 20:07:36 > + +# MonetDB 5 server v11.15.12 +# This is an unreleased version +# Serving database 'mTests_clients', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 15.591 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://rome.ins.cwi.nl:31131/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-1103/.s.monetdb.31131 +# MonetDB/GIS module loaded +# MonetDB/JAQL module loaded +# MonetDB/SQL module loaded + +Ready. + +# 00:44:35 > +# 00:44:35 > "mclient" "-lmal" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-13629" "--port=31724" +# 00:44:35 > + +#?*) +command aggr.avg(b:bat[:oid,:dbl],g:bat[:oid,:oid],e:bat[:oid,:any_1]) (X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) +address AGGRavg23_dbl; +comment Grouped tail average on dbl, also returns count + +command aggr.avg(b:bat[:oid,:dbl],e:bat[:oid,:any_1]) (X_3:bat[:oid,:dbl],X_4:bat[:oid,:wrd]) +address AGGRavg22_dbl; +comment Grouped tail average on dbl, also returns count + +command aggr.avg(b:bat[:oid,:dbl],g:bat[:oid,:oid],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg13_dbl; +comment Grouped tail average on dbl + +command aggr.avg(b:bat[:oid,:dbl],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg12_dbl; +comment Grouped tail average on dbl + +command aggr.avg(b:bat[:oid,:flt],g:bat[:oid,:oid],e:bat[:oid,:any_1]) (X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) +address AGGRavg23_dbl; +comment Grouped tail average on flt, also returns count + +command aggr.avg(b:bat[:oid,:flt],e:bat[:oid,:any_1]) (X_3:bat[:oid,:dbl],X_4:bat[:oid,:wrd]) +address AGGRavg22_dbl; +comment Grouped tail average on flt, also returns count + +command aggr.avg(b:bat[:oid,:flt],g:bat[:oid,:oid],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg13_dbl; +comment Grouped tail average on flt + +command aggr.avg(b:bat[:oid,:flt],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg12_dbl; +comment Grouped tail average on flt + +command aggr.avg(b:bat[:oid,:lng],g:bat[:oid,:oid],e:bat[:oid,:any_1]) (X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) +address AGGRavg23_dbl; +comment Grouped tail average on lng, also returns count + +command aggr.avg(b:bat[:oid,:lng],e:bat[:oid,:any_1]) (X_3:bat[:oid,:dbl],X_4:bat[:oid,:wrd]) +address AGGRavg22_dbl; +comment Grouped tail average on lng, also returns count + +command aggr.avg(b:bat[:oid,:lng],g:bat[:oid,:oid],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg13_dbl; +comment Grouped tail average on lng + +command aggr.avg(b:bat[:oid,:lng],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg12_dbl; +comment Grouped tail average on lng + +command aggr.avg(b:bat[:oid,:wrd],g:bat[:oid,:oid],e:bat[:oid,:any_1]) (X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) +address AGGRavg23_dbl; +comment Grouped tail average on wrd, also returns count + +command aggr.avg(b:bat[:oid,:wrd],e:bat[:oid,:any_1]) (X_3:bat[:oid,:dbl],X_4:bat[:oid,:wrd]) +address AGGRavg22_dbl; +comment Grouped tail average on wrd, also returns count + +command aggr.avg(b:bat[:oid,:wrd],g:bat[:oid,:oid],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg13_dbl; +comment Grouped tail average on wrd + +command aggr.avg(b:bat[:oid,:wrd],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg12_dbl; +comment Grouped tail average on wrd + +command aggr.avg(b:bat[:oid,:int],g:bat[:oid,:oid],e:bat[:oid,:any_1]) (X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) +address AGGRavg23_dbl; +comment Grouped tail average on int, also returns count + +command aggr.avg(b:bat[:oid,:int],e:bat[:oid,:any_1]) (X_3:bat[:oid,:dbl],X_4:bat[:oid,:wrd]) +address AGGRavg22_dbl; +comment Grouped tail average on int, also returns count + +command aggr.avg(b:bat[:oid,:int],g:bat[:oid,:oid],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg13_dbl; +comment Grouped tail average on int + +command aggr.avg(b:bat[:oid,:int],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg12_dbl; +comment Grouped tail average on int + +command aggr.avg(b:bat[:oid,:sht],g:bat[:oid,:oid],e:bat[:oid,:any_1]) (X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) +address AGGRavg23_dbl; +comment Grouped tail average on sht, also returns count + +command aggr.avg(b:bat[:oid,:sht],e:bat[:oid,:any_1]) (X_3:bat[:oid,:dbl],X_4:bat[:oid,:wrd]) +address AGGRavg22_dbl; +comment Grouped tail average on sht, also returns count + +command aggr.avg(b:bat[:oid,:sht],g:bat[:oid,:oid],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg13_dbl; +comment Grouped tail average on sht + +command aggr.avg(b:bat[:oid,:sht],e:bat[:oid,:any_1]):bat[:oid,:dbl] +address AGGRavg12_dbl; +comment Grouped tail average on sht + +command aggr.avg(b:bat[:oid,:bte],g:bat[:oid,:oid],e:bat[:oid,:any_1]) (X_4:bat[:oid,:dbl],X_5:bat[:oid,:wrd]) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list