Changeset: c378fc9beda8 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c378fc9beda8 Added Files: sql/test/BugTracker-2009/Tests/overflow.SF-2853458.py Removed Files: sql/test/BugTracker-2009/Tests/overflow.SF-2853458.sql sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.ppc64 sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out.ppc64 sql/test/BugTracker-2009/Tests/overflow.SF-2853458.test Modified Files: sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out Branch: default Log Message:
Attempting to unify ppc64 and no ppc64 outputs diffs (286 lines): diff --git a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.sql b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.py rename from sql/test/BugTracker-2009/Tests/overflow.SF-2853458.sql rename to sql/test/BugTracker-2009/Tests/overflow.SF-2853458.py --- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.sql +++ b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.py @@ -1,2 +1,30 @@ -select cast(power(2,63) as bigint); -select cast(power(2,64) as bigint); +import sys, os, platform, pymonetdb + +db = os.getenv("TSTDB") +port = int(os.getenv("MAPIPORT")) + +conn1 = pymonetdb.connect(database=db, port=port, autocommit=True, username='monetdb', password='monetdb') +cur1 = conn1.cursor() +running_arch = platform.machine() + +try: + cur1.execute("select cast(power(2,63) as bigint);") + if running_arch == 'ppc64': + if cur1.fetchall() != [(9223372036854775807,)]: + sys.stderr.write('[(9223372036854775807,)] expected\n') + else: + sys.stderr.write("Exception expected") +except pymonetdb.DatabaseError as e: + if running_arch == 'ppc64': + raise e + elif "overflow in conversion" not in str(e): + sys.stderr.write('Wrong error %s, expected overflow in conversion' % (str(e))) +try: + cur1.execute("select cast(power(2,64) as bigint);") + sys.stderr.write("Exception expected") +except pymonetdb.DatabaseError as e: + if "overflow in conversion" not in str(e): + sys.stderr.write('Wrong error %s, expected overflow in conversion' % (str(e))) + +cur1.close() +conn1.close() diff --git a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err --- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err +++ b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err @@ -5,76 +5,6 @@ stderr of test 'overflow.SF-2853458` in # 22:26:13 > mserver5 "--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=35561 --set xrpc_port=42240 --set monet_prompt= --trace "--dbname=mTests_src_test_BugTracker-2009" --set mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over.. # 22:26:13 > -# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu -# builtin opt gdk_version = 1.32.0 -# builtin opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 -# builtin opt exec_prefix = ${prefix} -# builtin opt gdk_dbname = tst -# builtin opt gdk_dbfarm = ${prefix}/var/MonetDB -# builtin opt gdk_debug = 8 -# builtin opt gdk_alloc_map = yes -# 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 = yes -# builtin opt host = localhost -# builtin opt mapi_port = 50000 -# builtin opt mapi_noheaders = no -# builtin opt mapi_debug = 0 -# builtin opt mapi_clients = 2 -# builtin opt sql_debug = 0 -# builtin opt standoff_ns = http://monetdb.cwi.nl/standoff -# builtin opt standoff_start = start -# builtin opt standoff_end = end -# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 -# config opt config = ${prefix}/etc/monetdb5.conf -# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 -# config opt exec_prefix = ${prefix} -# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm -# config opt gdk_dbname = demo -# config opt gdk_alloc_map = no -# config opt gdk_embedded = no -# config opt gdk_debug = 0 -# config opt monet_mod_path = ${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/lib/MonetDB5/bin -# config opt monet_daemon = no -# config opt monet_welcome = yes -# config opt mero_msglog = ${prefix}/var/log/MonetDB/merovingian.log -# config opt mero_errlog = ${prefix}/var/log/MonetDB/merovingian.log -# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid -# config opt mal_init = ${exec_prefix}/lib/MonetDB5/mal_init.mal -# config opt mal_listing = 2 -# config opt mapi_port = 50000 -# config opt mapi_autosense = false -# config opt mapi_open = false -# config opt sql_optimizer = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,garbageCollector,dataflow,history,multiplex -# cmdline opt config = /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf -# cmdline opt gdk_nr_threads = 0 -# cmdline opt monet_mod_path = /ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin -# cmdline opt gdk_dbfarm = /ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm -# cmdline opt mapi_open = true -# cmdline opt xrpc_open = true -# cmdline opt mapi_port = 35561 -# cmdline opt xrpc_port = 42240 -# cmdline opt monet_prompt = -# cmdline opt gdk_dbname = mTests_src_test_BugTracker-2009 -# cmdline opt mal_listing = 0 -#warning: please don't forget to set your vault key! -#(see /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf) - -# 22:26:13 > -# 22:26:13 > mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35561 -# 22:26:13 > - -MAPI = (monetdb) /var/tmp/mtest-27483/.s.monetdb.35395 -QUERY = select cast(power(2,63) as bigint); -ERROR = !overflow in conversion of 9.2233720368547758e+18 to lng. -CODE = 22003 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 -QUERY = select cast(power(2,64) as bigint); -ERROR = !overflow in conversion of 1.8446744073709552e+19 to lng. -CODE = 22003 # 22:26:13 > # 22:26:13 > Done. diff --git a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.ppc64 b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.ppc64 deleted file mode 100644 --- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.ppc64 +++ /dev/null @@ -1,78 +0,0 @@ -stderr of test 'overflow.SF-2853458` in directory 'sql/test/BugTracker-2009` itself: - - -# 22:26:13 > -# 22:26:13 > mserver5 "--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=35561 --set xrpc_port=42240 --set monet_prompt= --trace "--dbname=mTests_src_test_BugTracker-2009" --set mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over.. -# 22:26:13 > - -# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu -# builtin opt gdk_version = 1.32.0 -# builtin opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 -# builtin opt exec_prefix = ${prefix} -# builtin opt gdk_dbname = tst -# builtin opt gdk_dbfarm = ${prefix}/var/MonetDB -# builtin opt gdk_debug = 8 -# builtin opt gdk_alloc_map = yes -# 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 = yes -# builtin opt host = localhost -# builtin opt mapi_port = 50000 -# builtin opt mapi_noheaders = no -# builtin opt mapi_debug = 0 -# builtin opt mapi_clients = 2 -# builtin opt sql_debug = 0 -# builtin opt standoff_ns = http://monetdb.cwi.nl/standoff -# builtin opt standoff_start = start -# builtin opt standoff_end = end -# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 -# config opt config = ${prefix}/etc/monetdb5.conf -# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 -# config opt exec_prefix = ${prefix} -# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm -# config opt gdk_dbname = demo -# config opt gdk_alloc_map = no -# config opt gdk_embedded = no -# config opt gdk_debug = 0 -# config opt monet_mod_path = ${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/lib/MonetDB5/bin -# config opt monet_daemon = no -# config opt monet_welcome = yes -# config opt mero_msglog = ${prefix}/var/log/MonetDB/merovingian.log -# config opt mero_errlog = ${prefix}/var/log/MonetDB/merovingian.log -# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid -# config opt mal_init = ${exec_prefix}/lib/MonetDB5/mal_init.mal -# config opt mal_listing = 2 -# config opt mapi_port = 50000 -# config opt mapi_autosense = false -# config opt mapi_open = false -# config opt sql_optimizer = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,garbageCollector,dataflow,history,multiplex -# cmdline opt config = /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf -# cmdline opt gdk_nr_threads = 0 -# cmdline opt monet_mod_path = /ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin -# cmdline opt gdk_dbfarm = /ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm -# cmdline opt mapi_open = true -# cmdline opt xrpc_open = true -# cmdline opt mapi_port = 35561 -# cmdline opt xrpc_port = 42240 -# cmdline opt monet_prompt = -# cmdline opt gdk_dbname = mTests_src_test_BugTracker-2009 -# cmdline opt mal_listing = 0 -#warning: please don't forget to set your vault key! -#(see /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf) - -# 22:26:13 > -# 22:26:13 > mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35561 -# 22:26:13 > - -MAPI = (monetdb) /var/tmp/mtest-65872/.s.monetdb.34890 -QUERY = select cast(power(2,64) as bigint); -ERROR = !overflow in conversion of 1.8446744073709552e+19 to lng. -CODE = 22003 - -# 22:26:13 > -# 22:26:13 > Done. -# 22:26:13 > - diff --git a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out --- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out +++ b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out @@ -5,23 +5,6 @@ stdout of test 'overflow.SF-2853458` in # 22:26:13 > mserver5 "--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=35561 --set xrpc_port=42240 --set monet_prompt= --trace "--dbname=mTests_src_test_BugTracker-2009" --set mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over.. # 22:26:13 > -# MonetDB server v5.14.0, based on kernel v1.32.0 -# Serving database 'mTests_src_test_BugTracker-2009', 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-2009 MonetDB B.V., all rights reserved -# Visit http://monetdb.cwi.nl/ for further information -# Listening for connection requests on mapi:monetdb://alf.ins.cwi.nl:35561/ -# MonetDB/SQL module v2.32.0 loaded - -#function user.main():void; -# clients.quit(); -#end main; - - -# 22:26:13 > -# 22:26:13 > mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35561 -# 22:26:13 > # 22:26:13 > diff --git a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out.ppc64 b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out.ppc64 deleted file mode 100644 --- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out.ppc64 +++ /dev/null @@ -1,41 +0,0 @@ -stdout of test 'overflow.SF-2853458` in directory 'sql/test/BugTracker-2009` itself: - - -# 22:26:13 > -# 22:26:13 > mserver5 "--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=35561 --set xrpc_port=42240 --set monet_prompt= --trace "--dbname=mTests_src_test_BugTracker-2009" --set mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over.. -# 22:26:13 > - -# MonetDB server v5.14.0, based on kernel v1.32.0 -# Serving database 'mTests_src_test_BugTracker-2009', 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-2009 MonetDB B.V., all rights reserved -# Visit http://monetdb.cwi.nl/ for further information -# Listening for connection requests on mapi:monetdb://alf.ins.cwi.nl:35561/ -# MonetDB/SQL module v2.32.0 loaded - -#function user.main():void; -# clients.quit(); -#end main; - - -# 22:26:13 > -# 22:26:13 > mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35561 -# 22:26:13 > - - -# 11:23:53 > -# 11:23:53 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-65872" "--port=34890" -# 11:23:53 > - -#select cast(power(2,63) as bigint); -% .%1 # table_name -% %1 # name -% bigint # type -% 19 # length -[ 9223372036854775807 ] - -# 11:23:54 > -# 11:23:54 > "Done." -# 11:23:54 > - diff --git a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.test b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.test deleted file mode 100644 --- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.test +++ /dev/null @@ -1,7 +0,0 @@ -statement error -select cast(power(2,63) as bigint) - -statement error -select cast(power(2,64) as bigint) - - _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list