Changeset: e98da7628bc4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e98da7628bc4
Modified Files:
        
Branch: default
Log Message:

Merge with Aug2011 branch.


diffs (208 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/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
 )
 
 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to