Changeset: d95ef65d30fb for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d95ef65d30fb
Added Files:
sql/test/bugs/Tests/filter_error.sql
sql/test/bugs/Tests/filter_error.stable.err
sql/test/bugs/Tests/filter_error.stable.out
Modified Files:
sql/server/rel_select.c
sql/test/bugs/Tests/All
testing/listexports.py.in
Branch: default
Log Message:
merged with Jun2016
diffs (203 lines):
diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c
--- a/sql/server/rel_select.c
+++ b/sql/server/rel_select.c
@@ -1344,8 +1344,10 @@ rel_filter(mvc *sql, sql_rel *rel, list
exps = nexps;
}
}
- if (!f)
+ if (!f) {
+ return sql_error(sql, 02, "SELECT: no such FILTER function
'%s'", filter_op);
return NULL;
+ }
e = exp_filter(sql->sa, l, r, f, anti);
/* atom or row => select */
diff --git a/sql/test/bugs/Tests/All b/sql/test/bugs/Tests/All
--- a/sql/test/bugs/Tests/All
+++ b/sql/test/bugs/Tests/All
@@ -109,3 +109,4 @@ cur_date_crash-JIRA-42
WHERE_and_multiple_LEFT_JOIN_incorrect_results-JIRA-43
WHERE_IN_subquery_incorrect_results-JIRA-44
select_select_bug
+filter_error
diff --git a/sql/test/bugs/Tests/filter_error.sql
b/sql/test/bugs/Tests/filter_error.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/bugs/Tests/filter_error.sql
@@ -0,0 +1,17 @@
+create table test1(id int, geom Geometry);
+create table test2(x double, y double, z double);
+
+create table papoints AS ( --get points from intersecting patches
+ SELECT a.id, x, y, z, geom FROM test1 a, test2 b
+ WHERE [a.geom] IntersectsXYZ [x, y, z,28992]) WITH DATA;
+
+create table papoints AS ( --get points from intersecting patches
+ SELECT a.type, a.id, x, y, z, geom FROM test1 a
+ --LEFT JOIN pointcloud_unclassified b ON (ST_Intersects(a.geom,
geometry(b.pa)))
+ --LEFT JOIN pointcloud_unclassified b ON (ST_Intersects(a.geom, x, y,
z,28992))
+ LEFT JOIN test2 b ON ([a.geom] IntersectsXYZ [x, y, z,28992])
+) WITH DATA;
+
+drop table test1;
+drop table test2;
+
diff --git a/sql/test/bugs/Tests/filter_error.stable.err
b/sql/test/bugs/Tests/filter_error.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/bugs/Tests/filter_error.stable.err
@@ -0,0 +1,48 @@
+stderr of test 'filter_error` in directory 'sql/test/bugs` itself:
+
+
+# 17:51:55 >
+# 17:51:55 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=30016" "--set"
"mapi_usock=/var/tmp/mtest-25939/.s.monetdb.30016" "--set" "monet_prompt="
"--forcemito"
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_bugs"
"--set" "embedded_r=yes"
+# 17:51:55 >
+
+# builtin opt gdk_dbpath =
/home/niels/scratch/rc-clean/Linux-x86_64/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
+# builtin opt sql_debug = 0
+# cmdline opt gdk_nr_threads = 0
+# cmdline opt mapi_open = true
+# cmdline opt mapi_port = 30016
+# cmdline opt mapi_usock = /var/tmp/mtest-25939/.s.monetdb.30016
+# cmdline opt monet_prompt =
+# cmdline opt gdk_dbpath =
/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_bugs
+# cmdline opt embedded_r = yes
+# cmdline opt gdk_debug = 536870922
+
+# 17:51:55 >
+# 17:51:55 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-25939" "--port=30016"
+# 17:51:55 >
+
+MAPI = (monetdb) /var/tmp/mtest-25939/.s.monetdb.30016
+QUERY = create table papoints AS ( --get points from intersecting patches
+ SELECT a.id, x, y, z, geom FROM test1 a, test2 b
+ WHERE [a.geom] IntersectsXYZ [x, y, z,28992]) WITH DATA;
+ERROR = !SELECT: no such FILTER function 'intersectsxyz'
+MAPI = (monetdb) /var/tmp/mtest-25939/.s.monetdb.30016
+QUERY = create table papoints AS ( --get points from intersecting patches
+ SELECT a.type, a.id, x, y, z, geom FROM test1 a
+ --LEFT JOIN pointcloud_unclassified b ON (ST_Intersects(a.geom,
geometry(b.pa)))
+ --LEFT JOIN pointcloud_unclassified b ON (ST_Intersects(a.geom,
x, y, z,28992))
+ LEFT JOIN test2 b ON ([a.geom] IntersectsXYZ [x, y, z,28992])
+ ) WITH DATA;
+ERROR = !SELECT: no such FILTER function 'intersectsxyz'
+
+# 17:51:56 >
+# 17:51:56 > "Done."
+# 17:51:56 >
+
diff --git a/sql/test/bugs/Tests/filter_error.stable.out
b/sql/test/bugs/Tests/filter_error.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/bugs/Tests/filter_error.stable.out
@@ -0,0 +1,75 @@
+stdout of test 'filter_error` in directory 'sql/test/bugs` itself:
+
+
+# 17:51:55 >
+# 17:51:55 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=30016" "--set"
"mapi_usock=/var/tmp/mtest-25939/.s.monetdb.30016" "--set" "monet_prompt="
"--forcemito"
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_bugs"
"--set" "embedded_r=yes"
+# 17:51:55 >
+
+# MonetDB 5 server v11.23.4
+# This is an unreleased version
+# Serving database 'mTests_sql_test_bugs', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit
integers dynamically linked
+# Found 7.332 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://localhost.nes.nl:30016/
+# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-25939/.s.monetdb.30016
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# MonetDB/R module loaded
+
+Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 17_temporal.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 24_zorder.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 26_sysmon.sql
+# loading sql script: 27_rejects.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 39_analytics_hge.sql
+# loading sql script: 40_geom.sql
+# loading sql script: 40_json.sql
+# loading sql script: 40_json_hge.sql
+# loading sql script: 41_md5sum.sql
+# loading sql script: 45_uuid.sql
+# loading sql script: 46_gsl.sql
+# loading sql script: 46_profiler.sql
+# loading sql script: 51_sys_schema_extension.sql
+# loading sql script: 72_fits.sql
+# loading sql script: 74_netcdf.sql
+# loading sql script: 75_shp.sql
+# loading sql script: 75_storagemodel.sql
+# loading sql script: 80_statistics.sql
+# loading sql script: 80_udf.sql
+# loading sql script: 80_udf_hge.sql
+# loading sql script: 85_bam.sql
+# loading sql script: 90_generator.sql
+# loading sql script: 90_generator_hge.sql
+# loading sql script: 99_system.sql
+
+# 17:51:55 >
+# 17:51:55 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-25939" "--port=30016"
+# 17:51:55 >
+
+#create table test1(id int, geom Geometry);
+#create table test2(x double, y double, z double);
+#drop table test1;
+#drop table test2;
+
+# 17:51:56 >
+# 17:51:56 > "Done."
+# 17:51:56 >
+
diff --git a/testing/listexports.py.in b/testing/listexports.py.in
--- a/testing/listexports.py.in
+++ b/testing/listexports.py.in
@@ -45,12 +45,16 @@ def extract(f):
res = expre.search(data)
while res is not None:
pos = res.end(0)
- decl = exportutils.normalize(res.group('decl'))
- res = nmere.search(decl)
- if res is not None:
- decls.append((res.group('name'), decl))
+ decl = res.group('decl')
+ if '{' in decl:
+ sys.stderr.write('export on definition:\n%s\n' % res.group(0))
else:
- decls.append(('', decl))
+ decl = exportutils.normalize(decl)
+ res = nmere.search(decl)
+ if res is not None:
+ decls.append((res.group('name'), decl))
+ else:
+ decls.append(('', decl))
res = expre.search(data, pos)
return decls
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list