Changeset: fdb07071159e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fdb07071159e Modified Files: sql/src/test/BugTracker-2010/Tests/All sql/src/test/BugTracker-2010/Tests/update_statement_in_function_ignored.Bug-2614.sql sql/src/test/BugTracker-2010/Tests/update_statement_in_function_ignored.Bug-2614.stable.err sql/src/test/BugTracker-2010/Tests/update_statement_in_function_ignored.Bug-2614.stable.out Branch: default Log Message:
Add test for bug #2614, Update statement in function ignored diffs (187 lines): diff -r 664bd2309e8b -r fdb07071159e sql/src/test/BugTracker-2010/Tests/All --- a/sql/src/test/BugTracker-2010/Tests/All Wed Jul 14 09:50:39 2010 +0200 +++ b/sql/src/test/BugTracker-2010/Tests/All Wed Jul 14 10:40:43 2010 +0200 @@ -32,3 +32,4 @@ group-by_ordered_column.Bug-2564 ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606 second_function_existing_signature.Bug-2611 +update_statement_in_function_ignored.Bug-2614 diff -r 664bd2309e8b -r fdb07071159e sql/src/test/BugTracker-2010/Tests/update_statement_in_function_ignored.Bug-2614.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/update_statement_in_function_ignored.Bug-2614.sql Wed Jul 14 10:40:43 2010 +0200 @@ -0,0 +1,38 @@ +create table table_b ( + column_a int, + column_b int +); + +create function next_b() +returns integer +begin + declare col_a integer; + set col_a = null; + + set col_a = ( select min(column_a) + from table_b + where column_b is null ); + + if col_a is not null then + update table_b + set column_b = 1 + where column_a = col_a; + end if; + + return col_a; +end; + +insert into table_b ( + column_a, + column_b ) +values ( + 1, + null +); + +select * from table_b; + +select next_b(); + +select * from table_b; + diff -r 664bd2309e8b -r fdb07071159e sql/src/test/BugTracker-2010/Tests/update_statement_in_function_ignored.Bug-2614.stable.err --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/update_statement_in_function_ignored.Bug-2614.stable.err Wed Jul 14 10:40:43 2010 +0200 @@ -0,0 +1,78 @@ +stderr of test 'update_statement_in_function_ignored.Bug-2614` in directory 'src/test/BugTracker-2010` itself: + + +# 10:35:43 > +# 10:35:43 > mserver5 "--config=/export/scratch0/rijke/monetdbdefault20100708/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/export/scratch0/rijke/monetdbdefault20100708/lib/MonetDB5:/export/scratch0/rijke/monetdbdefault20100708/lib/MonetDB5/lib:/export/scratch0/rijke/monetdbdefault20100708/lib/MonetDB5/bin" --set "gdk_dbfarm=/export/scratch0/rijke/monetdbdefault20100708/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=33538 --set xrpc_port=47164 --set monet_prompt= --set mal_listing=2 --trace "--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo Over.. +# 10:35:43 > + +# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu +# builtin opt gdk_version = 1.39.0 +# builtin opt prefix = /export/scratch0/rijke/monetdbdefault20100708 +# 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 = ${exec_prefix}/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 = /export/scratch0/rijke/monetdbdefault20100708 +# config opt config = ${prefix}/etc/monetdb5.conf +# config opt prefix = /export/scratch0/rijke/monetdbdefault20100708 +# config opt exec_prefix = ${prefix} +# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm +# config opt monet_mod_path = ${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/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,mitosis,mergetable,deadcode,commonTerms,derivePath,joinPath,reorder,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 = /export/scratch0/rijke/monetdbdefault20100708/etc/monetdb5.conf +# cmdline opt gdk_nr_threads = 0 +# cmdline opt monet_mod_path = /export/scratch0/rijke/monetdbdefault20100708/lib/MonetDB5:/export/scratch0/rijke/monetdbdefault20100708/lib/MonetDB5/lib:/export/scratch0/rijke/monetdbdefault20100708/lib/MonetDB5/bin +# cmdline opt gdk_dbfarm = /export/scratch0/rijke/monetdbdefault20100708/var/MonetDB5/dbfarm +# cmdline opt mapi_open = true +# cmdline opt xrpc_open = true +# cmdline opt mapi_port = 33538 +# cmdline opt xrpc_port = 47164 +# 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 /export/scratch0/rijke/monetdbdefault20100708/etc/monetdb5.conf) + +# 10:35:43 > +# 10:35:43 > mclient -lsql -ftest -i -e --host=yngling --port=33538 +# 10:35:43 > + + +# 10:35:43 > +# 10:35:43 > Done. +# 10:35:43 > + diff -r 664bd2309e8b -r fdb07071159e sql/src/test/BugTracker-2010/Tests/update_statement_in_function_ignored.Bug-2614.stable.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/update_statement_in_function_ignored.Bug-2614.stable.out Wed Jul 14 10:40:43 2010 +0200 @@ -0,0 +1,51 @@ +stdout of test 'update_statement_in_function_ignored.Bug-2614` in directory 'src/test/BugTracker-2010` itself: + + +# 10:35:43 > +# 10:35:43 > mserver5 "--config=/export/scratch0/rijke/monetdbdefault20100708/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/export/scratch0/rijke/monetdbdefault20100708/lib/MonetDB5:/export/scratch0/rijke/monetdbdefault20100708/lib/MonetDB5/lib:/export/scratch0/rijke/monetdbdefault20100708/lib/MonetDB5/bin" --set "gdk_dbfarm=/export/scratch0/rijke/monetdbdefault20100708/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=33538 --set xrpc_port=47164 --set monet_prompt= --set mal_listing=2 --trace "--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo Over.. +# 10:35:43 > + +# MonetDB server v5.21.0, based on kernel v1.39.0 +# Serving database 'mTests_src_test_BugTracker-2010', using 4 threads +# Compiled for x86_64-unknown-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 +#WARNING: LoaderException:loadLibrary:Loading error 'libmseed.so.2: cannot open shared object file: No such file or directory' from within file 'vault' +# Listening for connection requests on mapi:monetdb://yngling.ins.cwi.nl:33538/ +# MonetDB/SQL module v2.39.0 loaded +# MonetDB/GIS module v0.19.0 loaded + +Ready. + +Over.. + +# 10:35:43 > +# 10:35:43 > mclient -lsql -ftest -i -e --host=yngling --port=33538 +# 10:35:43 > + +[ 1 ] +#select * from table_b; +% sys.table_b, sys.table_b # table_name +% column_a, column_b # name +% int, int # type +% 1, 1 # length +[ 1, NULL ] +#select next_b(); +% . # table_name +% next_b # name +% int # type +% 1 # length +[ 1 ] +#select * from table_b; +% sys.table_b, sys.table_b # table_name +% column_a, column_b # name +% int, int # type +% 1, 1 # length +[ 1, 1 ] + +# 10:35:43 > +# 10:35:43 > Done. +# 10:35:43 > + _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list