MonetDB: default - Merge with Jun2010 branch.
Changeset: 5c61b9a88aed for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5c61b9a88aed Modified Files: Branch: default Log Message: Merge with Jun2010 branch. diffs (21 lines): diff -r 5e0449357195 -r 5c61b9a88aed sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err --- a/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Thu Jul 22 15:42:33 2010 +0200 +++ b/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Thu Jul 22 16:28:40 2010 +0200 @@ -71,13 +71,13 @@ # 13:12:55 > mclient -lsql -ftest -i -e --host=rig --port=39884 # 13:12:55 > -MAPI = mone...@alviss:32394 +MAPI = mone...@alviss:31044 QUERY = connect to default; ERROR = !CONNECT TO: DEFAULT is not supported! -MAPI = mone...@alviss:32394 +MAPI = mone...@alviss:31044 QUERY = connect to 'whatever' port 50001 database 'nonexisting' USER 'monetdb' PASSWORD 'monetdb' LANGUAGE 'mal'; -ERROR = !IOException:mapi.connect:Could not connect: gethostbyname failed: Unknown host -MAPI = mone...@alviss:32394 +ERROR = !IOException:mapi.connect:Could not connect: getaddrinfo failed: Name or service not known +MAPI = mone...@alviss:31044 QUERY = disconnect 'whatever'; ERROR = !DISCONNECT CATALOG: no such db_alias 'whatever' ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jun2010 - We now use getaddrinfo instead of gethostbyname
Changeset: 7a04c0a336d5 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a04c0a336d5 Modified Files: sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Branch: Jun2010 Log Message: We now use getaddrinfo instead of gethostbyname diffs (21 lines): diff -r f512da3fc35e -r 7a04c0a336d5 sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err --- a/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Thu Jul 22 15:41:58 2010 +0200 +++ b/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Thu Jul 22 16:08:22 2010 +0200 @@ -71,13 +71,13 @@ # 13:12:55 > mclient -lsql -ftest -i -e --host=rig --port=39884 # 13:12:55 > -MAPI = mone...@alviss:32394 +MAPI = mone...@alviss:31044 QUERY = connect to default; ERROR = !CONNECT TO: DEFAULT is not supported! -MAPI = mone...@alviss:32394 +MAPI = mone...@alviss:31044 QUERY = connect to 'whatever' port 50001 database 'nonexisting' USER 'monetdb' PASSWORD 'monetdb' LANGUAGE 'mal'; -ERROR = !IOException:mapi.connect:Could not connect: gethostbyname failed: Unknown host -MAPI = mone...@alviss:32394 +ERROR = !IOException:mapi.connect:Could not connect: getaddrinfo failed: Name or service not known +MAPI = mone...@alviss:31044 QUERY = disconnect 'whatever'; ERROR = !DISCONNECT CATALOG: no such db_alias 'whatever' ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2010 branch.
Changeset: 5e0449357195 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5e0449357195 Modified Files: buildtools/conf/MonetDB.m4 Branch: default Log Message: Merge with Jun2010 branch. diffs (154 lines): diff -r 6c53ea638a80 -r 5e0449357195 buildtools/conf/MonetDB.m4 --- a/buildtools/conf/MonetDB.m4Thu Jul 22 14:04:34 2010 +0200 +++ b/buildtools/conf/MonetDB.m4Thu Jul 22 15:42:33 2010 +0200 @@ -1240,7 +1240,7 @@ AC_C_CHAR_UNSIGNED # Checks for library functions. -AC_CHECK_FUNCS([ftruncate gettimeofday opendir sysconf times]) +AC_CHECK_FUNCS([ftruncate getaddrinfo gettimeofday opendir sysconf times]) AC_CHECK_FUNCS([madvise posix_fadvise posix_madvise]) dnl gdk_posix.mx AC_FUNC_FSEEKO() diff -r 6c53ea638a80 -r 5e0449357195 buildtools/conf/winconfig.h --- a/buildtools/conf/winconfig.h Thu Jul 22 14:04:34 2010 +0200 +++ b/buildtools/conf/winconfig.h Thu Jul 22 15:42:33 2010 +0200 @@ -54,6 +54,7 @@ #include #include #include +#include /* Release name or "unreleased" */ #define MONETDB_RELEASE "unreleased" @@ -163,6 +164,9 @@ /* Does your compiler support function attributes (__attribute__)? */ /* #undef HAVE_FUNCTION_ATTRIBUTES */ +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + /* Define to 1 if you have the `getlogin' function. */ /* #undef HAVE_GETLOGIN */ diff -r 6c53ea638a80 -r 5e0449357195 buildtools/conf/winrules.msc --- a/buildtools/conf/winrules.msc Thu Jul 22 14:04:34 2010 +0200 +++ b/buildtools/conf/winrules.msc Thu Jul 22 15:42:33 2010 +0200 @@ -222,7 +222,7 @@ LIBC_INCS = $(PTHREAD_INCS) MATH_LIBS = -SOCKET_LIBS = wsock32.lib +SOCKET_LIBS = wsock32.lib Ws2_32.lib MEL=mel.exe MX=Mx.exe diff -r 6c53ea638a80 -r 5e0449357195 clients/src/mapilib/Mapi.mx --- a/clients/src/mapilib/Mapi.mx Thu Jul 22 14:04:34 2010 +0200 +++ b/clients/src/mapilib/Mapi.mx Thu Jul 22 15:42:33 2010 +0200 @@ -2329,13 +2329,6 @@ static MapiMsg connect_to_server(Mapi mid) { - struct sockaddr_in server; - -#ifdef HAVE_SYS_UN_H - struct sockaddr_un userver; -#endif - struct sockaddr *serv; - socklen_t servsize; SOCKET s; char errbuf[8096]; @@ -2355,6 +2348,8 @@ struct msghdr msg; struct iovec vec; char buf[1]; + struct sockaddr_un userver; + struct sockaddr *serv = (struct sockaddr *) &userver; if (strlen(mid->hostname) >= sizeof(userver.sun_path)) { return mapi_setError(mid, "path name too long", "mapi_reconnect", MERROR); @@ -2368,11 +2363,9 @@ memset(&userver, 0, sizeof(struct sockaddr_un)); userver.sun_family = AF_UNIX; strncpy(userver.sun_path, mid->hostname, sizeof(userver.sun_path)); - serv = (struct sockaddr *) &userver; - servsize = sizeof(struct sockaddr_un); s = socket(PF_UNIX, SOCK_STREAM, 0); - if (connect(s, serv, servsize) < 0) { + if (connect(s, serv, sizeof(struct sockaddr_un)) < 0) { snprintf(errbuf, sizeof(errbuf), "initiating connection on socket failed: %s", strerror(errno)); @@ -2399,7 +2392,39 @@ } else #endif { +#ifdef HAVE_GETADDRINFO + struct addrinfo hints, *res, *rp; + char port[32]; + int ret; + + if (mid->hostname == NULL) + mid->hostname = strdup("localhost"); + snprintf(port, sizeof(port), "%d", mid->port & 0x); + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + ret = getaddrinfo(mid->hostname, port, &hints, &res); + if (ret) { + snprintf(errbuf, sizeof(errbuf), "getaddrinfo failed: %s", gai_strerror(ret)); + return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); + } + for (rp = res; rp; rp = rp->ai_next) { + s = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); + if (s == INVALID_SOCKET) + continue; + if (connect(s, rp->ai_addr, rp->ai_addrlen) != -1) + break; /* success */ + close(s); + } + freeaddrinfo(res); + if (rp == NULL) + return mapi_setError(mid, "could not connect", "mapi_reconnect", MERROR); +#else + struct sockaddr_in server; struct hostent *hp; + struct sockaddr *serv = (struct sockaddr *) &server; if (mid->hostname == NUL
MonetDB: Jun2010 - Add some quotes.
Changeset: f512da3fc35e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f512da3fc35e Modified Files: testing/src/Mtest.py.bat Branch: Jun2010 Log Message: Add some quotes. diffs (6 lines): diff -r eb4fa2b0c526 -r f512da3fc35e testing/src/Mtest.py.bat --- a/testing/src/Mtest.py.bat Thu Jul 22 15:41:17 2010 +0200 +++ b/testing/src/Mtest.py.bat Thu Jul 22 15:41:58 2010 +0200 @@ -1,1 +1,1 @@ -...@python %~dpn0 %* +...@python "%~dpn0" %* ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jun2010 - Get getaddrinfo changes to compile on Windows.
Changeset: eb4fa2b0c526 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eb4fa2b0c526 Modified Files: buildtools/conf/winconfig.h buildtools/conf/winrules.msc Branch: Jun2010 Log Message: Get getaddrinfo changes to compile on Windows. diffs (23 lines): diff -r b4c2ba1de3ed -r eb4fa2b0c526 buildtools/conf/winconfig.h --- a/buildtools/conf/winconfig.h Thu Jul 22 15:32:27 2010 +0200 +++ b/buildtools/conf/winconfig.h Thu Jul 22 15:41:17 2010 +0200 @@ -54,6 +54,7 @@ #include #include #include +#include /* Release name or "unreleased" */ #define MONETDB_RELEASE "unreleased" diff -r b4c2ba1de3ed -r eb4fa2b0c526 buildtools/conf/winrules.msc --- a/buildtools/conf/winrules.msc Thu Jul 22 15:32:27 2010 +0200 +++ b/buildtools/conf/winrules.msc Thu Jul 22 15:41:17 2010 +0200 @@ -222,7 +222,7 @@ LIBC_INCS = $(PTHREAD_INCS) MATH_LIBS = -SOCKET_LIBS = wsock32.lib +SOCKET_LIBS = wsock32.lib Ws2_32.lib MEL=mel.exe MX=Mx.exe ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jun2010 - Use getaddrinfo instead of gethostbyname on s...
Changeset: b4c2ba1de3ed for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b4c2ba1de3ed Modified Files: buildtools/conf/MonetDB.m4 buildtools/conf/winconfig.h clients/src/mapilib/Mapi.mx Branch: Jun2010 Log Message: Use getaddrinfo instead of gethostbyname on systems where it exists. diffs (128 lines): diff -r 66056044b27f -r b4c2ba1de3ed buildtools/conf/MonetDB.m4 --- a/buildtools/conf/MonetDB.m4Thu Jul 22 13:44:40 2010 +0200 +++ b/buildtools/conf/MonetDB.m4Thu Jul 22 15:32:27 2010 +0200 @@ -1240,7 +1240,7 @@ AC_C_CHAR_UNSIGNED # Checks for library functions. -AC_CHECK_FUNCS([ftruncate gettimeofday opendir sysconf times]) +AC_CHECK_FUNCS([ftruncate getaddrinfo gettimeofday opendir sysconf times]) AC_CHECK_FUNCS([madvise posix_fadvise posix_madvise]) dnl gdk_posix.mx AC_FUNC_FSEEKO() diff -r 66056044b27f -r b4c2ba1de3ed buildtools/conf/winconfig.h --- a/buildtools/conf/winconfig.h Thu Jul 22 13:44:40 2010 +0200 +++ b/buildtools/conf/winconfig.h Thu Jul 22 15:32:27 2010 +0200 @@ -163,6 +163,9 @@ /* Does your compiler support function attributes (__attribute__)? */ /* #undef HAVE_FUNCTION_ATTRIBUTES */ +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + /* Define to 1 if you have the `getlogin' function. */ /* #undef HAVE_GETLOGIN */ diff -r 66056044b27f -r b4c2ba1de3ed clients/src/mapilib/Mapi.mx --- a/clients/src/mapilib/Mapi.mx Thu Jul 22 13:44:40 2010 +0200 +++ b/clients/src/mapilib/Mapi.mx Thu Jul 22 15:32:27 2010 +0200 @@ -2329,13 +2329,6 @@ static MapiMsg connect_to_server(Mapi mid) { - struct sockaddr_in server; - -#ifdef HAVE_SYS_UN_H - struct sockaddr_un userver; -#endif - struct sockaddr *serv; - socklen_t servsize; SOCKET s; char errbuf[8096]; @@ -2355,6 +2348,8 @@ struct msghdr msg; struct iovec vec; char buf[1]; + struct sockaddr_un userver; + struct sockaddr *serv = (struct sockaddr *) &userver; if (strlen(mid->hostname) >= sizeof(userver.sun_path)) { return mapi_setError(mid, "path name too long", "mapi_reconnect", MERROR); @@ -2368,11 +2363,9 @@ memset(&userver, 0, sizeof(struct sockaddr_un)); userver.sun_family = AF_UNIX; strncpy(userver.sun_path, mid->hostname, sizeof(userver.sun_path)); - serv = (struct sockaddr *) &userver; - servsize = sizeof(struct sockaddr_un); s = socket(PF_UNIX, SOCK_STREAM, 0); - if (connect(s, serv, servsize) < 0) { + if (connect(s, serv, sizeof(struct sockaddr_un)) < 0) { snprintf(errbuf, sizeof(errbuf), "initiating connection on socket failed: %s", strerror(errno)); @@ -2399,7 +2392,39 @@ } else #endif { +#ifdef HAVE_GETADDRINFO + struct addrinfo hints, *res, *rp; + char port[32]; + int ret; + + if (mid->hostname == NULL) + mid->hostname = strdup("localhost"); + snprintf(port, sizeof(port), "%d", mid->port & 0x); + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + ret = getaddrinfo(mid->hostname, port, &hints, &res); + if (ret) { + snprintf(errbuf, sizeof(errbuf), "getaddrinfo failed: %s", gai_strerror(ret)); + return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); + } + for (rp = res; rp; rp = rp->ai_next) { + s = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); + if (s == INVALID_SOCKET) + continue; + if (connect(s, rp->ai_addr, rp->ai_addrlen) != -1) + break; /* success */ + close(s); + } + freeaddrinfo(res); + if (rp == NULL) + return mapi_setError(mid, "could not connect", "mapi_reconnect", MERROR); +#else + struct sockaddr_in server; struct hostent *hp; + struct sockaddr *serv = (struct sockaddr *) &server; if (mid->hostname == NULL) mid->hostname = strdup("localhost"); @@ -2412,8 +2437,6 @@ memcpy(&server.sin_addr, hp->h_addr_list[0], hp->h_length); server.sin_family = hp->h_addrtype; server.sin_port = htons((unsigned short) (mid->port & 0x)); - serv = (struct sockaddr *) &server; - servsize = sizeof(server)
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
On 2010-07-22 14:50, Romulo Goncalves wrote: > please check the man page of gethostbyname, first. > > It only mentions h_errno, but does not mention errno. > > It also says: > " > The *(obsolete)* herror() function prints the error message associated > with the current value of h_errno on stderr. > > The *(obsolete)* hstrerror() function takes an error number (typically > h_errno) and returns the corresponding message string. > " > > Hence, I'm not sure how portable these "obsolete" functions are ... > > But then, it also says > " > POSIX.1-2008 removes the specifications of gethostbyname(), gethost- > byaddr(), and h_errno, recommending the use of getaddrinfo(3) and > getnameinfo(3) instead. > " > > Hence, even gethostbyname() itself might eventually disappear ... > > Stefan > > Ok. > > Lets clean the code. > I did not write this code, so I am still trying to understand all the code. > > Here, I use gai_strerror to print the error. The new error message is > *Name or service not known*, instead of, *Unknown host*. > > I had the following extension to test my code: > connect to 'localhost' port 55000 database 'demo' USER 'monetdb' > PASSWORD 'monetdb' LANGUAGE 'sql'; > disconnect 'localhost_demo_monetdb'; > > And it works. > > > To avoid more check ins and complains I want green light for the > following code: You're not getting it. ;-) In case HAVE_SYS_UN_H is not defined (Windows), you'll probably get errors about unused variables (serv and servize). Move those to where userver is declared. I also don't like the way you assign the port. I'd rather you use char port[32]; snprintf(buf, sizeof(port), miod->port); and use port instead of NULL in the call to getaddrinfo. Then you don't have to assign the port anymore. Furthermore, if you look at the example in the getaddrinfo manual page, you'll see that it uses a loop to connect. This is because the function can return multiple results, and the first one doesn't necessarily work, so you have to try them all. You should do that too. Also fix your indents. Use tabs. > > [gonca...@alviss mapilib]$ hg diff > diff -r f9af81c7874b clients/src/mapilib/Mapi.mx > --- a/clients/src/mapilib/Mapi.mxThu Jul 22 13:18:20 2010 +0200 > +++ b/clients/src/mapilib/Mapi.mxThu Jul 22 14:47:58 2010 +0200 > @@ -2329,8 +2329,6 @@ > static MapiMsg > connect_to_server(Mapi mid) > { > -struct sockaddr_in server; > - > #ifdef HAVE_SYS_UN_H > struct sockaddr_un userver; > #endif > @@ -2399,29 +2397,28 @@ > } else > #endif > { > -struct hostent *hp; > +struct addrinfo hints, *res; > +int err; > > if (mid->hostname == NULL) > mid->hostname = strdup("localhost"); > - > -if ((hp = gethostbyname(mid->hostname)) == NULL) { > -snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: > %s", errno ? strerror(errno) : hstrerror(h_errno)); > +memset(&hints, 0, sizeof(hints)); > + hints.ai_socktype = SOCK_STREAM; > +hints.ai_protocol = IPPROTO_TCP; > + > +if ((err = getaddrinfo(mid->hostname,NULL,&hints, &res)) != 0) { > +snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: > %s", gai_strerror(err)); > return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); > } > -memset(&server, 0, sizeof(server)); > -memcpy(&server.sin_addr, hp->h_addr_list[0], hp->h_length); > -server.sin_family = hp->h_addrtype; > -server.sin_port = htons((unsigned short) (mid->port & 0x)); > -serv = (struct sockaddr *) &server; > -servsize = sizeof(server); > -s = socket(server.sin_family, SOCK_STREAM, IPPROTO_TCP); > +((struct sockaddr_in*)res->ai_addr)->sin_port = htons((unsigned > short) (mid->port & 0x)); > +s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); > > if (s == INVALID_SOCKET) { > snprintf(errbuf, sizeof(errbuf), "opening socket failed: > %s", strerror(errno)); > return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); > } > > -if (connect(s, serv, servsize) < 0) { > +if (connect(s, res->ai_addr, res->ai_addrlen) < 0) { > snprintf(errbuf, sizeof(errbuf), > "initiating connection on socket failed: %s", > strerror(errno)); > > > Regards, > Romulo > ___ > Checkin-list mailing list > Checkin-list@monetdb.org > http://mail.monetdb.org/mailman/listinfo/checkin-list -- Sjoerd Mullender signature.asc Description: OpenPGP digital signature ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
Well, fine by my, if it compiles & works on all platforms (that we support), incl. Windows ... We could also consider replacing gethostbyname only in the default development branch (and then consistently all its occurrences in the entire MonetDB code base), and patch the Jun2010 branch as follows, instead: - add a configure check (and respective Windows defines) for hstrerror, and patch the code as follows: diff -r 66056044b27f clients/src/mapilib/Mapi.mx --- a/clients/src/mapilib/Mapi.mx Thu Jul 22 13:44:40 2010 +0200 +++ b/clients/src/mapilib/Mapi.mx Thu Jul 22 15:08:22 2010 +0200 @@ -2404,8 +2404,17 @@ if (mid->hostname == NULL) mid->hostname = strdup("localhost"); + errno = 0; if ((hp = gethostbyname(mid->hostname)) == NULL) { - snprintf(errbuf, sizeof(errbuf), "gethostbyname - failed: %s", errno ? strerror(errno) : hstrerror(h_errno)); + snprintf(errbuf, sizeof(errbuf), "gethostbyname - failed with (h_)errno %d: %s", +errno ? errno : h_errno, +errno ? strerror(errno) : +#ifdef HAVE_HSTRERROR +hstrerror(h_errno) +#else +"(unknown)" +#endif + ); return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); } memset(&server, 0, sizeof(server)); ... other occurrences of gethostbyname() (and its error handling) in the entire MonetDB code base should be check and fixed llikewise ... Stefan On Thu, Jul 22, 2010 at 02:50:08PM +0200, Romulo Goncalves wrote: > > Ok. > > Lets clean the code. > I did not write this code, so I am still trying to understand all the code. > > Here, I use gai_strerror to print the error. The new error message is > *Name or service not known*, instead of, *Unknown host*. > > I had the following extension to test my code: > connect to 'localhost' port 55000 database 'demo' USER 'monetdb' PASSWORD > 'monetdb' LANGUAGE 'sql'; > disconnect 'localhost_demo_monetdb'; > > And it works. > > > To avoid more check ins and complains I want green light for the following > code: > > [gonca...@alviss mapilib]$ hg diff > diff -r f9af81c7874b clients/src/mapilib/Mapi.mx > --- a/clients/src/mapilib/Mapi.mx Thu Jul 22 13:18:20 2010 +0200 > +++ b/clients/src/mapilib/Mapi.mx Thu Jul 22 14:47:58 2010 +0200 > @@ -2329,8 +2329,6 @@ > static MapiMsg > connect_to_server(Mapi mid) > { > - struct sockaddr_in server; > - > #ifdef HAVE_SYS_UN_H > struct sockaddr_un userver; > #endif > @@ -2399,29 +2397,28 @@ > } else > #endif > { > - struct hostent *hp; > + struct addrinfo hints, *res; > + int err; > > if (mid->hostname == NULL) > mid->hostname = strdup("localhost"); > - > - if ((hp = gethostbyname(mid->hostname)) == NULL) { > - snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: > %s", errno ? strerror(errno) : hstrerror(h_errno)); > + memset(&hints, 0, sizeof(hints)); > + hints.ai_socktype = SOCK_STREAM; > + hints.ai_protocol = IPPROTO_TCP; > + > + if ((err = getaddrinfo(mid->hostname,NULL,&hints, &res)) != 0) { > + snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: > %s", gai_strerror(err)); > return mapi_setError(mid, errbuf, "mapi_reconnect", > MERROR); > } > - memset(&server, 0, sizeof(server)); > - memcpy(&server.sin_addr, hp->h_addr_list[0], hp->h_length); > - server.sin_family = hp->h_addrtype; > - server.sin_port = htons((unsigned short) (mid->port & 0x)); > - serv = (struct sockaddr *) &server; > - servsize = sizeof(server); > - s = socket(server.sin_family, SOCK_STREAM, IPPROTO_TCP); > + ((struct sockaddr_in*)res->ai_addr)->sin_port = htons((unsigned > short) (mid->port & 0x)); > + s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); > > if (s == INVALID_SOCKET) { > snprintf(errbuf, sizeof(errbuf), "opening socket > failed: %s", strerror(errno)); > return mapi_setError(mid, errbuf, "mapi_reconnect", > MERROR); > } > > - if (connect(s, serv, servsize) < 0) { > + if (connect(s, res->ai_addr, res->ai_addrlen) < 0) { > snprintf(errbuf, sizeof(errbuf), >"initiating connection on socket failed: %s", >strerror(errno)); > > > Regards, > Romulo > ___ > Checkin-list mailing list > Checkin-list@monetdb.org > http://mail
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
please check the man page of gethostbyname, first. It only mentions h_errno, but does not mention errno. It also says: " The *(obsolete)* herror() function prints the error message associated with the current value of h_errno on stderr. The *(obsolete)* hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string. " Hence, I'm not sure how portable these "obsolete" functions are ... But then, it also says " POSIX.1-2008 removes the specifications of gethostbyname(), gethost- byaddr(), and h_errno, recommending the use of getaddrinfo(3) and getnameinfo(3) instead. " Hence, even gethostbyname() itself might eventually disappear ... Stefan Ok. Lets clean the code. I did not write this code, so I am still trying to understand all the code. Here, I use gai_strerror to print the error. The new error message is *Name or service not known*, instead of, *Unknown host*. I had the following extension to test my code: connect to 'localhost' port 55000 database 'demo' USER 'monetdb' PASSWORD 'monetdb' LANGUAGE 'sql'; disconnect 'localhost_demo_monetdb'; And it works. To avoid more check ins and complains I want green light for the following code: [gonca...@alviss mapilib]$ hg diff diff -r f9af81c7874b clients/src/mapilib/Mapi.mx --- a/clients/src/mapilib/Mapi.mx Thu Jul 22 13:18:20 2010 +0200 +++ b/clients/src/mapilib/Mapi.mx Thu Jul 22 14:47:58 2010 +0200 @@ -2329,8 +2329,6 @@ static MapiMsg connect_to_server(Mapi mid) { - struct sockaddr_in server; - #ifdef HAVE_SYS_UN_H struct sockaddr_un userver; #endif @@ -2399,29 +2397,28 @@ } else #endif { - struct hostent *hp; + struct addrinfo hints, *res; + int err; if (mid->hostname == NULL) mid->hostname = strdup("localhost"); - - if ((hp = gethostbyname(mid->hostname)) == NULL) { - snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", errno ? strerror(errno) : hstrerror(h_errno)); + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + + if ((err = getaddrinfo(mid->hostname,NULL,&hints, &res)) != 0) { + snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", gai_strerror(err)); return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); } - memset(&server, 0, sizeof(server)); - memcpy(&server.sin_addr, hp->h_addr_list[0], hp->h_length); - server.sin_family = hp->h_addrtype; - server.sin_port = htons((unsigned short) (mid->port & 0x)); - serv = (struct sockaddr *) &server; - servsize = sizeof(server); - s = socket(server.sin_family, SOCK_STREAM, IPPROTO_TCP); + ((struct sockaddr_in*)res->ai_addr)->sin_port = htons((unsigned short) (mid->port & 0x)); + s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (s == INVALID_SOCKET) { snprintf(errbuf, sizeof(errbuf), "opening socket failed: %s", strerror(errno)); return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); } - if (connect(s, serv, servsize) < 0) { + if (connect(s, res->ai_addr, res->ai_addrlen) < 0) { snprintf(errbuf, sizeof(errbuf), "initiating connection on socket failed: %s", strerror(errno)); Regards, Romulo ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
On 2010-07-22 13:53, Stefan Manegold wrote: > On Thu, Jul 22, 2010 at 01:50:30PM +0200, Stefan Manegold wrote: >> >> Function hstrerror() does not seem to be available on Windows. > > at least not with the header files currently included by > clients/src/mapilib/Mapi.mx Indeed, the code now does not compile on Windows. >> Stefan >> >> On Thu, Jul 22, 2010 at 01:21:01PM +0200, Stefan Manegold wrote: >>> On Thu, Jul 22, 2010 at 01:11:33PM +0200, Fabian Groffen wrote: On 22-07-2010 13:03:49 +0200, Romulo Goncalves wrote: > First of all thanks for the check :) > > The reason is the following code in connect_to_server (Mapi.mx line 2407) > > if ((hp = gethostbyname(mid->hostname)) == NULL) { > snprintf(errbuf, sizeof(errbuf), "gethostbyname > failed: %s", strerror(errno)); > return mapi_setError(mid, errbuf, > "mapi_reconnect", MERROR); > } > > This code is incomplete. The gethostbyname sets the h_errno or errno > depending on the error. But it never sets both. > > Lets give an example: > if you give an unknown host, > getbostbyname("whatever"); > the *h_errno* is set as *Unknown* and errno it is not set, i.e., it is > *0*, therefore, strerror will print Success. > > In case you give a invalid host name like: > gethostbyname(0); > the *errno* is set as *Invalid* and *h_errno* it is not set, i.e., it is > *0*, therefore, hstrerror will print Success. > > In this if clause when hp is NULL, it means we have an error. Therefore, > the error message should be created as follows: > snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", errno ? > strerror(errno) : hstrerror(h_errno)); > > The case can't be covered by the test because the parser will detect if > the hostname is invalid or not. > > Do you agree? Sounds good, fix it. >>> >>> please check the man page of gethostbyname, first. >>> >>> It only mentions h_errno, but does not mention errno. >>> >>> It also says: >>> " >>> The *(obsolete)* herror() function prints the error message associated >>> with the current value of h_errno on stderr. >>> >>> The *(obsolete)* hstrerror() function takes an error number (typically >>> h_errno) and returns the corresponding message string. >>> " >>> >>> Hence, I'm not sure how portable these "obsolete" functions are ... >>> >>> But then, it also says >>> " >>> POSIX.1-2008 removes the specifications of gethostbyname(), gethost- >>> byaddr(), and h_errno, recommending the use of getaddrinfo(3) and >>> getnameinfo(3) instead. >>> " >>> >>> Hence, even gethostbyname() itself might eventually disappear ... >>> >>> Stefan >>> ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list >>> >>> -- >>> | Dr. Stefan Manegold | mailto:stefan.maneg...@cwi.nl | >>> | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | >>> | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | >>> | The Netherlands | Fax : +31 (20) 592-4199 | >> >> -- >> | Dr. Stefan Manegold | mailto:stefan.maneg...@cwi.nl | >> | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | >> | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | >> | The Netherlands | Fax : +31 (20) 592-4199 | > -- Sjoerd Mullender signature.asc Description: OpenPGP digital signature ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2010 branch.
Changeset: 6c53ea638a80 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6c53ea638a80 Modified Files: Branch: default Log Message: Merge with Jun2010 branch. diffs (200 lines): diff -r b6cf4d771a87 -r 6c53ea638a80 buildtools/ChangeLog.Jun2010 --- a/buildtools/ChangeLog.Jun2010 Thu Jul 22 11:18:57 2010 +0200 +++ b/buildtools/ChangeLog.Jun2010 Thu Jul 22 14:04:34 2010 +0200 @@ -1,6 +1,10 @@ # ChangeLog file for buildtools # This file is updated with Maddlog +* Thu Jul 22 2010 Sjoerd Mullender +- Changed Maddlog to search up the directory tree to find a ChangeLog + file. + * Wed Mar 31 2010 Stefan Manegold - Made compilation of "testing" (and "java") independent of MonetDB. This is mainly for Windows, but also on other systems, "testing" can diff -r b6cf4d771a87 -r 6c53ea638a80 buildtools/conf/Maddlog --- a/buildtools/conf/Maddlog Thu Jul 22 11:18:57 2010 +0200 +++ b/buildtools/conf/Maddlog Thu Jul 22 14:04:34 2010 +0200 @@ -1,49 +1,35 @@ #!/usr/bin/env bash # -*-shell-script-*- -d=. -while [ ! -f $d/vertoo.data ]; do -if [ $d -ef / ]; then - echo "$0: cannot find top directory of package" >&2 - exit 1 -fi -d=../$d -done -CL=$d/ChangeLog -if hg root >& /dev/null ; then -tag=$(hg branch) -case $tag in -default) - ;; -*) - CL=$CL.${tag} - ;; -esac -root=$(hg root) -root=$(cd $root && \pwd -P) -dir=$(cd $d && \pwd -P) -proj=${dir#${root}/} +usage() { +cat >&2 <<-EOF + $0: unknown option $1 + Usage: $0 [options] [log message] + Valid options are: + --logfile=filename (-f filename) + --commit + If no log message, one will be prompted for. + EOF +exit 1 +} -PROJECT=${proj%%/*} -IDENTITY=$(hg showconfig ui.username) -else -echo "Cannot use this script outside a Mercurial repository" > /dev/stder -exit -1 -fi - +CL= nocommit=true while [ $# -gt 0 ]; do case "$1" in ---logfile=*) +--logfile=?*) CL=${1#--logfile=} shift ;; --logfile|-f) + if [ $# -lt 2 ]; then + usage + fi CL=$2 shift shift ;; --f*) +-f?*) CL=${1#-f} shift ;; @@ -56,13 +42,7 @@ break ;; -*) - cat >&2 <<-EOF - $0: unknown option $1 - Valid options are: - --logfile=filename (-f filename) - --commit - EOF - exit 1 + usage ;; *) break @@ -70,6 +50,44 @@ esac done +if ! hg root >& /dev/null ; then +echo "Cannot use this script outside a Mercurial repository" >&2 +exit -1 +fi + +tag=$(hg branch) + +case "$CL" in +'') +d=. +while [ ! -f $d/vertoo.data -a ! -f $d/ChangeLog -a ! -f $d/ChangeLog.$tag ]; do + if [ $d -ef / ]; then + echo "$0: cannot find top directory of package" >&2 + exit 1 + fi + d=../$d +done +CL=$d/ChangeLog +case $tag in +default) + ;; +*) + CL=$CL.${tag} + ;; +esac +dir=$(cd $d && \pwd -P) +;; +*/*) +dir=$(cd "${CL%/*}"; \pwd -P) +;; +*) +dir=$(\pwd -P) +;; +esac + +PROJECT=${dir##*/} +IDENTITY=$(hg showconfig ui.username) + if [ $# -gt 0 ]; then msg=$* else diff -r b6cf4d771a87 -r 6c53ea638a80 clients/src/mapilib/Mapi.mx --- a/clients/src/mapilib/Mapi.mx Thu Jul 22 11:18:57 2010 +0200 +++ b/clients/src/mapilib/Mapi.mx Thu Jul 22 14:04:34 2010 +0200 @@ -2405,7 +2405,7 @@ mid->hostname = strdup("localhost"); if ((hp = gethostbyname(mid->hostname)) == NULL) { - snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", strerror(errno)); + snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", errno ? strerror(errno) : hstrerror(h_errno)); return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); } memset(&server, 0, sizeof(server)); diff -r b6cf4d771a87 -r 6c53ea638a80 java/src/nl/cwi/monetdb/jdbc/MonetBlob.java --- a/java/src/nl/cwi/monetdb/jdbc/MonetBlob.java Thu Jul 22 11:18:57 2010 +0200 +++ b/java/src/nl/cwi/monetdb/jdbc/MonetBlob.java Thu Jul 22 14:04:34 2010 +0200 @@ -39,7 +39,7 @@ int len = in.length() / 2; buf = new byte[len]; for (int i = 0; i < len; i++) - buf[i] = Byte.parseByte(in.substring(2 * i, (2 * i) + 2), 16); + buf[i] = (byte)Integer.parseInt(in.substring(2 * i, (2 * i) + 2), 16); } //== begin interface Blob diff -r b6cf4d771a87 -r 6c53ea638a80 sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err --- a/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Thu Jul 22 11:18:57 2010 +0200 +++ b/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.e
MonetDB: Jun2010 - Changed Maddlog to search up the directory tr...
Changeset: 66056044b27f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=66056044b27f Modified Files: buildtools/ChangeLog.Jun2010 buildtools/conf/Maddlog Branch: Jun2010 Log Message: Changed Maddlog to search up the directory tree to find a ChangeLog file. diffs (144 lines): diff -r 34046dbfc59d -r 66056044b27f buildtools/ChangeLog.Jun2010 --- a/buildtools/ChangeLog.Jun2010 Thu Jul 22 13:53:38 2010 +0200 +++ b/buildtools/ChangeLog.Jun2010 Thu Jul 22 13:44:40 2010 +0200 @@ -1,6 +1,10 @@ # ChangeLog file for buildtools # This file is updated with Maddlog +* Thu Jul 22 2010 Sjoerd Mullender +- Changed Maddlog to search up the directory tree to find a ChangeLog + file. + * Wed Mar 31 2010 Stefan Manegold - Made compilation of "testing" (and "java") independent of MonetDB. This is mainly for Windows, but also on other systems, "testing" can diff -r 34046dbfc59d -r 66056044b27f buildtools/conf/Maddlog --- a/buildtools/conf/Maddlog Thu Jul 22 13:53:38 2010 +0200 +++ b/buildtools/conf/Maddlog Thu Jul 22 13:44:40 2010 +0200 @@ -1,49 +1,35 @@ #!/usr/bin/env bash # -*-shell-script-*- -d=. -while [ ! -f $d/vertoo.data ]; do -if [ $d -ef / ]; then - echo "$0: cannot find top directory of package" >&2 - exit 1 -fi -d=../$d -done -CL=$d/ChangeLog -if hg root >& /dev/null ; then -tag=$(hg branch) -case $tag in -default) - ;; -*) - CL=$CL.${tag} - ;; -esac -root=$(hg root) -root=$(cd $root && \pwd -P) -dir=$(cd $d && \pwd -P) -proj=${dir#${root}/} +usage() { +cat >&2 <<-EOF + $0: unknown option $1 + Usage: $0 [options] [log message] + Valid options are: + --logfile=filename (-f filename) + --commit + If no log message, one will be prompted for. + EOF +exit 1 +} -PROJECT=${proj%%/*} -IDENTITY=$(hg showconfig ui.username) -else -echo "Cannot use this script outside a Mercurial repository" > /dev/stder -exit -1 -fi - +CL= nocommit=true while [ $# -gt 0 ]; do case "$1" in ---logfile=*) +--logfile=?*) CL=${1#--logfile=} shift ;; --logfile|-f) + if [ $# -lt 2 ]; then + usage + fi CL=$2 shift shift ;; --f*) +-f?*) CL=${1#-f} shift ;; @@ -56,13 +42,7 @@ break ;; -*) - cat >&2 <<-EOF - $0: unknown option $1 - Valid options are: - --logfile=filename (-f filename) - --commit - EOF - exit 1 + usage ;; *) break @@ -70,6 +50,44 @@ esac done +if ! hg root >& /dev/null ; then +echo "Cannot use this script outside a Mercurial repository" >&2 +exit -1 +fi + +tag=$(hg branch) + +case "$CL" in +'') +d=. +while [ ! -f $d/vertoo.data -a ! -f $d/ChangeLog -a ! -f $d/ChangeLog.$tag ]; do + if [ $d -ef / ]; then + echo "$0: cannot find top directory of package" >&2 + exit 1 + fi + d=../$d +done +CL=$d/ChangeLog +case $tag in +default) + ;; +*) + CL=$CL.${tag} + ;; +esac +dir=$(cd $d && \pwd -P) +;; +*/*) +dir=$(cd "${CL%/*}"; \pwd -P) +;; +*) +dir=$(\pwd -P) +;; +esac + +PROJECT=${dir##*/} +IDENTITY=$(hg showconfig ui.username) + if [ $# -gt 0 ]; then msg=$* else ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
On 2010-07-22 13:21, Stefan Manegold wrote: > On Thu, Jul 22, 2010 at 01:11:33PM +0200, Fabian Groffen wrote: >> On 22-07-2010 13:03:49 +0200, Romulo Goncalves wrote: >>> First of all thanks for the check :) >>> >>> The reason is the following code in connect_to_server (Mapi.mx line 2407) >>> >>> if ((hp = gethostbyname(mid->hostname)) == NULL) { >>> snprintf(errbuf, sizeof(errbuf), "gethostbyname >>> failed: %s", strerror(errno)); >>> return mapi_setError(mid, errbuf, >>> "mapi_reconnect", MERROR); >>> } >>> >>> This code is incomplete. The gethostbyname sets the h_errno or errno >>> depending on the error. But it never sets both. >>> >>> Lets give an example: >>> if you give an unknown host, >>> getbostbyname("whatever"); >>> the *h_errno* is set as *Unknown* and errno it is not set, i.e., it is *0*, >>> therefore, strerror will print Success. >>> >>> In case you give a invalid host name like: >>> gethostbyname(0); >>> the *errno* is set as *Invalid* and *h_errno* it is not set, i.e., it is >>> *0*, therefore, hstrerror will print Success. >>> >>> In this if clause when hp is NULL, it means we have an error. Therefore, >>> the error message should be created as follows: >>> snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", errno ? >>> strerror(errno) : hstrerror(h_errno)); >>> >>> The case can't be covered by the test because the parser will detect if the >>> hostname is invalid or not. >>> >>> Do you agree? >> >> Sounds good, fix it. > > please check the man page of gethostbyname, first. > > It only mentions h_errno, but does not mention errno. > > It also says: > " > The *(obsolete)* herror() function prints the error message associated > with the current value of h_errno on stderr. > > The *(obsolete)* hstrerror() function takes an error number (typically > h_errno) and returns the corresponding message string. > " > > Hence, I'm not sure how portable these "obsolete" functions are ... > > But then, it also says > " > POSIX.1-2008 removes the specifications of gethostbyname(), gethost- > byaddr(), and h_errno, recommending the use of getaddrinfo(3) and > getnameinfo(3) instead. > " > > Hence, even gethostbyname() itself might eventually disappear ... > > Stefan In addition to Stefan's remarks, errno isn't ordinarily guaranteed to be 0 in case of no (system call) error. It is set in case of error, but not cleared when there is no error. So perhaps you have to check h_errno first (if that is cleared when no error occurs--or rather when there is "only" a system call error in the call), or maybe you have to set errno=0 before calling gethostbyname. Error handling is not easy. ;-) -- Sjoerd Mullender signature.asc Description: OpenPGP digital signature ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jun2010 - Fix hex string decoding
Changeset: 34046dbfc59d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=34046dbfc59d Modified Files: java/src/nl/cwi/monetdb/jdbc/MonetBlob.java Branch: Jun2010 Log Message: Fix hex string decoding diffs (12 lines): diff -r f9af81c7874b -r 34046dbfc59d java/src/nl/cwi/monetdb/jdbc/MonetBlob.java --- a/java/src/nl/cwi/monetdb/jdbc/MonetBlob.java Thu Jul 22 13:18:20 2010 +0200 +++ b/java/src/nl/cwi/monetdb/jdbc/MonetBlob.java Thu Jul 22 13:53:38 2010 +0200 @@ -39,7 +39,7 @@ int len = in.length() / 2; buf = new byte[len]; for (int i = 0; i < len; i++) - buf[i] = Byte.parseByte(in.substring(2 * i, (2 * i) + 2), 16); + buf[i] = (byte)Integer.parseInt(in.substring(2 * i, (2 * i) + 2), 16); } //== begin interface Blob ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
On Thu, Jul 22, 2010 at 01:50:30PM +0200, Stefan Manegold wrote: > > Function hstrerror() does not seem to be available on Windows. at least not with the header files currently included by clients/src/mapilib/Mapi.mx > Stefan > > On Thu, Jul 22, 2010 at 01:21:01PM +0200, Stefan Manegold wrote: > > On Thu, Jul 22, 2010 at 01:11:33PM +0200, Fabian Groffen wrote: > > > On 22-07-2010 13:03:49 +0200, Romulo Goncalves wrote: > > > > First of all thanks for the check :) > > > > > > > > The reason is the following code in connect_to_server (Mapi.mx line > > > > 2407) > > > > > > > > if ((hp = gethostbyname(mid->hostname)) == NULL) { > > > > snprintf(errbuf, sizeof(errbuf), > > > > "gethostbyname failed: %s", strerror(errno)); > > > > return mapi_setError(mid, errbuf, > > > > "mapi_reconnect", MERROR); > > > > } > > > > > > > > This code is incomplete. The gethostbyname sets the h_errno or errno > > > > depending on the error. But it never sets both. > > > > > > > > Lets give an example: > > > > if you give an unknown host, > > > > getbostbyname("whatever"); > > > > the *h_errno* is set as *Unknown* and errno it is not set, i.e., it is > > > > *0*, therefore, strerror will print Success. > > > > > > > > In case you give a invalid host name like: > > > > gethostbyname(0); > > > > the *errno* is set as *Invalid* and *h_errno* it is not set, i.e., it > > > > is *0*, therefore, hstrerror will print Success. > > > > > > > > In this if clause when hp is NULL, it means we have an error. > > > > Therefore, the error message should be created as follows: > > > > snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", errno ? > > > > strerror(errno) : hstrerror(h_errno)); > > > > > > > > The case can't be covered by the test because the parser will detect if > > > > the hostname is invalid or not. > > > > > > > > Do you agree? > > > > > > Sounds good, fix it. > > > > please check the man page of gethostbyname, first. > > > > It only mentions h_errno, but does not mention errno. > > > > It also says: > > " > > The *(obsolete)* herror() function prints the error message associated > > with the current value of h_errno on stderr. > > > > The *(obsolete)* hstrerror() function takes an error number (typically > > h_errno) and returns the corresponding message string. > > " > > > > Hence, I'm not sure how portable these "obsolete" functions are ... > > > > But then, it also says > > " > > POSIX.1-2008 removes the specifications of gethostbyname(), gethost- > > byaddr(), and h_errno, recommending the use of getaddrinfo(3) and > > getnameinfo(3) instead. > > " > > > > Hence, even gethostbyname() itself might eventually disappear ... > > > > Stefan > > > > > ___ > > > Checkin-list mailing list > > > Checkin-list@monetdb.org > > > http://mail.monetdb.org/mailman/listinfo/checkin-list > > > > > > > -- > > | Dr. Stefan Manegold | mailto:stefan.maneg...@cwi.nl | > > | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | > > | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | > > | The Netherlands | Fax : +31 (20) 592-4199 | > > -- > | Dr. Stefan Manegold | mailto:stefan.maneg...@cwi.nl | > | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | > | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | > | The Netherlands | Fax : +31 (20) 592-4199 | -- | Dr. Stefan Manegold | mailto:stefan.maneg...@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4199 | ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
Function hstrerror() does not seem to be available on Windows. Stefan On Thu, Jul 22, 2010 at 01:21:01PM +0200, Stefan Manegold wrote: > On Thu, Jul 22, 2010 at 01:11:33PM +0200, Fabian Groffen wrote: > > On 22-07-2010 13:03:49 +0200, Romulo Goncalves wrote: > > > First of all thanks for the check :) > > > > > > The reason is the following code in connect_to_server (Mapi.mx line 2407) > > > > > > if ((hp = gethostbyname(mid->hostname)) == NULL) { > > > snprintf(errbuf, sizeof(errbuf), "gethostbyname > > > failed: %s", strerror(errno)); > > > return mapi_setError(mid, errbuf, > > > "mapi_reconnect", MERROR); > > > } > > > > > > This code is incomplete. The gethostbyname sets the h_errno or errno > > > depending on the error. But it never sets both. > > > > > > Lets give an example: > > > if you give an unknown host, > > > getbostbyname("whatever"); > > > the *h_errno* is set as *Unknown* and errno it is not set, i.e., it is > > > *0*, therefore, strerror will print Success. > > > > > > In case you give a invalid host name like: > > > gethostbyname(0); > > > the *errno* is set as *Invalid* and *h_errno* it is not set, i.e., it is > > > *0*, therefore, hstrerror will print Success. > > > > > > In this if clause when hp is NULL, it means we have an error. Therefore, > > > the error message should be created as follows: > > > snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", errno ? > > > strerror(errno) : hstrerror(h_errno)); > > > > > > The case can't be covered by the test because the parser will detect if > > > the hostname is invalid or not. > > > > > > Do you agree? > > > > Sounds good, fix it. > > please check the man page of gethostbyname, first. > > It only mentions h_errno, but does not mention errno. > > It also says: > " > The *(obsolete)* herror() function prints the error message associated > with the current value of h_errno on stderr. > > The *(obsolete)* hstrerror() function takes an error number (typically > h_errno) and returns the corresponding message string. > " > > Hence, I'm not sure how portable these "obsolete" functions are ... > > But then, it also says > " > POSIX.1-2008 removes the specifications of gethostbyname(), gethost- > byaddr(), and h_errno, recommending the use of getaddrinfo(3) and > getnameinfo(3) instead. > " > > Hence, even gethostbyname() itself might eventually disappear ... > > Stefan > > > ___ > > Checkin-list mailing list > > Checkin-list@monetdb.org > > http://mail.monetdb.org/mailman/listinfo/checkin-list > > > > -- > | Dr. Stefan Manegold | mailto:stefan.maneg...@cwi.nl | > | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | > | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | > | The Netherlands | Fax : +31 (20) 592-4199 | -- | Dr. Stefan Manegold | mailto:stefan.maneg...@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4199 | ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
On Thu, Jul 22, 2010 at 01:11:33PM +0200, Fabian Groffen wrote: > On 22-07-2010 13:03:49 +0200, Romulo Goncalves wrote: > > First of all thanks for the check :) > > > > The reason is the following code in connect_to_server (Mapi.mx line 2407) > > > > if ((hp = gethostbyname(mid->hostname)) == NULL) { > > snprintf(errbuf, sizeof(errbuf), "gethostbyname > > failed: %s", strerror(errno)); > > return mapi_setError(mid, errbuf, > > "mapi_reconnect", MERROR); > > } > > > > This code is incomplete. The gethostbyname sets the h_errno or errno > > depending on the error. But it never sets both. > > > > Lets give an example: > > if you give an unknown host, > > getbostbyname("whatever"); > > the *h_errno* is set as *Unknown* and errno it is not set, i.e., it is *0*, > > therefore, strerror will print Success. > > > > In case you give a invalid host name like: > > gethostbyname(0); > > the *errno* is set as *Invalid* and *h_errno* it is not set, i.e., it is > > *0*, therefore, hstrerror will print Success. > > > > In this if clause when hp is NULL, it means we have an error. Therefore, > > the error message should be created as follows: > > snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", errno ? > > strerror(errno) : hstrerror(h_errno)); > > > > The case can't be covered by the test because the parser will detect if the > > hostname is invalid or not. > > > > Do you agree? > > Sounds good, fix it. please check the man page of gethostbyname, first. It only mentions h_errno, but does not mention errno. It also says: " The *(obsolete)* herror() function prints the error message associated with the current value of h_errno on stderr. The *(obsolete)* hstrerror() function takes an error number (typically h_errno) and returns the corresponding message string. " Hence, I'm not sure how portable these "obsolete" functions are ... But then, it also says " POSIX.1-2008 removes the specifications of gethostbyname(), gethost- byaddr(), and h_errno, recommending the use of getaddrinfo(3) and getnameinfo(3) instead. " Hence, even gethostbyname() itself might eventually disappear ... Stefan > ___ > Checkin-list mailing list > Checkin-list@monetdb.org > http://mail.monetdb.org/mailman/listinfo/checkin-list > -- | Dr. Stefan Manegold | mailto:stefan.maneg...@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4199 | ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jun2010 - Correct the err output.
Changeset: f9af81c7874b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f9af81c7874b Modified Files: sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Branch: Jun2010 Log Message: Correct the err output. Gethostbyname returns unknown host and not Success. diffs (21 lines): diff -r 255ec3fd69d7 -r f9af81c7874b sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err --- a/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Thu Jul 22 13:16:44 2010 +0200 +++ b/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Thu Jul 22 13:18:20 2010 +0200 @@ -71,13 +71,13 @@ # 13:12:55 > mclient -lsql -ftest -i -e --host=rig --port=39884 # 13:12:55 > -MAPI = mone...@alviss:36310 +MAPI = mone...@alviss:32394 QUERY = connect to default; ERROR = !CONNECT TO: DEFAULT is not supported! -MAPI = mone...@alviss:36310 +MAPI = mone...@alviss:32394 QUERY = connect to 'whatever' port 50001 database 'nonexisting' USER 'monetdb' PASSWORD 'monetdb' LANGUAGE 'mal'; -ERROR = !IOException:mapi.connect:Could not connect: gethostbyname failed: Success -MAPI = mone...@alviss:36310 +ERROR = !IOException:mapi.connect:Could not connect: gethostbyname failed: Unknown host +MAPI = mone...@alviss:32394 QUERY = disconnect 'whatever'; ERROR = !DISCONNECT CATALOG: no such db_alias 'whatever' ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jun2010 - This code is incomplete. The gethostbyname se...
Changeset: 255ec3fd69d7 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=255ec3fd69d7 Modified Files: clients/src/mapilib/Mapi.mx Branch: Jun2010 Log Message: This code is incomplete. The gethostbyname sets the h_errno or errno depending on the error. But it never sets both. if you give an unknown host, getbostbyname("whatever"); the *h_errno* is set as *Unknown* and errno it is not set, i.e., it is *0*, therefore, strerror will print Success. In case you give a invalid host name like: gethostbyname(0); the *errno* is set as *Invalid* and *h_errno* it is not set, i.e., it is *0*, therefore, hstrerror will print Success. diffs (12 lines): diff -r 7a88e64c34b1 -r 255ec3fd69d7 clients/src/mapilib/Mapi.mx --- a/clients/src/mapilib/Mapi.mx Thu Jul 22 11:53:14 2010 +0200 +++ b/clients/src/mapilib/Mapi.mx Thu Jul 22 13:16:44 2010 +0200 @@ -2405,7 +2405,7 @@ mid->hostname = strdup("localhost"); if ((hp = gethostbyname(mid->hostname)) == NULL) { - snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", strerror(errno)); + snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", errno ? strerror(errno) : hstrerror(h_errno)); return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); } memset(&server, 0, sizeof(server)); ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
On 22-07-2010 13:03:49 +0200, Romulo Goncalves wrote: > First of all thanks for the check :) > > The reason is the following code in connect_to_server (Mapi.mx line 2407) > > if ((hp = gethostbyname(mid->hostname)) == NULL) { > snprintf(errbuf, sizeof(errbuf), "gethostbyname > failed: %s", strerror(errno)); > return mapi_setError(mid, errbuf, "mapi_reconnect", > MERROR); > } > > This code is incomplete. The gethostbyname sets the h_errno or errno > depending on the error. But it never sets both. > > Lets give an example: > if you give an unknown host, > getbostbyname("whatever"); > the *h_errno* is set as *Unknown* and errno it is not set, i.e., it is *0*, > therefore, strerror will print Success. > > In case you give a invalid host name like: > gethostbyname(0); > the *errno* is set as *Invalid* and *h_errno* it is not set, i.e., it is *0*, > therefore, hstrerror will print Success. > > In this if clause when hp is NULL, it means we have an error. Therefore, the > error message should be created as follows: > snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", errno ? > strerror(errno) : hstrerror(h_errno)); > > The case can't be covered by the test because the parser will detect if the > hostname is invalid or not. > > Do you agree? Sounds good, fix it. ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
First of all thanks for the check :) The reason is the following code in connect_to_server (Mapi.mx line 2407) if ((hp = gethostbyname(mid->hostname)) == NULL) { snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", strerror(errno)); return mapi_setError(mid, errbuf, "mapi_reconnect", MERROR); } This code is incomplete. The gethostbyname sets the h_errno or errno depending on the error. But it never sets both. Lets give an example: if you give an unknown host, getbostbyname("whatever"); the *h_errno* is set as *Unknown* and errno it is not set, i.e., it is *0*, therefore, strerror will print Success. In case you give a invalid host name like: gethostbyname(0); the *errno* is set as *Invalid* and *h_errno* it is not set, i.e., it is *0*, therefore, hstrerror will print Success. In this if clause when hp is NULL, it means we have an error. Therefore, the error message should be created as follows: snprintf(errbuf, sizeof(errbuf), "gethostbyname failed: %s", errno ? strerror(errno) : hstrerror(h_errno)); The case can't be covered by the test because the parser will detect if the hostname is invalid or not. Do you agree? Romulo On 22/07/10 12:23, Fabian Groffen wrote: On 22-07-2010 12:17:51 +0200, Stefan Manegold wrote: I wonder, though, whether the error message is indeed what it should be. Saying "failed: Success" (see below) seems at least "odd" to me ... +1 this looks very strange. +QUERY = connect to 'whatever' port 50001 database 'nonexisting' USER 'monetdb' PASSWORD 'monetdb' LANGUAGE 'mal'; +ERROR = !IOException:mapi.connect:Could not connect: gethostbyname failed: Success ^^ ^^^ ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
On 22-07-2010 12:17:51 +0200, Stefan Manegold wrote: > I wonder, though, whether the error message is indeed what it should be. > Saying "failed: Success" (see below) seems at least "odd" to me ... +1 this looks very strange. > > +QUERY = connect to 'whatever' port 50001 database 'nonexisting' USER > > 'monetdb' PASSWORD 'monetdb' LANGUAGE 'mal'; > > +ERROR = !IOException:mapi.connect:Could not connect: gethostbyname failed: > > Success > ^^ > ^^^ ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
Re: MonetDB: Jun2010 - It seems the err output for the test was not ...
On Thu, Jul 22, 2010 at 11:53:22AM +0200, Romulo Goncalves wrote: > Changeset: 7a88e64c34b1 for MonetDB > URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a88e64c34b1 > Modified Files: > sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err > sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.out > Branch: Jun2010 > Log Message: > > It seems the err output for the test was not complete. > In the approval of the test two sql statements were missing, therefore, the > err output was created without the errors related to that two statements. Thanks for taking care of this. My reason for not approving the error messages in the first place was that I was not sure about the intention of the test, and hence, whether and which error messages are to be expected. I now understand from your approval that the error messages indeed match the intention of the test. I wonder, though, whether the error message is indeed what it should be. Saying "failed: Success" (see below) seems at least "odd" to me ... Stefan > > diffs (32 lines): > > diff -r 6908fb1d95e4 -r 7a88e64c34b1 > sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err > --- a/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err > Thu Jul 22 11:02:07 2010 +0200 > +++ b/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err > Thu Jul 22 11:53:14 2010 +0200 > @@ -71,9 +71,15 @@ > # 13:12:55 > mclient -lsql -ftest -i -e --host=rig --port=39884 > # 13:12:55 > > > -MAPI = mone...@rig:39884 > +MAPI = mone...@alviss:36310 > QUERY = connect to default; > ERROR = !CONNECT TO: DEFAULT is not supported! > +MAPI = mone...@alviss:36310 > +QUERY = connect to 'whatever' port 50001 database 'nonexisting' USER > 'monetdb' PASSWORD 'monetdb' LANGUAGE 'mal'; > +ERROR = !IOException:mapi.connect:Could not connect: gethostbyname failed: > Success ^^ ^^^ !! ??? > +MAPI = mone...@alviss:36310 > +QUERY = disconnect 'whatever'; > +ERROR = !DISCONNECT CATALOG: no such db_alias 'whatever' > > # 13:12:55 > > # 13:12:55 > Done. > diff -r 6908fb1d95e4 -r 7a88e64c34b1 > sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.out > --- a/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.out > Thu Jul 22 11:02:07 2010 +0200 > +++ b/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.out > Thu Jul 22 11:53:14 2010 +0200 > @@ -23,8 +23,6 @@ > # 13:12:55 > mclient -lsql -ftest -i -e --host=rig --port=39884 > # 13:12:55 > > > -! to be provided / approved ! > - > # 13:12:55 > > # 13:12:55 > Done. > # 13:12:55 > > ___ > Checkin-list mailing list > Checkin-list@monetdb.org > http://mail.monetdb.org/mailman/listinfo/checkin-list > -- | Dr. Stefan Manegold | mailto:stefan.maneg...@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4199 | ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jun2010 - It seems the err output for the test was not ...
Changeset: 7a88e64c34b1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a88e64c34b1 Modified Files: sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.out Branch: Jun2010 Log Message: It seems the err output for the test was not complete. In the approval of the test two sql statements were missing, therefore, the err output was created without the errors related to that two statements. diffs (32 lines): diff -r 6908fb1d95e4 -r 7a88e64c34b1 sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err --- a/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Thu Jul 22 11:02:07 2010 +0200 +++ b/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.err Thu Jul 22 11:53:14 2010 +0200 @@ -71,9 +71,15 @@ # 13:12:55 > mclient -lsql -ftest -i -e --host=rig --port=39884 # 13:12:55 > -MAPI = mone...@rig:39884 +MAPI = mone...@alviss:36310 QUERY = connect to default; ERROR = !CONNECT TO: DEFAULT is not supported! +MAPI = mone...@alviss:36310 +QUERY = connect to 'whatever' port 50001 database 'nonexisting' USER 'monetdb' PASSWORD 'monetdb' LANGUAGE 'mal'; +ERROR = !IOException:mapi.connect:Could not connect: gethostbyname failed: Success +MAPI = mone...@alviss:36310 +QUERY = disconnect 'whatever'; +ERROR = !DISCONNECT CATALOG: no such db_alias 'whatever' # 13:12:55 > # 13:12:55 > Done. diff -r 6908fb1d95e4 -r 7a88e64c34b1 sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.out --- a/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.out Thu Jul 22 11:02:07 2010 +0200 +++ b/sql/src/test/BugTracker-2010/Tests/connectto.Bug-2548.stable.out Thu Jul 22 11:53:14 2010 +0200 @@ -23,8 +23,6 @@ # 13:12:55 > mclient -lsql -ftest -i -e --host=rig --port=39884 # 13:12:55 > -! to be provided / approved ! - # 13:12:55 > # 13:12:55 > Done. # 13:12:55 > ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merged from Jun2010
Changeset: b6cf4d771a87 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b6cf4d771a87 Modified Files: Branch: default Log Message: Merged from Jun2010 diffs (15 lines): diff -r 3e0c184174c9 -r b6cf4d771a87 sql/src/backends/monet5/merovingian/ChangeLog.Jun2010 --- a/sql/src/backends/monet5/merovingian/ChangeLog.Jun2010 Thu Jul 22 10:47:39 2010 +0200 +++ b/sql/src/backends/monet5/merovingian/ChangeLog.Jun2010 Thu Jul 22 11:18:57 2010 +0200 @@ -1,6 +1,11 @@ # ChangeLog file for sql/src/backends/monet5/merovingian # This file is updated with mchangelog + 21 Jul 2010; Fabian Groffen merovingian.c: + Really shutdown when an argument to merovingian was given, instead of + ending up in some inconsistent state. This solves all weird behaviour + observed in bug #2628. + 21 Jul 2010; Fabian Groffen merovingian.c, monetdb.c: Report MonetDB release on --version flags and in the logs. ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jun2010 - split out changelog entry for fix for bug #26...
Changeset: 6908fb1d95e4 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6908fb1d95e4 Modified Files: sql/src/backends/monet5/merovingian/ChangeLog.Jun2010 Branch: Jun2010 Log Message: split out changelog entry for fix for bug #2628 that I made by coincidence yesterday diffs (15 lines): diff -r 637f1d163796 -r 6908fb1d95e4 sql/src/backends/monet5/merovingian/ChangeLog.Jun2010 --- a/sql/src/backends/monet5/merovingian/ChangeLog.Jun2010 Thu Jul 22 09:59:27 2010 +0200 +++ b/sql/src/backends/monet5/merovingian/ChangeLog.Jun2010 Thu Jul 22 11:02:07 2010 +0200 @@ -1,6 +1,11 @@ # ChangeLog file for sql/src/backends/monet5/merovingian # This file is updated with mchangelog + 21 Jul 2010; Fabian Groffen merovingian.c: + Really shutdown when an argument to merovingian was given, instead of + ending up in some inconsistent state. This solves all weird behaviour + observed in bug #2628. + 21 Jul 2010; Fabian Groffen merovingian.c, monetdb.c: Report MonetDB release on --version flags and in the logs. ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - making code portable to fix Windows compilati...
Changeset: 3e0c184174c9 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3e0c184174c9 Modified Files: MonetDB5/src/modules/mal/attach.mx Branch: default Log Message: making code portable to fix Windows compilation: rindex() -> strrchr() `man rindex` says: " CONFORMING TO 4.3BSD; marked as LEGACY in POSIX.1-2001. POSIX.1-2008 removes the specifications of index() and rindex(), recommending strchr(3) and strrchr(3) instead. " diffs (12 lines): diff -r afa9a7d23a7f -r 3e0c184174c9 MonetDB5/src/modules/mal/attach.mx --- a/MonetDB5/src/modules/mal/attach.mxThu Jul 22 10:45:14 2010 +0200 +++ b/MonetDB5/src/modules/mal/attach.mxThu Jul 22 10:47:39 2010 +0200 @@ -216,7 +216,7 @@ snprintf(path,BUFSIZ,"%s%c%s%c",GDKgetenv("gdk_dbfarm"),DIR_SEP,GDKgetenv("gdk_dbname"),DIR_SEP); GDKfilepath(path+strlen(path), BATDIR, ( b->T->heap.filename ? b->T->heap.filename: b->H->heap.filename), 0); - s= rindex(path,'.'); + s= strrchr(path,'.'); if( s) *s = 0; *ret = GDKstrdup(path); return MAL_SUCCEED; ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - fixing Windows compilation: use correct C syn...
Changeset: afa9a7d23a7f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=afa9a7d23a7f Modified Files: MonetDB5/src/modules/mal/attach.mx Branch: default Log Message: fixing Windows compilation: use correct C syntax in Windows-only code section diffs (12 lines): diff -r 106528b5e896 -r afa9a7d23a7f MonetDB5/src/modules/mal/attach.mx --- a/MonetDB5/src/modules/mal/attach.mxThu Jul 22 09:59:48 2010 +0200 +++ b/MonetDB5/src/modules/mal/attach.mxThu Jul 22 10:45:14 2010 +0200 @@ -112,7 +112,7 @@ (void) cntxt; (void) mb; (void) stk; - (void) pcil + (void) pci; throw(MAL, "attach.bind", "Not available on Windows"); #else int *ret = (int*) getArgReference(stk, pci, 0); ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2010 branch.
Changeset: 106528b5e896 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=106528b5e896 Modified Files: Branch: default Log Message: Merge with Jun2010 branch. diffs (27 lines): diff -r 91e56aa7bc6d -r 106528b5e896 MonetDB4/ChangeLog.Jun2010 --- a/MonetDB4/ChangeLog.Jun2010Thu Jul 22 09:48:43 2010 +0200 +++ b/MonetDB4/ChangeLog.Jun2010Thu Jul 22 09:59:48 2010 +0200 @@ -1,3 +1,8 @@ # ChangeLog file for MonetDB4 # This file is updated with Maddlog +* Thu Jul 22 2010 Sjoerd Mullender +- Slight change to Fedora, Debian, Ubuntu installers: the database + directory now has the group setuid bit set so that new databases + inherit the group ownership (monetdb). + diff -r 91e56aa7bc6d -r 106528b5e896 MonetDB5/ChangeLog.Jun2010 --- a/MonetDB5/ChangeLog.Jun2010Thu Jul 22 09:48:43 2010 +0200 +++ b/MonetDB5/ChangeLog.Jun2010Thu Jul 22 09:59:48 2010 +0200 @@ -1,6 +1,11 @@ # ChangeLog file for MonetDB5 # This file is updated with Maddlog +* Thu Jul 22 2010 Sjoerd Mullender +- Slight change to Fedora, Debian, Ubuntu installers: the database + directory now has the group setuid bit set so that new databases + inherit the group ownership (monetdb). + * Thu Jul 15 2010 Stefan Manegold - restored genuine original mitosis logic by disabling incorrect octopus dominance (even when octopus was not ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jun2010 - Added changelog entries.
Changeset: 637f1d163796 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=637f1d163796 Modified Files: MonetDB4/ChangeLog.Jun2010 MonetDB5/ChangeLog.Jun2010 Branch: Jun2010 Log Message: Added changelog entries. diffs (27 lines): diff -r f8fff5403988 -r 637f1d163796 MonetDB4/ChangeLog.Jun2010 --- a/MonetDB4/ChangeLog.Jun2010Thu Jul 22 09:47:29 2010 +0200 +++ b/MonetDB4/ChangeLog.Jun2010Thu Jul 22 09:59:27 2010 +0200 @@ -1,3 +1,8 @@ # ChangeLog file for MonetDB4 # This file is updated with Maddlog +* Thu Jul 22 2010 Sjoerd Mullender +- Slight change to Fedora, Debian, Ubuntu installers: the database + directory now has the group setuid bit set so that new databases + inherit the group ownership (monetdb). + diff -r f8fff5403988 -r 637f1d163796 MonetDB5/ChangeLog.Jun2010 --- a/MonetDB5/ChangeLog.Jun2010Thu Jul 22 09:47:29 2010 +0200 +++ b/MonetDB5/ChangeLog.Jun2010Thu Jul 22 09:59:27 2010 +0200 @@ -1,6 +1,11 @@ # ChangeLog file for MonetDB5 # This file is updated with Maddlog +* Thu Jul 22 2010 Sjoerd Mullender +- Slight change to Fedora, Debian, Ubuntu installers: the database + directory now has the group setuid bit set so that new databases + inherit the group ownership (monetdb). + * Thu Jul 15 2010 Stefan Manegold - restored genuine original mitosis logic by disabling incorrect octopus dominance (even when octopus was not ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Jun2010 branch.
Changeset: 91e56aa7bc6d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=91e56aa7bc6d Modified Files: MonetDB4/MonetDB-server.spec MonetDB5/MonetDB-server.spec clients/src/mapiclient/mclient.mx sql/src/backends/monet5/merovingian/merovingian.c Branch: default Log Message: Merge with Jun2010 branch. diffs (231 lines): diff -r 678d0587376a -r 91e56aa7bc6d MonetDB4/MonetDB-server.spec --- a/MonetDB4/MonetDB-server.spec Wed Jul 21 20:38:53 2010 +0200 +++ b/MonetDB4/MonetDB-server.spec Thu Jul 22 09:48:43 2010 +0200 @@ -136,7 +136,7 @@ make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB -mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB4 +mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB4/dbfarm # insert example db here! # cleanup stuff we don't want to install @@ -190,8 +190,9 @@ %{_libdir}/MonetDB4/lib/*.so* %{_libdir}/MonetDB4/*.mil -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4 +%attr(750,monetdb,monetdb) %dir %{_localstatedir}/MonetDB +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4 +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4/dbfarm %config(noreplace) %{_sysconfdir}/MonetDB.conf diff -r 678d0587376a -r 91e56aa7bc6d MonetDB4/debian/monetdb4-server.dirs --- a/MonetDB4/debian/monetdb4-server.dirs Wed Jul 21 20:38:53 2010 +0200 +++ b/MonetDB4/debian/monetdb4-server.dirs Thu Jul 22 09:48:43 2010 +0200 @@ -1,1 +1,2 @@ /var/MonetDB4 +/var/MonetDB4/dbfarm diff -r 678d0587376a -r 91e56aa7bc6d MonetDB4/debian/monetdb4-server.postinst --- a/MonetDB4/debian/monetdb4-server.postinst Wed Jul 21 20:38:53 2010 +0200 +++ b/MonetDB4/debian/monetdb4-server.postinst Thu Jul 22 09:48:43 2010 +0200 @@ -10,9 +10,9 @@ if ! getent passwd monetdb > /dev/null; then adduser --system --ingroup monetdb --home /var/lib/monetdb --disabled-password --shell /usr/sbin/nologin monetdb fi - mkdir -p /var/MonetDB4 - chown monetdb:monetdb /var/MonetDB4 - chmod ug=rwx,o= /var/MonetDB4 + mkdir -p /var/MonetDB4/dbfarm + chown monetdb:monetdb /var/MonetDB4 /var/MonetDB4/dbfarm + chmod ug=rwx,g+s,o= /var/MonetDB4 /var/MonetDB4/dbfarm ;; abort-upgrade|abort-remove|abort-deconfigure) diff -r 678d0587376a -r 91e56aa7bc6d MonetDB5/MonetDB-server.spec --- a/MonetDB5/MonetDB-server.spec Wed Jul 21 20:38:53 2010 +0200 +++ b/MonetDB5/MonetDB-server.spec Thu Jul 22 09:48:43 2010 +0200 @@ -133,7 +133,7 @@ make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB -mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB5 +mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB5/dbfarm # insert example db here! # cleanup stuff we don't want to install @@ -183,8 +183,9 @@ %dir %{_libdir}/MonetDB5/lib %dir %{_libdir}/MonetDB5/autoload -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5 +%attr(750,monetdb,monetdb) %dir %{_localstatedir}/MonetDB +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5 +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5/dbfarm %config(noreplace) %{_sysconfdir}/monetdb5.conf %{_mandir}/man5/monetdb5.conf.5.gz diff -r 678d0587376a -r 91e56aa7bc6d MonetDB5/debian/monetdb5-server.dirs --- a/MonetDB5/debian/monetdb5-server.dirs Wed Jul 21 20:38:53 2010 +0200 +++ b/MonetDB5/debian/monetdb5-server.dirs Thu Jul 22 09:48:43 2010 +0200 @@ -1,1 +1,2 @@ /var/MonetDB5 +/var/MonetDB5/dbfarm diff -r 678d0587376a -r 91e56aa7bc6d MonetDB5/debian/monetdb5-server.postinst --- a/MonetDB5/debian/monetdb5-server.postinst Wed Jul 21 20:38:53 2010 +0200 +++ b/MonetDB5/debian/monetdb5-server.postinst Thu Jul 22 09:48:43 2010 +0200 @@ -10,9 +10,9 @@ if ! getent passwd monetdb > /dev/null; then adduser --system --ingroup monetdb --home /var/lib/monetdb --disabled-password --shell /usr/sbin/nologin monetdb fi - mkdir -p /var/MonetDB5 - chown monetdb:monetdb /var/MonetDB5 - chmod ug=rwx,o= /var/MonetDB5 + mkdir -p /var/MonetDB5/dbfarm + chown monetdb:monetdb /var/MonetDB5 /var/MonetDB5/dbfarm + chmod ug=rwx,g+s,o= /var/MonetDB5 /var/MonetDB5/dbfarm ;; abort-upgrade|abort-remove|abort-deconfigure) diff -r 678d0587376a -r 91e56aa7bc6d clients/ChangeLog.Jun2010 --- a/clients/ChangeLog.Jun2010 Wed Jul 21 20:38:53 2010 +0200 +++ b/clients/ChangeLog.Jun2010 Thu Jul 22 09:48:43 2010 +0200 @@ -1,6 +1,9 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Wed Jul 21 2010 Fabian Groffen +- Add --version option to mclient. + * Tue Jul 20 2010 Sjoerd Mullender - In case of an incomplete line from the server, add a newline. This fixes bug 2619. diff -r 678d0587376a -r 91e56aa7bc6d clients/src/mapiclient/mclient.mx --- a/c
MonetDB: Jun2010 - Merge heads.
Changeset: f8fff5403988 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f8fff5403988 Modified Files: Branch: Jun2010 Log Message: Merge heads. diffs (92 lines): diff -r 5343927ddb65 -r f8fff5403988 MonetDB4/MonetDB-server.spec --- a/MonetDB4/MonetDB-server.spec Wed Jul 21 22:08:27 2010 +0200 +++ b/MonetDB4/MonetDB-server.spec Thu Jul 22 09:47:29 2010 +0200 @@ -136,7 +136,7 @@ make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB -mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB4 +mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB4/dbfarm # insert example db here! # cleanup stuff we don't want to install @@ -190,8 +190,9 @@ %{_libdir}/MonetDB4/lib/*.so* %{_libdir}/MonetDB4/*.mil -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4 +%attr(750,monetdb,monetdb) %dir %{_localstatedir}/MonetDB +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4 +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4/dbfarm %config(noreplace) %{_sysconfdir}/MonetDB.conf diff -r 5343927ddb65 -r f8fff5403988 MonetDB4/debian/monetdb4-server.dirs --- a/MonetDB4/debian/monetdb4-server.dirs Wed Jul 21 22:08:27 2010 +0200 +++ b/MonetDB4/debian/monetdb4-server.dirs Thu Jul 22 09:47:29 2010 +0200 @@ -1,1 +1,2 @@ /var/MonetDB4 +/var/MonetDB4/dbfarm diff -r 5343927ddb65 -r f8fff5403988 MonetDB4/debian/monetdb4-server.postinst --- a/MonetDB4/debian/monetdb4-server.postinst Wed Jul 21 22:08:27 2010 +0200 +++ b/MonetDB4/debian/monetdb4-server.postinst Thu Jul 22 09:47:29 2010 +0200 @@ -10,9 +10,9 @@ if ! getent passwd monetdb > /dev/null; then adduser --system --ingroup monetdb --home /var/lib/monetdb --disabled-password --shell /usr/sbin/nologin monetdb fi - mkdir -p /var/MonetDB4 - chown monetdb:monetdb /var/MonetDB4 - chmod ug=rwx,o= /var/MonetDB4 + mkdir -p /var/MonetDB4/dbfarm + chown monetdb:monetdb /var/MonetDB4 /var/MonetDB4/dbfarm + chmod ug=rwx,g+s,o= /var/MonetDB4 /var/MonetDB4/dbfarm ;; abort-upgrade|abort-remove|abort-deconfigure) diff -r 5343927ddb65 -r f8fff5403988 MonetDB5/MonetDB-server.spec --- a/MonetDB5/MonetDB-server.spec Wed Jul 21 22:08:27 2010 +0200 +++ b/MonetDB5/MonetDB-server.spec Thu Jul 22 09:47:29 2010 +0200 @@ -133,7 +133,7 @@ make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB -mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB5 +mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB5/dbfarm # insert example db here! # cleanup stuff we don't want to install @@ -184,8 +184,9 @@ %dir %{_libdir}/MonetDB5/autoload %{_libdir}/MonetDB5/autoload/*xml*.mal -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5 +%attr(750,monetdb,monetdb) %dir %{_localstatedir}/MonetDB +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5 +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5/dbfarm %config(noreplace) %{_sysconfdir}/monetdb5.conf %{_mandir}/man5/monetdb5.conf.5.gz diff -r 5343927ddb65 -r f8fff5403988 MonetDB5/debian/monetdb5-server.dirs --- a/MonetDB5/debian/monetdb5-server.dirs Wed Jul 21 22:08:27 2010 +0200 +++ b/MonetDB5/debian/monetdb5-server.dirs Thu Jul 22 09:47:29 2010 +0200 @@ -1,1 +1,2 @@ /var/MonetDB5 +/var/MonetDB5/dbfarm diff -r 5343927ddb65 -r f8fff5403988 MonetDB5/debian/monetdb5-server.postinst --- a/MonetDB5/debian/monetdb5-server.postinst Wed Jul 21 22:08:27 2010 +0200 +++ b/MonetDB5/debian/monetdb5-server.postinst Thu Jul 22 09:47:29 2010 +0200 @@ -10,9 +10,9 @@ if ! getent passwd monetdb > /dev/null; then adduser --system --ingroup monetdb --home /var/lib/monetdb --disabled-password --shell /usr/sbin/nologin monetdb fi - mkdir -p /var/MonetDB5 - chown monetdb:monetdb /var/MonetDB5 - chmod ug=rwx,o= /var/MonetDB5 + mkdir -p /var/MonetDB5/dbfarm + chown monetdb:monetdb /var/MonetDB5 /var/MonetDB5/dbfarm + chmod ug=rwx,g+s,o= /var/MonetDB5 /var/MonetDB5/dbfarm ;; abort-upgrade|abort-remove|abort-deconfigure) ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Jun2010 - Create dbfarm directory in installer, and set...
Changeset: 359fec5f0e2d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=359fec5f0e2d Modified Files: MonetDB4/MonetDB-server.spec MonetDB4/debian/monetdb4-server.dirs MonetDB4/debian/monetdb4-server.postinst MonetDB5/MonetDB-server.spec MonetDB5/debian/monetdb5-server.dirs MonetDB5/debian/monetdb5-server.postinst Branch: Jun2010 Log Message: Create dbfarm directory in installer, and set group sticky bit. This means that any new files and directories are also owned by the group. diffs (92 lines): diff -r 951e402f0f02 -r 359fec5f0e2d MonetDB4/MonetDB-server.spec --- a/MonetDB4/MonetDB-server.spec Wed Jul 21 15:29:29 2010 +0200 +++ b/MonetDB4/MonetDB-server.spec Wed Jul 21 18:01:04 2010 +0200 @@ -136,7 +136,7 @@ make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB -mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB4 +mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB4/dbfarm # insert example db here! # cleanup stuff we don't want to install @@ -190,8 +190,9 @@ %{_libdir}/MonetDB4/lib/*.so* %{_libdir}/MonetDB4/*.mil -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4 +%attr(750,monetdb,monetdb) %dir %{_localstatedir}/MonetDB +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4 +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB4/dbfarm %config(noreplace) %{_sysconfdir}/MonetDB.conf diff -r 951e402f0f02 -r 359fec5f0e2d MonetDB4/debian/monetdb4-server.dirs --- a/MonetDB4/debian/monetdb4-server.dirs Wed Jul 21 15:29:29 2010 +0200 +++ b/MonetDB4/debian/monetdb4-server.dirs Wed Jul 21 18:01:04 2010 +0200 @@ -1,1 +1,2 @@ /var/MonetDB4 +/var/MonetDB4/dbfarm diff -r 951e402f0f02 -r 359fec5f0e2d MonetDB4/debian/monetdb4-server.postinst --- a/MonetDB4/debian/monetdb4-server.postinst Wed Jul 21 15:29:29 2010 +0200 +++ b/MonetDB4/debian/monetdb4-server.postinst Wed Jul 21 18:01:04 2010 +0200 @@ -10,9 +10,9 @@ if ! getent passwd monetdb > /dev/null; then adduser --system --ingroup monetdb --home /var/lib/monetdb --disabled-password --shell /usr/sbin/nologin monetdb fi - mkdir -p /var/MonetDB4 - chown monetdb:monetdb /var/MonetDB4 - chmod ug=rwx,o= /var/MonetDB4 + mkdir -p /var/MonetDB4/dbfarm + chown monetdb:monetdb /var/MonetDB4 /var/MonetDB4/dbfarm + chmod ug=rwx,g+s,o= /var/MonetDB4 /var/MonetDB4/dbfarm ;; abort-upgrade|abort-remove|abort-deconfigure) diff -r 951e402f0f02 -r 359fec5f0e2d MonetDB5/MonetDB-server.spec --- a/MonetDB5/MonetDB-server.spec Wed Jul 21 15:29:29 2010 +0200 +++ b/MonetDB5/MonetDB-server.spec Wed Jul 21 18:01:04 2010 +0200 @@ -133,7 +133,7 @@ make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB -mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB5 +mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/MonetDB5/dbfarm # insert example db here! # cleanup stuff we don't want to install @@ -184,8 +184,9 @@ %dir %{_libdir}/MonetDB5/autoload %{_libdir}/MonetDB5/autoload/*xml*.mal -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB -%attr(770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5 +%attr(750,monetdb,monetdb) %dir %{_localstatedir}/MonetDB +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5 +%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/MonetDB5/dbfarm %config(noreplace) %{_sysconfdir}/monetdb5.conf %{_mandir}/man5/monetdb5.conf.5.gz diff -r 951e402f0f02 -r 359fec5f0e2d MonetDB5/debian/monetdb5-server.dirs --- a/MonetDB5/debian/monetdb5-server.dirs Wed Jul 21 15:29:29 2010 +0200 +++ b/MonetDB5/debian/monetdb5-server.dirs Wed Jul 21 18:01:04 2010 +0200 @@ -1,1 +1,2 @@ /var/MonetDB5 +/var/MonetDB5/dbfarm diff -r 951e402f0f02 -r 359fec5f0e2d MonetDB5/debian/monetdb5-server.postinst --- a/MonetDB5/debian/monetdb5-server.postinst Wed Jul 21 15:29:29 2010 +0200 +++ b/MonetDB5/debian/monetdb5-server.postinst Wed Jul 21 18:01:04 2010 +0200 @@ -10,9 +10,9 @@ if ! getent passwd monetdb > /dev/null; then adduser --system --ingroup monetdb --home /var/lib/monetdb --disabled-password --shell /usr/sbin/nologin monetdb fi - mkdir -p /var/MonetDB5 - chown monetdb:monetdb /var/MonetDB5 - chmod ug=rwx,o= /var/MonetDB5 + mkdir -p /var/MonetDB5/dbfarm + chown monetdb:monetdb /var/MonetDB5 /var/MonetDB5/dbfarm + chmod ug=rwx,g+s,o= /var/MonetDB5 /var/MonetDB5/dbfarm ;; abort-upgrade|abort-remove|abort-deconfigure) ___ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list