Changeset: 66faaf067601 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=66faaf067601 Modified Files: sql/src/test/BugTracker-2010/Tests/All sql/src/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.sql sql/src/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.err sql/src/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.out Branch: Jun2010 Log Message:
Add (sort of reverse-engineered) test for bug #2577 diffs (238 lines): diff -r 093234c8be76 -r 66faaf067601 sql/src/test/BugTracker-2010/Tests/All --- a/sql/src/test/BugTracker-2010/Tests/All Fri Jul 09 11:44:14 2010 +0200 +++ b/sql/src/test/BugTracker-2010/Tests/All Fri Jul 09 13:09:44 2010 +0200 @@ -23,3 +23,4 @@ prepare_statements_crash_server.Bug-2599 and_not_broken.Bug-2602 insert-into-except.Bug-2569 +not-in-union-except-union.Bug-2577 diff -r 093234c8be76 -r 66faaf067601 sql/src/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.sql Fri Jul 09 13:09:44 2010 +0200 @@ -0,0 +1,93 @@ +-- http://bugs.monetdb.org/show_bug.cgi?id=2577 + +CREATE TABLE "sys"."kvk" ( + "id" serial, + "kvk" bigint, + "bedrijfsnaam" varchar(256), + "adres" varchar(64), + "postcode" char(6), + "plaats" varchar(32), + "type" varchar(14), + "kvks" int, + "sub" int, + "bedrijfsnaam_size" smallint, + "adres_size" smallint +); + +CREATE TABLE "sys"."kvk_nieuw" ( + "kvk" bigint, + "bedrijfsnaam" varchar(256), + "kvks" int, + "sub" int, + "adres" varchar(64), + "postcode" varchar(8), + "plaats" varchar(32), + "type" varchar(14) +); + +CREATE TABLE "sys"."kvk_extra" ( + "kvk" bigint, + "bedrijfsnaam" varchar(256), + "straat" varchar(256), + "nummer" int, + "toevoeging" varchar(16), + "postcode" char(6), + "plaats" varchar(32), + "website" varchar(128), + "type" varchar(14), + "status" varchar(64), + "kvks" int, + "sub" int +); + +CREATE TABLE "sys"."kvk_extra_nieuw" ( + "kvk" bigint, + "bedrijfsnaam" varchar(256), + "straat" varchar(256), + "nummer" int, + "toevoeging" varchar(16), + "postcode" varchar(10), + "plaats" varchar(32), + "website" varchar(128), + "type" varchar(14), + "status" varchar(64), + "kvks" int, + "sub" int +); + +INSERT INTO "kvk" ("kvk", "bedrijfsnaam", "adres", "postcode", "plaats", "type", "kvks", "sub", "bedrijfsnaam_size", "adres_size") + VALUES (1, 'MonetDB', 'Lelielaan 6', '1234AB', 'Brugstede', 'db', 1, 1, 12, 14); + +INSERT INTO "kvk_nieuw" + VALUES (2, 'PostgreSQL', 1, 1, 'Olifantenlei 12', '2345BC', 'Trompethuis', 'db'); + +INSERT INTO "kvk_extra" + VALUES (3, 'MySQL', 'Dolfijnstraat', 24, NULL, '3456CD', 'Dolfinarium', 'www.mysql.com', 'db', 'alive', 1, 1); + +INSERT INTO "kvk_extra_nieuw" + VALUES (4, 'CouchDB', 'Zetelkade', 48, 'b', '4567DE', 'Zandbank', 'www.couchdb.org', 'db', 'relaxed', 1, 1); + +-- reporter says this returns NULL values +select kvk from kvk where kvk not in ( + select kvk from kvk_nieuw + union + select kvk from kvk_extra + union + select kvk from kvk_extra_nieuw +); + +-- and this should do what he wants +select kvk from kvk except ( + select kvk from kvk_nieuw + union + select kvk from kvk_extra + union + select kvk from kvk_extra_nieuw +); + + +DROP TABLE kvk; +DROP TABLE kvk_nieuw; +DROP TABLE kvk_extra; +DROP TABLE kvk_extra_nieuw; + diff -r 093234c8be76 -r 66faaf067601 sql/src/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.err --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.err Fri Jul 09 13:09:44 2010 +0200 @@ -0,0 +1,78 @@ +stderr of test 'not-in-union-except-union.Bug-2577` in directory 'src/test/BugTracker-2010` itself: + + +# 13:07:28 > +# 13:07:28 > mserver5 "--config=/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5:/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5/lib:/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-Jun2010-volund.ins.cwi.nl/sql/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=39783 --set xrpc_port=48465 --set monet_prompt= --set mal_listing=2 --trace "--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo Over.. +# 13:07:28 > + +# builtin opt gdk_arch = 64bitx86_64-pc-linux-gnu +# builtin opt gdk_version = 1.38.1 +# builtin opt prefix = /ufs/fabian/scratch/monetdb/Jun2010/program-x86_64 +# builtin opt exec_prefix = ${prefix} +# builtin opt gdk_dbname = demo +# builtin opt gdk_dbfarm = ${prefix}/var/MonetDB/dbfarm +# builtin opt gdk_debug = 0 +# builtin opt gdk_alloc_map = no +# builtin opt gdk_vmtrim = yes +# builtin opt monet_admin = adm +# builtin opt monet_prompt = > +# builtin opt monet_welcome = yes +# builtin opt monet_mod_path = /ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB +# builtin opt monet_daemon = no +# builtin opt host = localhost +# builtin opt mapi_port = 50000 +# builtin opt mapi_clients = 2 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_debug = 0 +# builtin opt standoff_ns = +# builtin opt standoff_start = start +# builtin opt standoff_end = end +# config opt prefix = /ufs/fabian/scratch/monetdb/Jun2010/program-x86_64 +# config opt config = ${prefix}/etc/monetdb5.conf +# config opt prefix = /ufs/fabian/scratch/monetdb/Jun2010/program-x86_64 +# config opt exec_prefix = ${prefix} +# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm +# config opt monet_mod_path = /ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5:/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5/lib:/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5/bin +# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid +# config opt mero_controlport = 50001 +# config opt sql_optimizer = default_pipe +# config opt minimal_pipe = inline,remap,deadcode,multiplex,garbageCollector +# config opt default_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt nov2009_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt replication_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,replication,multiplex,garbageCollector +# config opt accumulator_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,accumulators,dataflow,history,multiplex,garbageCollector +# config opt recycler_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,deadcode,constants,commonTerms,joinPath,deadcode,recycle,reduce,dataflow,history,multiplex,garbageCollector +# config opt cracker_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,selcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt sidcrack_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,sidcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt datacell_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,deadcode,constants,commonTerms,joinPath,datacell,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt octopus_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,constants,commonTerms,joinPath,octopus,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt mapreduce_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mapreduce,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt datacyclotron_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,datacyclotron,mergetable,deadcode,constants,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,replication,multiplex,garbageCollector +# config opt derive_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,derivePath,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt dictionary_pipe = inline,remap,dictionary,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt compression_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,compression,dataflow,history,multiplex,garbageCollector +# cmdline opt config = /ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/etc/monetdb5.conf +# cmdline opt gdk_nr_threads = 0 +# cmdline opt monet_mod_path = /ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5:/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5/lib:/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5/bin +# cmdline opt gdk_dbfarm = /net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-Jun2010-volund.ins.cwi.nl/sql/dbfarm +# cmdline opt mapi_open = true +# cmdline opt xrpc_open = true +# cmdline opt mapi_port = 39783 +# cmdline opt xrpc_port = 48465 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbname = mTests_src_test_BugTracker-2010 +# cmdline opt mal_listing = 0 +#warning: please don't forget to set your vault key! +#(see /ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/etc/monetdb5.conf) + +# 13:07:28 > +# 13:07:28 > mclient -lsql -ftest -i -e --host=volund --port=39783 +# 13:07:28 > + + +# 13:07:28 > +# 13:07:28 > Done. +# 13:07:28 > + diff -r 093234c8be76 -r 66faaf067601 sql/src/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/not-in-union-except-union.Bug-2577.stable.out Fri Jul 09 13:09:44 2010 +0200 @@ -0,0 +1,47 @@ +stdout of test 'not-in-union-except-union.Bug-2577` in directory 'src/test/BugTracker-2010` itself: + + +# 13:07:28 > +# 13:07:28 > mserver5 "--config=/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5:/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5/lib:/ufs/fabian/scratch/monetdb/Jun2010/program-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-Jun2010-volund.ins.cwi.nl/sql/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=39783 --set xrpc_port=48465 --set monet_prompt= --set mal_listing=2 --trace "--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo Over.. +# 13:07:28 > + +# MonetDB server v5.20.3, based on kernel v1.38.1 +# Serving database 'mTests_src_test_BugTracker-2010', using 4 threads +# Compiled for x86_64-pc-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 7.751 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved +# Visit http://monetdb.cwi.nl/ for further information +# Listening for connection requests on mapi:monetdb://volund.ins.cwi.nl:39783/ +# MonetDB/SQL module v2.38.3 loaded +# MonetDB/GIS module v0.18.0 loaded + +Ready. + +Over.. + +# 13:07:28 > +# 13:07:28 > mclient -lsql -ftest -i -e --host=volund --port=39783 +# 13:07:28 > + +[ 1 ] +[ 1 ] +[ 1 ] +[ 1 ] +#select kvk from kvk where kvk not in ( +% .L53 # table_name +% kvk # name +% bigint # type +% 1 # length +[ 1 ] +#select kvk from kvk except ( +% sys.kvk # table_name +% kvk # name +% bigint # type +% 1 # length +[ 1 ] + +# 13:07:28 > +# 13:07:28 > Done. +# 13:07:28 > + _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
