Changeset: 33f0cd78bd53 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=33f0cd78bd53
Added Files:
sql/test/BugTracker-2014/Tests/copy_decimal_into.Bug-3596.sql
sql/test/BugTracker-2014/Tests/copy_decimal_into.Bug-3596.stable.err
sql/test/BugTracker-2014/Tests/copy_decimal_into.Bug-3596.stable.out
sql/test/BugTracker-2014/Tests/duplicate_primary_keys.Bug-3474.stable.err
sql/test/BugTracker-2014/Tests/duplicate_primary_keys.Bug-3474.stable.out
sql/test/BugTracker-2014/Tests/insert_into_temp_table.Bug-3600.sql
sql/test/BugTracker-2014/Tests/insert_into_temp_table.Bug-3600.stable.err
sql/test/BugTracker-2014/Tests/insert_into_temp_table.Bug-3600.stable.out
Modified Files:
NT/monetdb_config.h.in
clients/R/MonetDB.R/DESCRIPTION
clients/R/MonetDB.R/R/control.R
clients/R/MonetDB.R/src/mapi.c
clients/R/Tests/dbi.R
clients/Tests/exports.stable.out
clients/mapiclient/mclient.c
clients/mapiclient/mnc.c
clients/mapilib/mapi.c
clients/mapilib/mapi.h
clients/odbc/driver/ODBCGlobal.h
common/stream/stream.c
common/stream/stream_socket.h
common/utils/mutils.c
common/utils/mutils.h
configure.ag
gdk/gdk_align.c
gdk/gdk_atoms.c
gdk/gdk_bat.c
gdk/gdk_posix.c
gdk/gdk_posix.h
gdk/gdk_storage.c
gdk/gdk_system.c
gdk/gdk_system.h
gdk/gdk_utils.c
geom/lib/libgeom.h
geom/monetdb5/geom.c
monetdb5/mal/mal.h
monetdb5/mal/mal_debugger.c
monetdb5/mal/mal_debugger.h
monetdb5/modules/atoms/batxml.c
monetdb5/modules/atoms/blob.h
monetdb5/modules/atoms/mtime.c
monetdb5/modules/atoms/mtime.h
monetdb5/modules/atoms/mtime.mal
monetdb5/modules/kernel/aggr.c
monetdb5/modules/kernel/alarm.c
monetdb5/modules/kernel/batmmath.c
monetdb5/modules/kernel/batstr.c
monetdb5/modules/kernel/counters.c
monetdb5/modules/kernel/logger.c
monetdb5/modules/kernel/mmath.c
monetdb5/modules/mal/batcalc.c
monetdb5/modules/mal/calc.c
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/mkey.c
monetdb5/modules/mal/pcre.c
monetdb5/modules/mal/tablet.h
monetdb5/modules/mal/transaction.c
sql/backends/monet5/datacell/dcsocket.c
sql/backends/monet5/gsl/gsl.c
sql/backends/monet5/sql_result.c
sql/backends/monet5/sql_statistics.c
sql/benchmarks/tpch/Tests/11-explain.stable.out
sql/benchmarks/tpch/Tests/11-explain.stable.out.int128
sql/benchmarks/tpch/Tests/11-plan.stable.out
sql/benchmarks/tpch/Tests/11-plan.stable.out.int128
sql/benchmarks/tpch/Tests/14-explain.stable.out
sql/benchmarks/tpch/Tests/14-explain.stable.out.int128
sql/benchmarks/tpch/Tests/14-plan.stable.out
sql/benchmarks/tpch/Tests/14-plan.stable.out.int128
sql/benchmarks/tpch/Tests/17-explain.stable.out
sql/benchmarks/tpch/Tests/17-explain.stable.out.int128
sql/benchmarks/tpch/Tests/17-plan.stable.out
sql/benchmarks/tpch/Tests/17-plan.stable.out.int128
sql/benchmarks/tpch/Tests/20-explain.stable.out
sql/benchmarks/tpch/Tests/20-explain.stable.out.int128
sql/benchmarks/tpch/Tests/20-plan.stable.out
sql/benchmarks/tpch/Tests/20-plan.stable.out.int128
sql/benchmarks/tpch/Tests/22-explain.stable.out
sql/benchmarks/tpch/Tests/22-explain.stable.out.int128
sql/benchmarks/tpch/Tests/22-plan.stable.out
sql/common/sql_string.c
sql/include/sql_catalog.h
sql/include/sql_relation.h
sql/jdbc/tests/Tests/Test_Dobjects.stable.out
sql/server/rel_optimizer.c
sql/server/rel_optimizer.h
sql/server/rel_planner.c
sql/server/rel_planner.h
sql/server/rel_select.c
sql/server/sql_parser.y
sql/storage/bat/bat_storage.c
sql/storage/sql_storage.h
sql/storage/store.c
sql/test/BugTracker-2012/Tests/user_defined_decimal_function.Bug-2992.stable.out
sql/test/BugTracker-2014/Tests/All
sql/test/BugTracker-2014/Tests/stringfloatshtcompare.Bug-3512.stable.err
sql/test/BugTracker-2014/Tests/stringfloatshtcompare.Bug-3512.stable.out
sql/test/leaks/Tests/check0.stable.out
sql/test/leaks/Tests/check3.stable.out
sql/test/leaks/Tests/check4.stable.out
sql/test/leaks/Tests/check5.stable.out
sql/test/leaks/Tests/select1.stable.out
sql/test/leaks/Tests/select2.stable.out
sql/test/leaks/Tests/temp2.stable.out
sql/test/leaks/Tests/temp3.stable.out
sql/test/pg_regress/Tests/alter_table.sql
sql/test/pg_regress/Tests/alter_table.stable.err
sql/test/pg_regress/Tests/alter_table.stable.out
sql/test/pg_regress/Tests/comments.stable.err
sql/test/pg_regress/Tests/float4.stable.err
sql/test/pg_regress/Tests/float8.stable.err
sql/test/pg_regress/Tests/float8.stable.out
sql/test/pg_regress/Tests/numeric.stable.err
sql/test/pg_regress/Tests/numeric.stable.out
sql/test/pg_regress/Tests/numerology.sql
sql/test/pg_regress/Tests/numerology.stable.err
sql/test/pg_regress/Tests/numerology.stable.out
sql/test/pg_regress/postgresql2sql99.sh
tools/merovingian/daemon/client.c
tools/merovingian/daemon/connections.c
tools/merovingian/daemon/controlrunner.c
tools/merovingian/daemon/merovingian.c
tools/merovingian/daemon/multiplex-funnel.c
tools/merovingian/daemon/proxy.c
tools/merovingian/utils/control.c
Branch: transaction-replication
Log Message:
Merge with default branch
diffs (truncated from 8438 to 300 lines):
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
@@ -111,13 +111,6 @@
/* Define to 1 if you have the <crypt.h> header file. */
/* #undef HAVE_CRYPT_H */
-/* Define to 1 if you have the <cstdio> header file. */
-#if _MSC_VER >= 1300
-#define HAVE_CSTDIO 1
-#else
-/* #undef HAVE_CSTDIO */
-#endif
-
/* Define to 1 if you have the `ctime_r' function. */
#define HAVE_CTIME_R 1
@@ -151,6 +144,9 @@
/* If the system has a working fdatasync */
/* #undef HAVE_FDATASYNC */
+/* Define to 1 if you have the <fenv.h> header file. */
+/* #undef HAVE_FENV_H */
+
/* Define to 1 if you have the `fpclass' function. */
#define HAVE_FPCLASS 1
@@ -226,13 +222,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1 /* generated by the Makefile */
-/* Define to 1 if you have the <iostream> header file. */
-#if _MSC_VER >= 1300
-#define HAVE_IOSTREAM 1
-#else
-/* #undef HAVE_IOSTREAM */
-#endif
-
/* Define to 1 if you have the <io.h> header file. */
#define HAVE_IO_H 1
@@ -1038,9 +1027,6 @@ typedef unsigned __int64 uint64_t;
#define __bool_true_false_are_defined 1
-#define SLASH_2_DIR_SEP(s) {char *t; for(t=strchr(s, '/' ); t;
t=strchr(t+1, '/' )) *t=DIR_SEP;}
-#define DIR_SEP_2_SLASH(s) {char *t; for(t=strchr(s, DIR_SEP); t;
t=strchr(t+1, DIR_SEP)) *t='/' ;}
-
#ifdef HAVE_LONG_LONG
typedef long long lng;
# define SIZEOF_LNG SIZEOF_LONG_LONG
diff --git a/clients/R/MonetDB.R/DESCRIPTION b/clients/R/MonetDB.R/DESCRIPTION
--- a/clients/R/MonetDB.R/DESCRIPTION
+++ b/clients/R/MonetDB.R/DESCRIPTION
@@ -1,5 +1,5 @@
Package: MonetDB.R
-Version: 0.9.5
+Version: 0.9.6
Title: Connect MonetDB to R
Authors@R: c(person("Hannes Muehleisen", role = c("aut", "cre"),email =
"[email protected]"),
person("Thomas Lumley", role = "ctb"),
diff --git a/clients/R/MonetDB.R/R/control.R b/clients/R/MonetDB.R/R/control.R
--- a/clients/R/MonetDB.R/R/control.R
+++ b/clients/R/MonetDB.R/R/control.R
@@ -10,7 +10,7 @@ monetdb.server.start <-
# run script
system(bat.file,wait=T)
-
+
# read pid from file
pid <- scan(pidfile,what=integer(),n=1)
return(pid)
@@ -69,10 +69,20 @@ monetdb.server.start <-
monetdb.server.stop <-
- function( correct.pid ){
+ function( correct.pid, wait=T ){
if ( .Platform$OS.type == "unix" ) {
- system(paste0("kill ",correct.pid))
+ system(paste0("kill ",correct.pid))
+ waittime <- 2
+ if (!wait) return(TRUE)
+ Sys.sleep(.5)
+ repeat {
+ psout <- system(paste0("ps ax | grep \"^", correct.pid,
".*mserver5\""), ignore.stdout=T)
+ if (psout != 0) break
+ message("Waiting ",waittime,"s for server shutdown (ESC or CTRL+C to
abort)")
+ Sys.sleep(waittime)
+ waittime <- waittime * 2
+ }
}
if ( .Platform$OS.type == "windows" ) {
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
@@ -132,25 +132,25 @@ SEXP mapiConnect(SEXP host, SEXP port, S
for (rp = result; rp != NULL; rp = rp->ai_next) {
sock = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
- if (sock == -1)
+ if (sock == INVALID_SOCKET)
continue;
if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (const char *)
&sto,
- sizeof(sto)) < 0) {
+ sizeof(sto)) == SOCKET_ERROR) {
error("setsockopt failed");
}
if (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, (const char *)
&sto,
- sizeof(sto)) < 0) {
+ sizeof(sto)) == SOCKET_ERROR) {
error("setsockopt failed\n");
}
// lets have a 1M buffer on this socket, ok?
int recvbuf_size = ALLOCSIZE;
if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF,
- (const char *) &recvbuf_size,
sizeof(recvbuf_size))) {
+ (const char *) &recvbuf_size,
sizeof(recvbuf_size)) == SOCKET_ERROR) {
error("setsockopt failed");
}
- if (connect(sock, rp->ai_addr, rp->ai_addrlen) != -1) {
+ if (connect(sock, rp->ai_addr, rp->ai_addrlen) != SOCKET_ERROR)
{
if (DEBUG) {
printf("II: Connected to %s:%s\n", hostval,
portvalstr);
}
@@ -183,7 +183,13 @@ size_t sockRead(int fd, void *buf, size_
ssize_t retval = -1;
do {
retval = recv(fd, buf, size, MSG_WAITALL);
- } while (retval == -1 && errno == EINTR);
+ } while (retval == SOCKET_ERROR &&
+#ifdef _MSC_VER
+ WSAGetLastError() == WSAEINTR
+#else
+ errno == EINTR
+#endif
+ );
if (retval == -1) {
#ifdef __WIN32__
errno = WSAGetLastError();
@@ -198,7 +204,13 @@ size_t sockWrite(int fd, const void *buf
ssize_t retval = -1;
do {
retval = send(fd, buf, size, 0);
- } while (retval == -1 && errno == EINTR);
+ } while (retval == SOCKET_ERROR &&
+#ifdef _MSC_VER
+ WSAGetLastError() == WSAEINTR
+#else
+ errno == EINTR
+#endif
+ );
if (retval == -1) {
#ifdef __WIN32__
errno = WSAGetLastError();
diff --git a/clients/R/Tests/dbi.R b/clients/R/Tests/dbi.R
--- a/clients/R/Tests/dbi.R
+++ b/clients/R/Tests/dbi.R
@@ -11,6 +11,7 @@ if (length(args) > 0)
dbport <- args[[1]]
options(monetdb.insert.splitsize=10)
+
tname <- "monetdbtest"
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
@@ -490,12 +490,12 @@ int strToStr(str *dst, int *len, const c
const char str_nil[2];
int void_inplace(BAT *b, oid id, const void *val, bit force);
BUN void_replace_bat(BAT *b, BAT *u, bit force);
-int *win_errno(void);
int win_mkdir(const char *, const int mode);
int win_rename(const char *, const char *);
int win_rmdir(const char *);
int win_stat(const char *, struct stat *);
int win_unlink(const char *);
+int winerror(int);
const wrd wrd_nil;
# mapi
@@ -596,6 +596,7 @@ MapiMsg mapi_timeout(Mapi mid, unsigned
MapiMsg mapi_trace(Mapi mid, int flag);
char *mapi_unquote(char *msg);
MapiMsg mapi_virtual_result(MapiHdl hdl, int columns, const char
**columnnames, const char **columntypes, const int *columnlengths, int
tuplecount, const char ***tuples);
+const char *wsaerror(int);
# monetdb5
str AGGRavg12_dbl(bat *retval, const bat *bid, const bat *eid);
@@ -2552,13 +2553,13 @@ str maxRef;
str max_no_nilRef;
int mayhaveSideEffects(Client cntxt, MalBlkPtr mb, InstrPtr p, int strict);
void mdbDump(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str mdbGrab(Client cntxt, MalBlkPtr mb1, MalStkPtr stk1, InstrPtr pc1);
+str mdbGrab(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str mdbRef;
int mdbSession(void);
void mdbSetBreakRequest(Client cntxt, MalBlkPtr mb, str request, char cmd);
int mdbSetTrap(Client cntxt, str modnme, str fcnnme, int flag);
-str mdbTrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, int pc);
-str mdbTrapClient(Client cntxt, MalBlkPtr mb1, MalStkPtr stk1, InstrPtr pc1);
+str mdbTrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+str mdbTrapClient(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
int memoryclaims;
lng memorypool;
str mergecandRef;
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -68,10 +68,6 @@
#ifdef HAVE_LANGINFO_H
#include <langinfo.h>
#endif
-#else
-#ifdef NATIVE_WIN32
-#include <Windows.h>
-#endif
#endif
#endif
@@ -247,8 +243,8 @@ gettime(void)
tb.time -= tbbase.time;
return (timertype) tb.time * 1000000 + (timertype) tb.millitm *
1000;
}
-#endif
-#endif
+#endif /* HAVE_FTIME */
+#endif /* HAVE_GETTIMEOFDAY */
}
static void
@@ -1433,7 +1429,7 @@ SQLrenderer(MapiHdl hdl, char singleinst
}
static void
-setFormatter(char *s)
+setFormatter(const char *s)
{
if (separator)
free(separator);
@@ -1452,10 +1448,20 @@ setFormatter(char *s)
separator = strdup(",");
} else if (strncmp(s, "csv=", 4) == 0) {
formatter = CSVformatter;
- separator = strdup(s + 4);
+ if (s[4] == '"') {
+ separator = strdup(s + 5);
+ if (separator[strlen(separator) - 1] == '"')
+ separator[strlen(separator) - 1] = 0;
+ } else
+ separator = strdup(s + 4);
} else if (strncmp(s, "csv+", 4) == 0) {
formatter = CSVformatter;
- separator = strdup(s + 4);
+ if (s[4] == '"') {
+ separator = strdup(s + 5);
+ if (separator[strlen(separator) - 1] == '"')
+ separator[strlen(separator) - 1] = 0;
+ } else
+ separator = strdup(s + 4);
csvheader = 1;
} else if (strcmp(s, "tab") == 0) {
formatter = CSVformatter;
diff --git a/clients/mapiclient/mnc.c b/clients/mapiclient/mnc.c
--- a/clients/mapiclient/mnc.c
+++ b/clients/mapiclient/mnc.c
@@ -179,7 +179,7 @@ main(int argc, char **argv)
s = socket(rp->ai_family, rp->ai_socktype,
rp->ai_protocol);
if (s == INVALID_SOCKET)
continue;
- if (connect(s, rp->ai_addr, (socklen_t) rp->ai_addrlen)
!= -1)
+ if (connect(s, rp->ai_addr, (socklen_t) rp->ai_addrlen)
!= SOCKET_ERROR)
break; /* success */
closesocket(s);
}
@@ -209,7 +209,7 @@ main(int argc, char **argv)
exit(1);
}
- if (connect(s, serv, sizeof(server)) < 0) {
+ if (connect(s, serv, sizeof(server)) == SOCKET_ERROR) {
fprintf(stderr,
"initiating connection on socket failed: %s\n",
strerror(errno));
@@ -242,7 +242,7 @@ main(int argc, char **argv)
length = (SOCKLEN) sizeof(server);
server.sin_port = htons((unsigned short) ((port) & 0xFFFF));
- if (bind(sock, (SOCKPTR) &server, length) < 0) {
+ if (bind(sock, (SOCKPTR) &server, length) == SOCKET_ERROR) {
fprintf(stderr, "bind to port %d failed: %s\n",
port, strerror(errno));
exit(1);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list