Changeset: a813ea1f21b3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a813ea1f21b3 Modified Files: .hgtags MonetDB.spec NT/installer32/MonetDB-ODBC-Installer.vdproj NT/installer32/MonetDB5-Geom-Module.vdproj NT/installer32/MonetDB5-SQL-Installer.vdproj NT/installer64/MonetDB-ODBC-Installer.vdproj NT/installer64/MonetDB5-Geom-Module.vdproj NT/installer64/MonetDB5-SQL-Installer.vdproj NT/monetdb_config.h.in NT/rules.msc clients/R/MonetDB.R/DESCRIPTION clients/R/MonetDB.R/R/monetdb.R clients/R/MonetDB.R/src/mapi.c clients/mapiclient/tomograph.c clients/mapilib/mapi.rc clients/odbc/driver/driver.rc clients/odbc/winsetup/setup.rc clients/python2/setup.py clients/python3/setup.py configure.ag debian/changelog gdk/gdk_batop.c gdk/gdk_select.c gdk/libbat.rc libversions monetdb5/mal/mal_dataflow.c monetdb5/modules/mal/mat.c monetdb5/modules/mal/tablet.c monetdb5/tools/libmonetdb5.rc vertoo.data Branch: mutation Log Message:
Merge with default diffs (truncated from 468 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -534,3 +534,6 @@ 508d02b1f9bf8bac7a86664b092000dd3fd20824 64caf95db680ce67235697114693cbcf4cc859eb fixed_strict_Windows_compilation 0ee7e3f578f7ed364682cae20edac923c27dfd86 Feb2013_13 89679ea95aac8f548c787cd74c35212137f5b56f Feb2013_SP4_release +e4239a86f8032fd67169ddf4bcea6f37f32a0f8b Feb2013_15 +89679ea95aac8f548c787cd74c35212137f5b56f Feb2013_SP4_release +11955d7a07f23672650e41dd0c9fbc9e0fc4c1af Feb2013_SP4_release diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -755,6 +755,9 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/Maddlog rm -fr $RPM_BUILD_ROOT %changelog +* Wed Sep 25 2013 Sjoerd Mullender <sjo...@acm.org> - 11.15.15-20130925 +- Rebuilt. + * Fri Sep 20 2013 Sjoerd Mullender <sjo...@acm.org> - 11.15.13-20130920 - Rebuilt. 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,10 +1,10 @@ Package: MonetDB.R Version: 0.8.0 -Date: 2013-09-17 +Date: 2013-09-25 Title: Connect MonetDB to R -Authors@R: c(person("Hannes Muehleisen", "Developer", role = c("aut", "cre"),email = "han...@cwi.nl"), - person("Thomas Lumley", "Contributor", role = "ctb"), - person("Anthony Damico", "Contributor", role = "ctb")) +Authors@R: c(person("Hannes Muehleisen", role = c("aut", "cre"),email = "han...@cwi.nl"), + person("Thomas Lumley", role = "ctb"), + person("Anthony Damico", role = "ctb")) Depends: DBI (>= 0.2-5), digest (>= 0.6.0), methods, utils, stats Description: Allows to pull data from MonetDB into R License: MPL (== 1.1) 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 @@ -38,7 +38,10 @@ mc <- function(dbname="demo", user="mone dbConnect(MonetDB.R(),dbname,user,password,host,port,timeout,wait,...) } -setMethod("dbConnect", "MonetDBDriver", def=function(drv,dbname="demo", user="monetdb", password="monetdb", host="localhost",port=50000, timeout=86400, wait=FALSE,...) { +setMethod("dbConnect", "MonetDBDriver", def=function(drv,dbname="demo", user="monetdb", password="monetdb", host="localhost",port=50000, timeout=86400, wait=FALSE,...,url="") { + if (substring(url,1,10) == "monetdb://") { + dbname <- url + } if (substring(dbname,1,10) == "monetdb://") { #warning("MonetDB.R: Using 'monetdb://...' URIs in dbConnect() is deprecated. Please switch to dbname, host, port named arguments.") rest <- substring(dbname,11,nchar(dbname)) @@ -569,7 +572,7 @@ REPLY_SIZE <- 100 # Apparently, -1 me .mapiCleanup <- function(conObj) { if (conObj@connenv$lock > 0) { - cat("II: Interrupted query execution. Beware that a long-running query in the MonetDB server is NOT affected by this, so please consider restarting the server & reopen the connection.\n") + if (DEBUG_QUERY) cat("II: Interrupted query execution.\n") conObj@connenv$lock <- 0 } } 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 @@ -6,6 +6,7 @@ #ifdef __WIN32__ #include <winsock2.h> #include <ws2tcpip.h> +#undef ERROR #else #include <sys/socket.h> #include <netinet/in.h> @@ -32,17 +33,29 @@ static SEXP MAPI_type_tag; #define CHECK_MAPI_SOCK(s) do { \ if (TYPEOF(s) != EXTPTRSXP || \ - R_ExternalPtrTag(s) != MAPI_type_tag) \ - error("bad socket"); \ + R_ExternalPtrTag(s) != MAPI_type_tag || \ + EXTPTR_PTR(s) == NULL) \ + error("Socket was either not successfully connected or is already closed. Either way, it cannot be used."); \ } while (0) SEXP mapiInit(void) { MAPI_type_tag = install("MAPI_TYPE_TAG"); +#ifdef __WIN32__ + // I will not even TRY to understand why this is required + WSADATA wsaData; + int iResult = WSAStartup(MAKEWORD(2, 2), &wsaData); + if (iResult != 0) { + error("WSAStartup failed: %d", iResult); + } +#endif return R_NilValue; } SEXP mapiDisconnect(SEXP conn) { - CHECK_MAPI_SOCK(conn); + if (TYPEOF(conn) != EXTPTRSXP || R_ExternalPtrTag(conn) != MAPI_type_tag) { + warning("trying to disconnect from a non-socket."); + return R_NilValue; + } SOCKET *sock = R_ExternalPtrAddr(conn); if (sock != NULL) { shutdown(*sock, 2); @@ -74,14 +87,6 @@ SEXP mapiConnect(SEXP host, SEXP port, S struct addrinfo hints; struct addrinfo *result, *rp; -#ifdef __WIN32__ - // I will not even TRY to understand why this is required - WSADATA wsaData; - int iResult = WSAStartup(MAKEWORD(2, 2), &wsaData); - if (iResult != 0) { - error("WSAStartup failed: %d", iResult); - } -#endif // send/receive timeouts for socket #ifdef __WIN32__ @@ -122,8 +127,8 @@ SEXP mapiConnect(SEXP host, SEXP port, S // lets have a 1M buffer on this socket, ok? int recvbuf_size = ALLOCSIZE; - if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &recvbuf_size, - sizeof(recvbuf_size))) { + if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, + (const char *) &recvbuf_size, sizeof(recvbuf_size))) { error("setsockopt failed"); } if (connect(sock, rp->ai_addr, rp->ai_addrlen) != -1) { @@ -234,7 +239,7 @@ SEXP mapiRead(SEXP conn) { response_buf_len += ALLOCSIZE; if (DEBUG) { printf("II: Reallocating memory, new size %lu\n", - response_buf_len); + (unsigned long) response_buf_len); } response_buf = realloc(response_buf, response_buf_len); if (response_buf == NULL) { @@ -254,7 +259,7 @@ SEXP mapiRead(SEXP conn) { 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); + warning("Removed a NULL character from response at offset %lu of %lu",(unsigned long) i,(unsigned long) response_buf_offset); response_buf[i] = '\t'; } } @@ -314,6 +319,7 @@ SEXP mapiWrite(SEXP conn, SEXP message) } SEXP mapiRequest(SEXP conn, SEXP message) { + CHECK_MAPI_SOCK(conn); mapiWrite(conn, message); return (mapiRead(conn)); } diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c --- a/clients/mapiclient/tomograph.c +++ b/clients/mapiclient/tomograph.c @@ -793,7 +793,7 @@ static void dumpboxes(void) //fprintf(f,""LLFMT" %f 0 0 \n", box[i].clkstart, (box[i].memstart/1024.0)); fprintf(f, ""LLFMT" %f %f 0 0\n", box[i].clkend, (box[i].memend / 1024.0), box[i].footend/1024.0); } else - if (box[i].state == PING) { + if (box[i].state >= PING) { /* cpu stat events may arrive out of order, drop those */ if ( box[i].clkstart <= e) continue; diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +monetdb (11.15.15-20130925) unstable; urgency=low + + * Rebuilt. + + -- Sjoerd Mullender <sjo...@acm.org> Wed, 25 Sep 2013 14:02:36 +0200 + monetdb (11.15.13-20130920) unstable; urgency=low * Rebuilt. diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -2247,8 +2247,8 @@ BATmergecand(BAT *a, BAT *b) BATcheck(b, "BATmergecand"); assert(a->htype == TYPE_void); assert(b->htype == TYPE_void); - assert(ATOMtype(a->htype) == TYPE_oid); - assert(ATOMtype(b->htype) == TYPE_oid); + assert(ATOMtype(a->ttype) == TYPE_oid); + assert(ATOMtype(b->ttype) == TYPE_oid); assert(BATcount(a) <= 1 || a->tsorted); assert(BATcount(b) <= 1 || b->tsorted); assert(BATcount(a) <= 1 || a->tkey); @@ -2256,7 +2256,13 @@ BATmergecand(BAT *a, BAT *b) assert(a->T->nonil); assert(b->T->nonil); - /* XXX we could return a if b is empty (and v.v.) */ + /* we could return a if b is empty (and v.v.) */ + if ( BATcount(a) == 0){ + return BATcopy(b, b->htype, b->ttype, 0); + } + if ( BATcount(b) == 0){ + return BATcopy(a, a->htype, a->ttype, 0); + } bn = BATnew(TYPE_void, TYPE_oid, BATcount(a) + BATcount(b)); if (bn == NULL) @@ -2344,8 +2350,8 @@ BATintersectcand(BAT *a, BAT *b) BATcheck(b, "BATintersectcand"); assert(a->htype == TYPE_void); assert(b->htype == TYPE_void); - assert(ATOMtype(a->htype) == TYPE_oid); - assert(ATOMtype(b->htype) == TYPE_oid); + assert(ATOMtype(a->ttype) == TYPE_oid); + assert(ATOMtype(b->ttype) == TYPE_oid); assert(a->tsorted); assert(b->tsorted); assert(a->tkey); diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c --- a/gdk/gdk_select.c +++ b/gdk/gdk_select.c @@ -183,11 +183,11 @@ BAT_hashselect(BAT *b, BAT *s, BAT *bn, /* inner check */ #define impscheck(CAND,TEST,ADD) \ do { \ - e = i+limit-pr_off; \ + e = (BUN) (i+limit-pr_off+off); \ if (im[icnt] & mask) { \ if ((im[icnt] & ~innermask) == 0) { \ while (o < e && p < q) { \ - v = src[o]; \ + v = src[o-off]; \ ADD; \ cnt++; \ p++; \ @@ -195,7 +195,7 @@ do { \ } \ } else { \ while (o < e && p < q) { \ - v = src[o]; \ + v = src[o-off]; \ ADD; \ cnt += (TEST); \ p++; \ @@ -223,24 +223,24 @@ do { \ bte rpp = ATOMelmshift(IMPS_PAGE >> b->T->shift); \ CAND; \ for (i=0, dcnt=0, icnt=0; \ - (dcnt < imprints->dictcnt) && (i < w+pr_off); \ + (dcnt < imprints->dictcnt) && (i+off < w+pr_off); \ dcnt++) { \ limit = ((BUN) d[dcnt].cnt) << rpp; \ - while ((i+limit) <= (o+pr_off)) { \ + while ((i+limit+off) <= (o+pr_off)) { \ i += limit; \ icnt += d[dcnt].repeat?1:d[dcnt].cnt; \ dcnt++; \ limit = ((BUN) d[dcnt].cnt) << rpp; \ } \ if (!d[dcnt].repeat) { \ - limit = (BUN) 1 << rpp; \ + limit = (BUN) 1 << rpp; \ l = icnt + d[dcnt].cnt; \ - while (i+limit <= (o+pr_off)) { \ + while ((i+limit+off) <= (o+pr_off)) { \ icnt++; \ i += limit; \ } \ for (; \ - icnt < l && (i < w+pr_off); \ + icnt < l && (i+off < w+pr_off); \ icnt++) { \ impscheck(CAND,TEST,ADD); \ i += limit; \ @@ -278,12 +278,12 @@ do { \ \ if (BATcapacity(bn) < maximum) { \ impsloop(CAND, TEST, \ - buninsfix(bn, T, dst, cnt, oid, (oid)(o + off), \ + buninsfix(bn, T, dst, cnt, oid, (oid)(o), \ (BUN) ((dbl) cnt / (dbl) (p-r) \ * (dbl) (q-p) * 1.1 + 1024), \ BATcapacity(bn) + q - p, BUN_NONE)); \ } else { \ - impsloop(CAND, TEST, dst[cnt] = (oid)(o + off)); \ + impsloop(CAND, TEST, dst[cnt] = (oid)(o)); \ } \ } while (0) @@ -316,8 +316,8 @@ do { \ if (BATcapacity(bn) < maximum) { \ while (p < q) { \ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list