Changeset: 100b8602e6e7 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=100b8602e6e7 Added Files: sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.sql sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.stable.err sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.stable.out Removed Files: sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.sql sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err.Windows sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out.Windows sql/test/BugTracker/Tests/cardinality_violation.SF-1240701.sql sql/test/BugTracker/Tests/cardinality_violation.SF-1240701.stable.err sql/test/BugTracker/Tests/cardinality_violation.SF-1240701.stable.err.Windows sql/test/BugTracker/Tests/cardinality_violation.SF-1240701.stable.out Modified Files: common/options/monet_options.c gdk/gdk_utils.c monetdb5/modules/mal/inspect.c sql/test/BugDay_2005-12-19_2.9.3/Tests/All sql/test/BugTracker-2014/Tests/nested_common_table_exp.Bug-3417.stable.err sql/test/BugTracker-2014/Tests/nested_common_table_exp.Bug-3417.stable.out sql/test/BugTracker/Tests/All Branch: default Log Message:
Merge with Jan2014 branch. diffs (truncated from 660 to 300 lines): diff --git a/common/options/monet_options.c b/common/options/monet_options.c --- a/common/options/monet_options.c +++ b/common/options/monet_options.c @@ -250,7 +250,13 @@ mo_builtin_settings(opt **Set) i++; set[i].kind = opt_builtin; set[i].name = strdup("gdk_vmtrim"); +#if SIZEOF_VOID_P == 4 + /* 32 bit architecture */ set[i].value = strdup("yes"); +#else + /* 64 bit architecture */ + set[i].value = strdup("no"); +#endif i++; set[i].kind = opt_builtin; set[i].name = strdup("monet_prompt"); diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c --- a/gdk/gdk_utils.c +++ b/gdk/gdk_utils.c @@ -1084,6 +1084,18 @@ GDKinit(opt *set, int setlen) GDKsetenv("gdk_dbname", p + 1); #endif } + if (GDKgetenv("gdk_vm_maxsize") == NULL) { + snprintf(buf, sizeof(buf), SZFMT, GDK_vm_maxsize); + GDKsetenv("gdk_vm_maxsize", buf); + } + if (GDKgetenv("gdk_mem_maxsize") == NULL) { + snprintf(buf, sizeof(buf), SZFMT, GDK_mem_maxsize); + GDKsetenv("gdk_mem_maxsize", buf); + } + if (GDKgetenv("gdk_mmap_minsize") == NULL) { + snprintf(buf, sizeof(buf), SZFMT, GDK_mmap_minsize); + GDKsetenv("gdk_mmap_minsize", buf); + } if (GDKgetenv("gdk_mmap_pagesize") == NULL) { snprintf(buf, sizeof(buf), SZFMT, GDK_mmap_pagesize); GDKsetenv("gdk_mmap_pagesize", buf); diff --git a/monetdb5/modules/mal/inspect.c b/monetdb5/modules/mal/inspect.c --- a/monetdb5/modules/mal/inspect.c +++ b/monetdb5/modules/mal/inspect.c @@ -512,7 +512,7 @@ INSPECTgetEnvironmentKey(str *ret, str * { str s = GDKgetenv(*key); if (s == 0) - throw(MAL, "inspect.getEnvironment", MAL_MALLOC_FAIL); + throw(MAL, "inspect.getEnvironment", "environment variable '%s' not found", *key); *ret = GDKstrdup(s); return MAL_SUCCEED; } diff --git a/sql/test/BugDay_2005-12-19_2.9.3/Tests/All b/sql/test/BugDay_2005-12-19_2.9.3/Tests/All --- a/sql/test/BugDay_2005-12-19_2.9.3/Tests/All +++ b/sql/test/BugDay_2005-12-19_2.9.3/Tests/All @@ -6,7 +6,7 @@ in_operator.SF-1211925 prepare_doesnot_like_LIKE.SF-1234205 prepare-where.SF-1238867.1238959.1238965.1240124 delete_where_1_equals_1.SF-1240162 -select_from_env.SF-1240701.1242164 +subselect_cardinality.SF-1240701.1242164 default_next_value_for_non_ex_seq.SF.1246631 cast_interval.SF.1280682 interval_times_int.SF-1281996 diff --git a/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err.Windows b/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err.Windows deleted file mode 100644 --- a/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err.Windows +++ /dev/null @@ -1,20 +0,0 @@ -stderr of test 'select_from_env.SF-1240701.1242164` in directory 'sql/test/BugDay_2005-12-19_2.9.3` itself: - - -# 13:22:15 > -# 13:22:15 > Mtimeout -timeout 180 Mserver "--config=/ufs/sjoerd/Monet-virgin/etc/MonetDB.conf" --debug=10 --set "monet_mod_path=/ufs/sjoerd/src/MonetDB/devel/sql-virgin/Linux/lib/MonetDB:/ufs/sjoerd/Monet-virgin/lib/MonetDB" --set "gdk_dbfarm=/ufs/sjoerd/Monet-virgin/var/MonetDB/dbfarm" --set "sql_logdir=/ufs/sjoerd/Monet-virgin/var/MonetDB/log" --set mapi_port=30620 --set sql_port=47090 --set xquery_port=50410 --set monet_prompt= --trace "--dbname=mTests_src_test_BugDay_2005-12-19_2.9.3" --dbinit="module(sql_server); sql_server_start();" ; echo ; echo Over.. -# 13:22:15 > - - -# 22:29:10 > -# 22:29:10 > mclient -lsql -i -umonetdb -Pmonetdb --host=pegasus --port=30332 -# 22:29:10 > - -MAPI = (monetdb) /var/tmp/mtest-28498/.s.monetdb.30263 -QUERY = select * from env() as env where name = ( select 'prefix' from env() as env ); -ERROR = !cardinality violation (19>1) - -# 13:22:15 > -# 13:22:15 > Done. -# 13:22:15 > - diff --git a/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out.Windows b/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out.Windows deleted file mode 100644 --- a/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out.Windows +++ /dev/null @@ -1,54 +0,0 @@ -stdout of test 'select_from_env.SF-1240701.1242164` in directory 'sql/test/BugDay_2005-12-19_2.9.3` itself: - - -# 19:10:37 > -# 19:10:37 > mserver5 "--config=/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix./etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix./lib64/MonetDB5:/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix./lib64/MonetDB5/lib:/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix./lib64/MonetDB5/bin" --set "gdk_dbfarm=/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix./var/MonetDB5/dbfarm" --set "sql_logdir=/ufs/manegold/_/scratch0/Monet/Testing/Current/prefix./var/MonetDB5/sql_logs" --set mapi_open=true --set xrpc_open=true --set mapi_port=33236 --set xrpc_port=46350 --set monet_prompt= --trace "--dbname=mTests_src_test_BugDay_2005-12-19_2.9.3" --set mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over.. -# 19:10:37 > - -# MonetDB server v5.7.0, based on kernel v1.25.0 -# Serving database 'mTests_src_test_BugDay_2005-12-19_2.9.3', using 4 threads -# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked -# Copyright (c) 1993-July 2008 CWI. -# Copyright (c) August 2008- MonetDB B.V., all rights reserved -# Visit http://monetdb.cwi.nl/ for further information -# Listening for connection requests on mapi:monetdb://rig.ins.cwi.nl:33236/ -# MonetDB/SQL module v2.25.0 loaded - -Ready. -#function user.main():void; -# clients.quit(); -#end main; - - -# 11:51:03 > -# 11:51:03 > Mtimeout -timeout 60 MapiClient -lsql -umonetdb -Pmonetdb --host=localhost --port=35781 < select_from_env.SF-1240701.1242164.sql -# 11:51:03 > - -% .env # table_name -% name # name -% varchar # type -% 17 # length -[ "gdk_dbname" ] -[ "gdk_dbpath" ] -[ "gdk_debug" ] -[ "gdk_mmap_pagesize" ] -[ "gdk_nr_threads" ] -[ "gdk_vmtrim" ] -[ "mal_listing" ] -[ "mapi_autosense" ] -[ "mapi_open" ] -[ "mapi_port" ] -[ "max_clients" ] -[ "monet_daemon" ] -[ "monet_mod_path" ] -[ "monet_pid" ] -[ "monet_prompt" ] -[ "monet_release" ] -[ "monet_version" ] -[ "sql_debug" ] -[ "sql_optimizer" ] - -# 13:22:15 > -# 13:22:15 > Done. -# 13:22:15 > - diff --git a/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.sql b/sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.sql rename from sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.sql rename to sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.sql --- a/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.sql +++ b/sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.sql @@ -1,2 +1,17 @@ -select * from env() as env where name = ( select 'prefix' from env() as env ); -select name from env() as env where 1 in ( select 1 from env() as env ) order by name; +create table tab (i integer); +insert into tab values (1),(2),(3); + +select * from tab where i = (select 0 from tab where i < 1) order by i; +select * from tab where i = (select 0 from tab where i < 2) order by i; +select * from tab where i = (select 0 from tab where i < 3) order by i; +select * from tab where i in (select 0 from tab where i < 1) order by i; +select * from tab where i in (select 0 from tab where i < 2) order by i; +select * from tab where i in (select 0 from tab where i < 3) order by i; +select * from tab where i = (select i from tab where i < 1) order by i; +select * from tab where i = (select i from tab where i < 2) order by i; +select * from tab where i = (select i from tab where i < 3) order by i; +select * from tab where i in (select i from tab where i < 1) order by i; +select * from tab where i in (select i from tab where i < 2) order by i; +select * from tab where i in (select i from tab where i < 3) order by i; + +drop table tab; diff --git a/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err b/sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.stable.err rename from sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err rename to sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.stable.err --- a/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err +++ b/sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.stable.err @@ -1,20 +1,41 @@ -stderr of test 'select_from_env.SF-1240701.1242164` in directory 'sql/test/BugDay_2005-12-19_2.9.3` itself: +stderr of test 'subselect_cardinality.SF-1240701.1242164` in directory 'sql/test/BugDay_2005-12-19_2.9.3` itself: -# 13:22:15 > -# 13:22:15 > Mtimeout -timeout 180 Mserver "--config=/ufs/sjoerd/Monet-virgin/etc/MonetDB.conf" --debug=10 --set "monet_mod_path=/ufs/sjoerd/src/MonetDB/devel/sql-virgin/Linux/lib/MonetDB:/ufs/sjoerd/Monet-virgin/lib/MonetDB" --set "gdk_dbfarm=/ufs/sjoerd/Monet-virgin/var/MonetDB/dbfarm" --set "sql_logdir=/ufs/sjoerd/Monet-virgin/var/MonetDB/log" --set mapi_port=30620 --set sql_port=47090 --set xquery_port=50410 --set monet_prompt= --trace "--dbname=mTests_src_test_BugDay_2005-12-19_2.9.3" --dbinit="module(sql_server); sql_server_start();" ; echo ; echo Over.. -# 13:22:15 > +# 11:09:03 > +# 11:09:03 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=34323" "--set" "mapi_usock=/var/tmp/mtest-26111/.s.monetdb.34323" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/ufs/sjoerd/Monet-candidate/var/MonetDB/mTests_sql_test_BugDay_2005-12-19_2.9.3" "--set" "mal_listing=0" +# 11:09:03 > +# builtin opt gdk_dbpath = /ufs/sjoerd/Monet-candidate/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = yes +# 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 = 34323 +# cmdline opt mapi_usock = /var/tmp/mtest-26111/.s.monetdb.34323 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /ufs/sjoerd/Monet-candidate/var/MonetDB/mTests_sql_test_BugDay_2005-12-19_2.9.3 +# cmdline opt mal_listing = 0 -# 22:29:10 > -# 22:29:10 > mclient -lsql -i -umonetdb -Pmonetdb --host=pegasus --port=30332 -# 22:29:10 > +# 11:09:03 > +# 11:09:03 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-26111" "--port=34323" +# 11:09:03 > -MAPI = (monetdb) /var/tmp/mtest-3452/.s.monetdb.38942 -QUERY = select * from env() as env where name = ( select 'prefix' from env() as env ); -ERROR = !cardinality violation (20>1) +MAPI = (monetdb) /var/tmp/mtest-26111/.s.monetdb.34323 +QUERY = select * from tab where i = (select 0 from tab where i < 3) order by i; +ERROR = !cardinality violation (2>1) +MAPI = (monetdb) /var/tmp/mtest-26111/.s.monetdb.34323 +QUERY = select * from tab where i = (select i from tab where i < 3) order by i; +ERROR = !cardinality violation (2>1) -# 13:22:15 > -# 13:22:15 > Done. -# 13:22:15 > +# 11:09:03 > +# 11:09:03 > "Done." +# 11:09:03 > diff --git a/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out b/sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.stable.out rename from sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out rename to sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.stable.out --- a/sql/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out +++ b/sql/test/BugDay_2005-12-19_2.9.3/Tests/subselect_cardinality.SF-1240701.1242164.stable.out @@ -1,4 +1,4 @@ -stdout of test 'select_from_env.SF-1240701.1242164` in directory 'sql/test/BugDay_2005-12-19_2.9.3` itself: +stdout of test 'subselect_cardinality.SF-1240701.1242164` in directory 'sql/test/BugDay_2005-12-19_2.9.3` itself: # 19:10:37 > @@ -15,41 +15,97 @@ stdout of test 'select_from_env.SF-12407 # MonetDB/SQL module v2.25.0 loaded Ready. -#function user.main():void; -# clients.quit(); -#end main; +# 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_compress.sql +# loading sql script: 18_dictionary.sql +# loading sql script: 19_cluster.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: 39_analytics.sql +# loading sql script: 40_geom.sql +# loading sql script: 46_gsl.sql +# loading sql script: 75_storagemodel.sql +# loading sql script: 80_statistics.sql +# loading sql script: 80_udf.sql +# loading sql script: 99_system.sql +# 11:09:03 > +# 11:09:03 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-26111" "--port=34323" +# 11:09:03 > -# 11:51:03 > -# 11:51:03 > Mtimeout -timeout 60 MapiClient -lsql -umonetdb -Pmonetdb --host=localhost --port=35781 < select_from_env.SF-1240701.1242164.sql -# 11:51:03 > +#create table tab (i integer); +#insert into tab values (1),(2),(3); +[ 3 ] +#select * from tab where i = (select 0 from tab where i < 1) order by i; +% sys.tab # table_name +% i # name +% int # type +% 1 # length +#select * from tab where i = (select 0 from tab where i < 2) order by i; +% sys.tab # table_name +% i # name +% int # type +% 1 # length +#select * from tab where i in (select 0 from tab where i < 1) order by i; +% sys.tab # table_name +% i # name _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list