Changeset: 444ccffd7751 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=444ccffd7751 Modified Files: sql/test/BugTracker-2011/Tests/All sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.err sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out Branch: Aug2011 Log Message:
Added test for bug 2239. diffs (183 lines): diff --git a/sql/test/BugTracker-2011/Tests/All b/sql/test/BugTracker-2011/Tests/All --- a/sql/test/BugTracker-2011/Tests/All +++ b/sql/test/BugTracker-2011/Tests/All @@ -54,3 +54,4 @@ alter-table-set-read-only.bug-2906 predicate.Bug-2908 history.Bug-2909 interrupted-initialization.Bug-2875 +case-overflow.Bug-2239 diff --git a/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql @@ -0,0 +1,46 @@ +start transaction; + +create table t2239 ( + station136 smallint +); +copy 3 records into t2239 from stdin; +1537 +1228 +1214 + +select station136, + ((CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + + (CASE WHEN station136 is NULL THEN 0 ELSE station136 END)) +from t2239 order by station136; + +rollback; diff --git a/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.err b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.err @@ -0,0 +1,37 @@ +stderr of test 'case-overflow.Bug-2239` in directory 'test/BugTracker-2011` itself: + + +# 14:42:40 > +# 14:42:40 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "gdk_dbfarm=/ufs/sjoerd/Monet-stable/var/MonetDB" "--set" "mapi_open=true" "--set" "mapi_port=30822" "--set" "monet_prompt=" "--trace" "--forcemito" "--set" "mal_listing=2" "--dbname=mTests_test_BugTracker-2011" "--set" "mal_listing=0" +# 14:42:40 > + +# builtin opt gdk_dbname = demo +# builtin opt gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/monetdb5/dbfarm +# builtin opt gdk_debug = 0 +# builtin opt gdk_alloc_map = no +# 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 gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/MonetDB +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 30822 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbname = mTests_test_BugTracker-2011 +# cmdline opt mal_listing = 0 + +# 14:42:40 > +# 14:42:40 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=madrid" "--port=30822" +# 14:42:40 > + + +# 14:42:40 > +# 14:42:40 > "Done." +# 14:42:40 > + diff --git a/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out @@ -0,0 +1,77 @@ +stdout of test 'case-overflow.Bug-2239` in directory 'test/BugTracker-2011` itself: + + +# 14:42:40 > +# 14:42:40 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "gdk_dbfarm=/ufs/sjoerd/Monet-stable/var/MonetDB" "--set" "mapi_open=true" "--set" "mapi_port=30822" "--set" "monet_prompt=" "--trace" "--forcemito" "--set" "mal_listing=2" "--dbname=mTests_test_BugTracker-2011" "--set" "mal_listing=0" +# 14:42:40 > + +# MonetDB 5 server v11.5.8 +# This is an unreleased version +# Serving database 'mTests_test_BugTracker-2011', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 15.662 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2011 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://madrid.ins.cwi.nl:30822/ +# MonetDB/GIS module loaded +# MonetDB/SQL module loaded + +Ready. +# SQL catalog created, loading sql scripts once +# 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_history.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: 40_geom.sql +# loading sql script: 80_udf.sql +# loading sql script: 99_system.sql + +# 14:42:40 > +# 14:42:40 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=madrid" "--port=30822" +# 14:42:40 > + +#start transaction; +#create table t2239 ( +# station136 smallint +#); +#copy 3 records into t2239 from stdin; +#1537 +#1228 +#1214 +# +[ 3 ] +#select station136, +# ((CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + +# (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + +# (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + +# (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + +# (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + +# (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + +# (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + +# (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) + +% sys.t2239, sys. # table_name +% station136, isnull_station136 # name +% smallint, int # type +% 4, 5 # length +[ 1214, 38848 ] +[ 1228, 39296 ] +[ 1537, 49184 ] +#rollback; + +# 14:42:40 > +# 14:42:40 > "Done." +# 14:42:40 > + _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
