Changeset: 3737e7aff244 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3737e7aff244 Modified Files: configure.ag Branch: headless Log Message:
Merge with default branch. diffs (truncated from 2499 to 300 lines): diff --git a/clients/ChangeLog.Aug2011 b/clients/ChangeLog.Aug2011 --- a/clients/ChangeLog.Aug2011 +++ b/clients/ChangeLog.Aug2011 @@ -1,6 +1,10 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Wed Aug 31 2011 Sjoerd Mullender <[email protected]> +- msqldump now also accepts the database name as last argument on the + command line (i.e. without -d). + * Fri Aug 26 2011 Fabian Groffen <[email protected]> - Made error messages from the server in mclient go to stderr, instead of stdout. diff --git a/clients/mapiclient/msqldump.1 b/clients/mapiclient/msqldump.1 --- a/clients/mapiclient/msqldump.1 +++ b/clients/mapiclient/msqldump.1 @@ -5,6 +5,8 @@ msqldump \- dump a MonetDB/SQL database .B msqldump [ .I options +] [ +.I dbname ] .SH DESCRIPTION MonetDB is a database management system that is developed from a @@ -22,6 +24,9 @@ Print usage information and exit. .TP \fB\-\-database=\fP\fIdatabase\fP (\fB\-d\fP \fIdatabase\fP) Specify the name of the database to connect to. +The +.B \-d +can be omitted if it is the last option. .TP \fB\-\-host=\fP\fIhostname\fP (\fB\-h\fP \fIhostname\fP) Specify the name of the host on which the server runs (default: diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c --- a/clients/mapiclient/msqldump.c +++ b/clients/mapiclient/msqldump.c @@ -56,7 +56,7 @@ static void usage(const char *prog, int static void usage(const char *prog, int xit) { - fprintf(stderr, "Usage: %s [ options ]\n", prog); + fprintf(stderr, "Usage: %s [ options ] [ dbname ]\n", prog); fprintf(stderr, "\nOptions are:\n"); fprintf(stderr, " -h hostname | --host=hostname host to connect to\n"); fprintf(stderr, " -p portnr | --port=portnr port to connect to\n"); @@ -208,6 +208,11 @@ main(int argc, char **argv) } } + if (optind == argc - 1) + dbname = argv[optind]; + else if (optind != argc) + usage(argv[0], -1); + /* when config file would provide defaults */ if (user_set_as_flag) passwd = NULL; diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -290,6 +290,7 @@ MD5|SHA1|RIPEMD160|SHA224|SHA256|SHA384| ;; esac AC_DEFINE_UNQUOTED([MONETDB5_PASSWDHASH], "$MONETDB5_PASSWDHASH", [The used password hash algorithm]) +AC_SUBST([MONETDB5_PASSWDHASH]) AC_DISABLE_STATIC AC_ENABLE_SHARED diff --git a/geom/sql/Tests/basic.sql b/geom/sql/Tests/basic.sql --- a/geom/sql/Tests/basic.sql +++ b/geom/sql/Tests/basic.sql @@ -18,7 +18,11 @@ SELECT * FROM geoms; SELECT * FROM geoms where g is NOT NULL; -SELECT Dimension(g), GeometryTypeId(g), SRID(g), Envelope(g) FROM geoms where g is not NULL; +-- Test changed to accomodate differences between geos versions 3.2 +-- and 3.3. When geos 3.3 is installed everywhere, the test can be +-- reverted and the new output approved. Also see geom-null-tests. +-- SELECT Dimension(g), GeometryTypeId(g), SRID(g), Envelope(g) FROM geoms where g is not NULL; +SELECT CASE WHEN Dimension(g) IN (0,1,2) THEN 3 ELSE Dimension(g) END, GeometryTypeId(g), SRID(g), Envelope(g) FROM geoms where g is not NULL; SELECT IsEmpty(g), IsSimple(g), Boundary(g) FROM geoms where g is not NULL; diff --git a/geom/sql/Tests/basic.stable.out b/geom/sql/Tests/basic.stable.out --- a/geom/sql/Tests/basic.stable.out +++ b/geom/sql/Tests/basic.stable.out @@ -49,7 +49,7 @@ Over.. [ "POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))" ] [ "POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10), (15 15, 15 20, 10 15, 15 15))" ] % sys., sys., sys., sys. # table_name -% dimension_g, geometrytypeid_g, srid_g, envelope_g # name +% or_or_=_dimension_g, geometrytypeid_g, srid_g, envelope_g # name % int, int, int, geometry # type % 1, 1, 1, 0 # length [ 3, 0, 0, "POINT (10 10)" ] diff --git a/geom/sql/Tests/geom-null-tests.sql b/geom/sql/Tests/geom-null-tests.sql --- a/geom/sql/Tests/geom-null-tests.sql +++ b/geom/sql/Tests/geom-null-tests.sql @@ -32,7 +32,11 @@ SELECT Difference(g1.g, g2.g) FROM geom SELECT SymDifference(g1.g, g2.g) FROM geom g1, geom g2 WHERE g1.id = 1 AND g2.id = 2; SELECT SymDifference(g1.g, g2.g) FROM geom g1, geom g2 WHERE g1.id = 2 AND g2.id = 3; -- null argument, throws exception -SELECT id, Dimension(g) FROM geom WHERE id < 3; +-- Test changed to accomodate differences between geos versions 3.2 +-- and 3.3. When geos 3.3 is installed everywhere, the test can be +-- reverted and the new output approved. Also see basic. +-- SELECT id, Dimension(g) FROM geom WHERE id < 3; +SELECT id, CASE WHEN Dimension(g) IN (0,1,2) THEN 3 ELSE Dimension(g) END FROM geom WHERE id < 3; SELECT id, Dimension(g) FROM geom WHERE id = 3; -- null argument, throws exception SELECT id, GeometryTypeId(g) FROM geom WHERE id < 3; diff --git a/geom/sql/Tests/geom-null-tests.stable.out b/geom/sql/Tests/geom-null-tests.stable.out --- a/geom/sql/Tests/geom-null-tests.stable.out +++ b/geom/sql/Tests/geom-null-tests.stable.out @@ -147,7 +147,7 @@ Over.. [ NULL ] #SELECT id, Dimension(g) FROM geom WHERE id < 3; % sys.geom, sys. # table_name -% id, dimension_g # name +% id, or_or_=_dimension_g # name % int, int # type % 1, 1 # length [ 1, 3 ] diff --git a/geom/sql/Tests/geom_polygon.stable.err b/geom/sql/Tests/geom_polygon.stable.err --- a/geom/sql/Tests/geom_polygon.stable.err +++ b/geom/sql/Tests/geom_polygon.stable.err @@ -104,7 +104,7 @@ QUERY = INSERT INTO polygons values ('PO ERROR = !MALException:wkb.FromText:ParseException: Expected number but encountered ')' MAPI = monetdb@ottar:32754 QUERY = INSERT INTO polygons values ('POLYGON()'); -ERROR = !MALException:wkb.FromText:ParseException: Expected 'EMPTY' or '(' but encountered : ')' +ERROR = !MALException:wkb.FromText:ParseException: Expected 'Z', 'M', 'ZM', 'EMPTY' or '(' but encountered : ')' MAPI = monetdb@ottar:32754 QUERY = INSERT INTO polygons values ('POLYGON'); ERROR = !MALException:wkb.FromText:ParseException: Expected word but encountered end of stream diff --git a/geom/sql/Tests/geom_surface.stable.err b/geom/sql/Tests/geom_surface.stable.err --- a/geom/sql/Tests/geom_surface.stable.err +++ b/geom/sql/Tests/geom_surface.stable.err @@ -98,7 +98,7 @@ QUERY = INSERT INTO surfaces values ('PO ERROR = !MALException:wkb.FromText:ParseException: Expected word but encountered number: '10' MAPI = monetdb@ottar:32754 QUERY = INSERT INTO surfaces values ('POLYGON()'); -ERROR = !MALException:wkb.FromText:ParseException: Expected 'EMPTY' or '(' but encountered : ')' +ERROR = !MALException:wkb.FromText:ParseException: Expected 'Z', 'M', 'ZM', 'EMPTY' or '(' but encountered : ')' MAPI = monetdb@ottar:32754 QUERY = INSERT INTO surfaces values ('POLYGON'); ERROR = !MALException:wkb.FromText:ParseException: Expected word but encountered end of stream diff --git a/testing/Mdiff.c b/testing/Mdiff.c --- a/testing/Mdiff.c +++ b/testing/Mdiff.c @@ -58,7 +58,11 @@ int main(int argc, char **argv) { char EMPTY[] = ""; +#ifdef NATIVE_WIN32 + char DEFAULT[] = "\"-I^#\""; +#else char DEFAULT[] = "-I'^#'"; +#endif char ignoreWHITE[] = " -b -B"; char *old_fn, *new_fn, *html_fn, *caption = EMPTY, *revision = EMPTY, *ignoreEXP = DEFAULT, *ignore, *function = ""; int LWC = 1, context = 1, option, mindiff = 0, quiet = 0; @@ -78,24 +82,28 @@ main(int argc, char **argv) case 'I': ignoreEXP = (char *) malloc(strlen(optarg) + 6); #ifdef NATIVE_WIN32 - strcpy(ignoreEXP, "-I"); + strcpy(ignoreEXP, "\"-I"); #else strcpy(ignoreEXP, "'-I"); #endif strcat(ignoreEXP, optarg); -#ifndef NATIVE_WIN32 +#ifdef NATIVE_WIN32 + strcat(ignoreEXP, "\""); +#else strcat(ignoreEXP, "'"); #endif break; case 'F': function = malloc(strlen(optarg) + 6); #ifdef NATIVE_WIN32 - strcpy(function, "-F"); + strcpy(function, "\"-F"); #else strcpy(function, "'-F"); #endif strcat(function, optarg); -#ifndef NATIVE_WIN32 +#ifdef NATIVE_WIN32 + strcat(function, "\""); +#else strcat(function, "'"); #endif break; diff --git a/testing/Mfilter.py.in b/testing/Mfilter.py.in --- a/testing/Mfilter.py.in +++ b/testing/Mfilter.py.in @@ -87,6 +87,8 @@ norm_in = re.compile('(?:'+')|(?:'.join r"^([Uu]sage: )(/.*/\.libs/|/.*/lt-|)([A-Za-z0-9_]+:?[ \t].*)\n", # 22: 3 r'^(!.*Exception:remote\.[^:]*:\(mapi:monetdb://monetdb@)([^/]*)(/mTests_.*\).*)\n', # 25: 3 r'^(ERROR REPORTED: DBD:|SyntaxException:parseError)(:.+ at )([\./].+|[A-Z]:\\.+)(/[^/]+\.pm line [0-9]+\.)\n', # 28: 4 +# filter for geos 3.3 vs. geos 3.2, can be removed if we have 3.3 everywhere + r"^(ERROR = !MALException:wkb.FromText:ParseException: Expected )('EMPTY' or '\(')( but encountered : '\)')\n", # 29: 3 ])+')', re.MULTILINE) norm_hint = '# the original non-normalized output was: ' norm_out = ( @@ -96,6 +98,7 @@ norm_out = ( None, '', None, # 22: 3 None, 'localhost', None, # 25: 3 None, None, '...', None, # 28: 3 + None, "'Z', 'M', 'ZM', 'EMPTY' or '('", None, # 29: 3 ) diff --git a/tools/merovingian/ChangeLog b/tools/merovingian/ChangeLog --- a/tools/merovingian/ChangeLog +++ b/tools/merovingian/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog file for sql/src/backends/monet5/merovingian # This file is updated with mchangelog +* Wed Aug 31 2011 Fabian Groffen <[email protected]> +- Starting monetdbd without any arguments or without dbfarm is no longer + supported. A dbfarm now must be provided for each command. +- The control passphrase has been turned into a hash of the password, for + a more stronger authorisation model as used by mclients. On upgrade, + any existing passphrase is converted to the hashed version of the + passphrase. +- The monetdbd controlport option has been removed in favour of a + boolean control option. On upgrade, when controlport was set to + a non-zero value and a passphrase was set, control is set to true, + or false otherwise. + * Fri Aug 19 2011 Fabian Groffen <[email protected]> - The monetdbd discoveryport option has been removed in favour of a boolean discovery option. On upgrade, when discoveryport was set to diff --git a/tools/merovingian/client/Makefile.ag b/tools/merovingian/client/Makefile.ag --- a/tools/merovingian/client/Makefile.ag +++ b/tools/merovingian/client/Makefile.ag @@ -33,7 +33,9 @@ bin_monetdb = { ../../../monetdb5/misc/libsabaoth \ ../../../common/stream/libstream \ ../../../common/utils/libmutils \ + ../../../common/utils/libmcrypt \ $(UUID_LIBS) \ + $(openssl_LIBS) \ $(curl_LIBS) \ $(SOCKET_LIBS) \ $(MALLOC_LIBS) diff --git a/tools/merovingian/client/monetdb.c b/tools/merovingian/client/monetdb.c --- a/tools/merovingian/client/monetdb.c +++ b/tools/merovingian/client/monetdb.c @@ -30,7 +30,7 @@ * primary goals of this tool. */ -#define TOOLKIT_VERSION "0.8" +#define TOOLKIT_VERSION "1.0" #include "monetdb_config.h" #include "utils.h" diff --git a/tools/merovingian/daemon/Makefile.ag b/tools/merovingian/daemon/Makefile.ag --- a/tools/merovingian/daemon/Makefile.ag +++ b/tools/merovingian/daemon/Makefile.ag @@ -54,6 +54,7 @@ bin_monetdbd = { ../../../common/stream/libstream \ ../../../clients/mapilib/libmapi \ ../../../common/utils/libmutils \ + ../../../common/utils/libmcrypt \ $(UUID_LIBS) \ $(curl_LIBS) \ $(SOCKET_LIBS) \ diff --git a/tools/merovingian/daemon/argvcmds.c b/tools/merovingian/daemon/argvcmds.c --- a/tools/merovingian/daemon/argvcmds.c +++ b/tools/merovingian/daemon/argvcmds.c @@ -27,6 +27,7 @@ #include <signal.h> /* kill */ #include <mutils.h> /* MT_lockf */ +#include <mcrypt.h> /* mcrypt_BackendSum */ #include <utils/utils.h> #include <utils/properties.h> @@ -52,23 +53,20 @@ command_help(int argc, char *argv[]) printf(" must be a path in the filesystem where a directory can be\n"); printf(" created, or a directory that is writable that already exists.\n"); } else if (strcmp(argv[1], "start") == 0) { - printf("usage: monetdbd start [-n] [dbfarm]\n"); - printf(" Starts the monetdbd deamon. When no dbfarm given, it starts\n"); - printf(" in the default dbfarm (%s).\n", LOCALSTATEDIR "/monetdb5/dbfarm"); + printf("usage: monetdbd start [-n] <dbfarm>\n"); + printf(" Starts the monetdbd deamon for the given dbfarm.\n"); printf(" When -n is given, monetdbd will not fork into the background."); } else if (strcmp(argv[1], "stop") == 0) { - printf("usage: monetdbd stop [dbfarm]\n"); _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
