Changeset: b212c552277e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b212c552277e
Modified Files:
        gdk/gdk.h
        sql/backends/monet5/sql_execute.c
        sql/server/rel_optimizer.c
Branch: properties
Log Message:

Merged with default


diffs (truncated from 89200 to 300 lines):

diff --git a/clients/Tests/All b/clients/Tests/All
--- a/clients/Tests/All
+++ b/clients/Tests/All
@@ -1,5 +1,5 @@
 exports
 
HAVE_HGE&HAVE_FITS&HAVE_GEOM&HAVE_LIBR&HAVE_LIBPY3&HAVE_NETCDF&HAVE_SHP&NOT_WIN32?MAL-signatures-hge
 
!HAVE_HGE&HAVE_FITS&HAVE_GEOM&HAVE_LIBR&HAVE_LIBPY3&HAVE_NETCDF&HAVE_SHP&NOT_WIN32?MAL-signatures
-#MERCURIAL?malcheck
+NOT_WIN32&MERCURIAL?melcheck
 mclient-uri
diff --git a/clients/Tests/melcheck.bat b/clients/Tests/melcheck.bat
new file mode 100644
--- /dev/null
+++ b/clients/Tests/melcheck.bat
@@ -0,0 +1,1 @@
+rem Dummy file to simply skip the test instead of screaming TEST MISSING
diff --git a/clients/Tests/malcheck.sh b/clients/Tests/melcheck.sh
rename from clients/Tests/malcheck.sh
rename to clients/Tests/melcheck.sh
--- a/clients/Tests/malcheck.sh
+++ b/clients/Tests/melcheck.sh
@@ -1,3 +1,3 @@
 #!/bin/sh
 cd $TSTSRCBASE
-hg -q files -I '{monetdb5,sql,geom}/**.{[ch],mal}' -X '**/Tests/**' | python 
-c 'import MonetDBtesting.malcheck'
+hg -q files -I '{monetdb5,sql,geom}/**.[ch]' -X '**/Tests/**' | python -c 
'import MonetDBtesting.melcheck'
diff --git a/clients/Tests/malcheck.timeout b/clients/Tests/melcheck.timeout
rename from clients/Tests/malcheck.timeout
rename to clients/Tests/melcheck.timeout
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1698,7 +1698,7 @@ tfastins_nocheck(BAT *b, BUN p, const vo
 static inline gdk_return __attribute__((__warn_unused_result__))
 tfastins(BAT *b, BUN p, const void *v)
 {
-       if (p > BATcapacity(b)) {
+       if (p >= BATcapacity(b)) {
                if (p >= BUN_MAX) {
                        GDKerror("tfastins: too many elements to accommodate (" 
BUNFMT ")\n", BUN_MAX);
                        return GDK_FAIL;
diff --git a/geom/BugTracker/Tests/copy_into_mbr.3492.SQL.py 
b/geom/BugTracker/Tests/copy_into_mbr.3492.SQL.py
deleted file mode 100644
--- a/geom/BugTracker/Tests/copy_into_mbr.3492.SQL.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from MonetDBtesting.sqltest import SQLTestCase
-
-with SQLTestCase() as tc:
-    # optional or default connection
-    tc.connect()
-    with open('copy_into_mbr.3492.sql') as f:
-        tc.execute(query=None, client='mclient', stdin=f)\
-            .assertSucceeded()\
-            .assertMatchStableOut(fout='copy_into_mbr.3492.stable.out')
diff --git a/geom/BugTracker/Tests/copy_into_mbr.3492.sql 
b/geom/BugTracker/Tests/copy_into_mbr.3492.sql
deleted file mode 100644
--- a/geom/BugTracker/Tests/copy_into_mbr.3492.sql
+++ /dev/null
@@ -1,14 +0,0 @@
-CREATE TABLE geom (id INTEGER, g GEOMETRY, b MBR);
-INSERT INTO geom values (5, NULL, NULL);
-INSERT INTO geom values (1, 'POLYGON((1 2, 3 2, 3 4, 1 4, 1 2))', NULL);
-INSERT INTO geom values (2, 'POLYGON((1 2, 3 2, 3 4, 1 4, 1 2))', 'MBR(1 2,3 
4)');
-INSERT INTO geom values (3, 'POLYGON((1 2, 3 2, 3 4, 1 4, 1 2))', 'MBR (1 2,3 
4)');
-INSERT INTO geom values (4, NULL, NULL);
-SELECT * FROM geom ORDER BY id;
-UPDATE geom SET b = MBR(g);
-SELECT * FROM geom ORDER BY id;
-CREATE TABLE newgeom (id INTEGER, g GEOMETRY, b MBR);
-INSERT INTO newgeom SELECT * FROM geom ORDER BY id;
-SELECT * FROM newgeom ORDER BY id;
-DROP TABLE geom;
-DROP TABLE newgeom;
diff --git a/geom/BugTracker/Tests/copy_into_mbr.3492.stable.out 
b/geom/BugTracker/Tests/copy_into_mbr.3492.stable.out
deleted file mode 100644
--- a/geom/BugTracker/Tests/copy_into_mbr.3492.stable.out
+++ /dev/null
@@ -1,83 +0,0 @@
-stdout of test 'copy_into_mbr.3492` in directory 'geom/BugTracker` itself:
-
-
-# 15:46:48 >  
-# 15:46:48 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=38234" "--set" 
"mapi_usock=/var/tmp/mtest-5384/.s.monetdb.38234" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/kostis/INSTALL/MonetDB/var/MonetDB/mTests_geom_BugTracker" 
"--set" "mal_listing=0"
-# 15:46:48 >  
-
-# MonetDB 5 server v11.17.18
-# This is an unreleased version
-# Serving database 'mTests_geom_BugTracker', using 4 threads
-# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
-# Found 7.497 GiB available main-memory.
-# Copyright (c) 1993-July 2008 CWI.
-# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
-# Visit http://www.monetdb.org/ for further information
-# Listening for connection requests on mapi:monetdb://leninovo:38234/
-# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-5384/.s.monetdb.38234
-# MonetDB/GIS module loaded
-# MonetDB/JAQL module loaded
-# MonetDB/SQL module loaded
-
-#Bulk operator required for geom.mbr
-#Bulk operator required for geom.mbr
-#Bulk operator required for geom.mbr
-#Bulk operator required for geom.mbr
-
-# 15:46:48 >  
-# 15:46:48 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-5384" "--port=38234"
-# 15:46:48 >  
-
-#CREATE TABLE geom (id INTEGER, g GEOMETRY, b MBR);
-#INSERT INTO geom values (5, NULL, NULL);
-[ 1    ]
-#INSERT INTO geom values (1, 'POLYGON((1 2, 3 2, 3 4, 1 4, 1 2))', NULL);
-[ 1    ]
-#INSERT INTO geom values (2, 'POLYGON((1 2, 3 2, 3 4, 1 4, 1 2))', 'BOX(1 2,3 
4)');
-[ 1    ]
-#INSERT INTO geom values (3, 'POLYGON((1 2, 3 2, 3 4, 1 4, 1 2))', 'BOX (1 2,3 
4)');
-[ 1    ]
-#INSERT INTO geom values (4, NULL, NULL);
-[ 1    ]
-#SELECT * FROM geom ORDER BY id;
-% sys.geom,    sys.geom,       sys.geom # table_name
-% id,  g,      b # name
-% int, geometry,       mbr # type
-% 1,   0,      0 # length
-[ 1,   "POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))",  NULL    ]
-[ 2,   "POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))",  "BOX (1 2, 3 4)"        ]
-[ 3,   "POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))",  "BOX (1 2, 3 4)"        ]
-[ 4,   NULL,   NULL    ]
-[ 5,   NULL,   NULL    ]
-#UPDATE geom SET b = MBR(g);
-[ 5    ]
-#SELECT * FROM geom ORDER BY id;
-% sys.geom,    sys.geom,       sys.geom # table_name
-% id,  g,      b # name
-% int, geometry,       mbr # type
-% 1,   0,      0 # length
-[ 1,   "POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))",  "BOX (1 2, 3 4)"        ]
-[ 2,   "POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))",  "BOX (1 2, 3 4)"        ]
-[ 3,   "POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))",  "BOX (1 2, 3 4)"        ]
-[ 4,   NULL,   NULL    ]
-[ 5,   NULL,   NULL    ]
-#CREATE TABLE newgeom (id INTEGER, g GEOMETRY, b MBR);
-#INSERT INTO newgeom SELECT * FROM geom ORDER BY id;
-[ 5    ]
-#SELECT * FROM newgeom ORDER BY id;
-% sys.newgeom, sys.newgeom,    sys.newgeom # table_name
-% id,  g,      b # name
-% int, geometry,       mbr # type
-% 1,   0,      0 # length
-[ 1,   "POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))",  "BOX (1 2, 3 4)"        ]
-[ 2,   "POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))",  "BOX (1 2, 3 4)"        ]
-[ 3,   "POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))",  "BOX (1 2, 3 4)"        ]
-[ 4,   NULL,   NULL    ]
-[ 5,   NULL,   NULL    ]
-#DROP TABLE geom;
-#DROP TABLE newgeom;
-
-# 15:46:48 >  
-# 15:46:48 >  "Done."
-# 15:46:48 >  
-
diff --git a/geom/BugTracker/Tests/copy_into_mbr.3492.test 
b/geom/BugTracker/Tests/copy_into_mbr.3492.test
new file mode 100644
--- /dev/null
+++ b/geom/BugTracker/Tests/copy_into_mbr.3492.test
@@ -0,0 +1,84 @@
+statement ok
+CREATE TABLE geom (id INTEGER, g GEOMETRY, b MBR)
+
+statement ok
+INSERT INTO geom values (5, NULL, NULL)
+
+statement ok
+INSERT INTO geom values (1, 'POLYGON((1 2, 3 2, 3 4, 1 4, 1 2))', NULL)
+
+statement ok
+INSERT INTO geom values (2, 'POLYGON((1 2, 3 2, 3 4, 1 4, 1 2))', 'MBR(1 2,3 
4)')
+
+statement ok
+INSERT INTO geom values (3, 'POLYGON((1 2, 3 2, 3 4, 1 4, 1 2))', 'MBR (1 2,3 
4)')
+
+statement ok
+INSERT INTO geom values (4, NULL, NULL)
+
+query ITT nosort
+SELECT * FROM geom ORDER BY id
+----
+1
+POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))
+NULL
+2
+POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))
+BOX (1.000000 2.000000, 3.000000 4.000000)
+3
+POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))
+BOX (1.000000 2.000000, 3.000000 4.000000)
+4
+NULL
+NULL
+5
+NULL
+NULL
+
+statement ok
+UPDATE geom SET b = MBR(g)
+
+query ITT nosort
+SELECT * FROM geom ORDER BY id
+----
+1
+POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))
+BOX (1.000000 2.000000, 3.000000 4.000000)
+2
+POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))
+BOX (1.000000 2.000000, 3.000000 4.000000)
+3
+POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))
+BOX (1.000000 2.000000, 3.000000 4.000000)
+4
+NULL
+NULL
+5
+NULL
+NULL
+
+statement ok
+CREATE TABLE newgeom (id INTEGER, g GEOMETRY, b MBR)
+
+statement ok
+INSERT INTO newgeom SELECT * FROM geom ORDER BY id
+
+query ITT nosort
+SELECT * FROM newgeom ORDER BY id
+----
+1
+POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))
+BOX (1.000000 2.000000, 3.000000 4.000000)
+2
+POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))
+BOX (1.000000 2.000000, 3.000000 4.000000)
+3
+POLYGON ((1 2, 3 2, 3 4, 1 4, 1 2))
+BOX (1.000000 2.000000, 3.000000 4.000000)
+4
+NULL
+NULL
+5
+NULL
+NULL
+
diff --git a/geom/sql/functions/Tests/ST_MakeBox2D.SQL.py 
b/geom/sql/functions/Tests/ST_MakeBox2D.SQL.py
deleted file mode 100644
--- a/geom/sql/functions/Tests/ST_MakeBox2D.SQL.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from MonetDBtesting.sqltest import SQLTestCase
-
-with SQLTestCase() as tc:
-    # optional or default connection
-    tc.connect()
-    with open('ST_MakeBox2D.sql') as f:
-        tc.execute(query=None, client='mclient', stdin=f)\
-            .assertMatchStableOut(fout='ST_MakeBox2D.stable.out', 
ignore_headers=True)\
-            .assertMatchStableError(ferr='ST_MakeBox2D.stable.err')
diff --git a/geom/sql/functions/Tests/ST_MakeBox2D.sql 
b/geom/sql/functions/Tests/ST_MakeBox2D.sql
deleted file mode 100644
--- a/geom/sql/functions/Tests/ST_MakeBox2D.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-select ST_MakeBox2D(ST_Point(-989502.1875, 528439.5625), ST_Point(-987121.375 
,529933.1875));
-select ST_MakeBox2D(ST_Point(-989502.1875, 528439.5625), null);
-select ST_MakeBox2D(ST_PointFromText('POINT(-989502.1875 528439.5625)'), 
ST_GeomFromText('linestring(-987121.375 529933.1875, 0 0)'));
-
-CREATE TABLE t(geom GEOMETRY(POINT));
-INSERT INTO t VALUES(ST_Point(10, 20)), (ST_Point(30, 40)), (ST_Point(50, 
60)), (ST_Point(70, 80));
-SELECT geom AS "P", ST_MakeBox2D(geom, ST_Point(90, 90)) AS "BOX2D" FROM t;
-SELECT g1.geom AS "P1", g2.geom AS "P2", ST_MakeBox2D(g1.geom, g2.geom) AS 
"BOX2D" FROM t g1, t g2;
-DROP TABLE t;
diff --git a/geom/sql/functions/Tests/ST_MakeBox2D.stable.err 
b/geom/sql/functions/Tests/ST_MakeBox2D.stable.err
deleted file mode 100644
--- a/geom/sql/functions/Tests/ST_MakeBox2D.stable.err
+++ /dev/null
@@ -1,40 +0,0 @@
-stderr of test 'ST_MakeBox2D` in directory 'geom/sql/functions` itself:
-
-
-# 12:51:07 >  
-# 12:51:07 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=35113" "--set" 
"mapi_usock=/var/tmp/mtest-22301/.s.monetdb.35113" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/export/scratch1/alvanaki/INSTALL/MonetDB-public/var/MonetDB/mTests_geom_sql_Tests_functions"
 "--set" "mal_listing=0"
-# 12:51:07 >  
-
-# builtin opt  gdk_dbpath = 
/export/scratch1/alvanaki/INSTALL/MonetDB-public/var/monetdb5/dbfarm/demo
-# builtin opt  gdk_debug = 0
-# builtin opt  gdk_vmtrim = no
-# builtin opt  monet_prompt = >
-# builtin opt  monet_daemon = no
-# builtin opt  mapi_port = 50000
-# builtin opt  mapi_open = false
-# builtin opt  mapi_autosense = false
-# builtin opt  sql_optimizer = default_pipe
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to