Changeset: 43e55467fac7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=43e55467fac7
Added Files:
        sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.SQL.py
        sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.sql
        sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.stable.err
        sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.stable.out
Removed Files:
        sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.sql
        
sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.stable.err
        
sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.stable.out
        sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.test
Modified Files:
        sql/test/BugTracker-2009/Tests/All
        sql/test/prepare/Tests/All
Branch: mtest
Log Message:

another prepare stmt test moved


diffs (truncated from 405 to 300 lines):

diff --git a/sql/test/BugTracker-2009/Tests/All 
b/sql/test/BugTracker-2009/Tests/All
--- a/sql/test/BugTracker-2009/Tests/All
+++ b/sql/test/BugTracker-2009/Tests/All
@@ -29,7 +29,6 @@ correlated-selection-bug
 row_number_bug.SF-2546109
 TypeException_having_count_distinct.SF-2494227
 insert_into_done_by_procedure.SF-2607293
-decimal_needs_truncation.SF-2605686
 number_between_col1_and_col2
 order_by_column_position
 error_while_drop_func_returns_table_type.SF-2604573
diff --git 
a/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.sql 
b/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.sql
deleted file mode 100644
--- a/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.sql
+++ /dev/null
@@ -1,14 +0,0 @@
-
-create table testdec(testdec decimal(4,4));
-drop table testdec;
-
-create table testdec(testdec decimal(5,4));
-insert into testdec values (0.12345);
-select * from testdec;
-
-PREPARE INSERT INTO testdec (testdec) values (?);
-exec **(0.12345);
-
-select * from testdec;
-
-drop table testdec;
diff --git 
a/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.stable.err 
b/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.stable.err
deleted file mode 100644
--- 
a/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.stable.err
+++ /dev/null
@@ -1,87 +0,0 @@
-stderr of test 'decimal_needs_truncation.SF-2605686` in directory 
'sql/test/BugTracker-2009` itself:
-
-
-# 23:34:48 >  
-# 23:34:48 >   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 "sql_logdir=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/sql_logs"   
--set mapi_open=true --set xrpc_open=true --set mapi_port=35789 --set 
xrpc_port=41411 --set 
xrpc_docroot=/net/alf.ins.cwi.nl/export/scratch1/niels/rc/sql --set 
monet_prompt= --trace  "--dbname=mTests_src_test_BugTracker-2009" --set 
mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over..
-# 23:34:48 >  
-
-# builtin opt  gdk_arch = 64bitx86_64-unknown-linux-gnu
-# builtin opt  gdk_version = 1.28.0
-# builtin opt  monet_pid = 28386
-# 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_mem_bigsize = 262144
-# builtin opt  gdk_alloc_map = yes
-# builtin opt  gdk_mem_pagebits = 14
-# 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:${exec_prefix}/lib/bin
-# 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  sql_logdir = ${prefix}/var/MonetDB
-# builtin opt  xquery_logdir = ${prefix}/var/MonetDB
-# 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/merovingian.log
-# config opt   mero_errlog = ${prefix}/var/log/merovingian.log
-# config opt   mero_timeinterval = 600
-# config opt   mero_pidfile = ${prefix}/var/run/merovingian.pid
-# config opt   mero_exittimeout = 7
-# config opt   mero_doproxy = yes
-# config opt   mero_discoveryttl = 600
-# config opt   mal_init = ${exec_prefix}/lib/MonetDB5/mal_init.mal
-# config opt   mal_listing = 2
-# config opt   checkpoint_dir = ${prefix}/var/MonetDB5/chkpnt
-# config opt   mapi_port = 50000
-# config opt   mapi_open = false
-# config opt   sql_logdir = ${prefix}/var/MonetDB5/sql_logs
-# config opt   sql_init = ${exec_prefix}/lib/MonetDB5/sql_init.sql
-# 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  sql_logdir = 
/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/sql_logs
-# cmdline opt  mapi_open = true
-# cmdline opt  xrpc_open = true
-# cmdline opt  mapi_port = 35789
-# cmdline opt  xrpc_port = 41411
-# cmdline opt  xrpc_docroot = /net/alf.ins.cwi.nl/export/scratch1/niels/rc/sql
-# cmdline opt  monet_prompt = 
-# cmdline opt  gdk_dbname = mTests_src_test_BugTracker-2009
-# cmdline opt  mal_listing = 0
-# cmdline opt  gdk_debug = 10
-#warning: please don't forget to set your vault key!
-#(see /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf)
-
-# 23:34:48 >  
-# 23:34:48 >  mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35789 
-# 23:34:48 >  
-
-
-# 23:34:48 >  
-# 23:34:48 >  Done.
-# 23:34:48 >  
-
diff --git 
a/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.stable.out 
b/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.stable.out
deleted file mode 100644
--- 
a/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.stable.out
+++ /dev/null
@@ -1,51 +0,0 @@
-stdout of test 'decimal_needs_truncation.SF-2605686` in directory 
'sql/test/BugTracker-2009` itself:
-
-
-# 23:34:48 >  
-# 23:34:48 >   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 "sql_logdir=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/sql_logs"   
--set mapi_open=true --set xrpc_open=true --set mapi_port=35789 --set 
xrpc_port=41411 --set 
xrpc_docroot=/net/alf.ins.cwi.nl/export/scratch1/niels/rc/sql --set 
monet_prompt= --trace  "--dbname=mTests_src_test_BugTracker-2009" --set 
mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over..
-# 23:34:48 >  
-
-# MonetDB server v5.11.0, based on kernel v1.28.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- 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:35789/
-# MonetDB/SQL module v2.28.0 loaded
-
-#function user.main():void;
-#    clients.quit();
-#end main;
-
-
-# 23:34:48 >  
-# 23:34:48 >  mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35789 
-# 23:34:48 >  
-
-[ 1    ]
-% sys.testdec # table_name
-% testdec # name
-% decimal # type
-% 7 # length
-[ 0.1235       ]
-#PREPARE INSERT INTO testdec (testdec) values (?);
-#PREPARE INSERT INTO testdec (testdec) values (?);
-% .prepare,    .prepare,       .prepare,       .prepare,       .prepare,       
.prepare # table_name
-% type,        digits, scale,  schema, table,  column # name
-% varchar,     int,    int,    str,    str,    str # type
-% 7,   1,      1,      0,      0,      0 # length
-[ "decimal",   5,      4,      NULL,   NULL,   NULL    ]
-#exec 6(0.12345);
-[ 1    ]
-% sys.testdec # table_name
-% testdec # name
-% decimal # type
-% 7 # length
-[ 0.1235       ]
-[ 0.1235       ]
-
-# 23:34:48 >  
-# 23:34:48 >  Done.
-# 23:34:48 >  
-
diff --git 
a/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.test 
b/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.test
deleted file mode 100644
--- a/sql/test/BugTracker-2009/Tests/decimal_needs_truncation.SF-2605686.test
+++ /dev/null
@@ -1,32 +0,0 @@
-statement ok
-create table testdec(testdec decimal(4,4))
-
-statement ok
-drop table testdec
-
-statement ok
-create table testdec(testdec decimal(5,4))
-
-statement ok
-insert into testdec values (0.12345)
-
-query R rowsort
-select * from testdec
-----
-0.123
-
-statement ok
-PREPARE INSERT INTO testdec (testdec) values (?)
-
-statement ok
-exec **(0.12345)
-
-query R rowsort
-select * from testdec
-----
-0.123
-
-statement ok
-drop table testdec
-
-
diff --git a/sql/test/prepare/Tests/All b/sql/test/prepare/Tests/All
--- a/sql/test/prepare/Tests/All
+++ b/sql/test/prepare/Tests/All
@@ -25,3 +25,4 @@ decimal_prepare.SF-1655818
 bind_with_cast.SF-1720934
 sqlancer_prepare
 subquery_prepare
+decimal_needs_truncation.SF-2605686
diff --git a/sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.SQL.py 
b/sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.SQL.py
new file mode 100644
--- /dev/null
+++ b/sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.SQL.py
@@ -0,0 +1,10 @@
+from MonetDBtesting.sqltest import SQLTestCase
+
+with SQLTestCase() as tc:
+    # optional or default connection
+    tc.connect()
+    tc.drop()
+    with open('decimal_needs_truncation.SF-2605686.sql') as f:
+        tc.execute(query=None, client='mclient', stdin=f)\
+            .assertSucceeded()\
+            
.assertMatchStableOut(fout='decimal_needs_truncation.SF-2605686.stable.out')
diff --git a/sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.sql 
b/sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.sql
@@ -0,0 +1,14 @@
+
+create table testdec(testdec decimal(4,4));
+drop table testdec;
+
+create table testdec(testdec decimal(5,4));
+insert into testdec values (0.12345);
+select * from testdec;
+
+PREPARE INSERT INTO testdec (testdec) values (?);
+exec **(0.12345);
+
+select * from testdec;
+
+drop table testdec;
diff --git 
a/sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.stable.err 
b/sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/prepare/Tests/decimal_needs_truncation.SF-2605686.stable.err
@@ -0,0 +1,87 @@
+stderr of test 'decimal_needs_truncation.SF-2605686` in directory 
'sql/test/BugTracker-2009` itself:
+
+
+# 23:34:48 >  
+# 23:34:48 >   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 "sql_logdir=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/sql_logs"   
--set mapi_open=true --set xrpc_open=true --set mapi_port=35789 --set 
xrpc_port=41411 --set 
xrpc_docroot=/net/alf.ins.cwi.nl/export/scratch1/niels/rc/sql --set 
monet_prompt= --trace  "--dbname=mTests_src_test_BugTracker-2009" --set 
mal_listing=0 "--dbinit= include sql;" ; echo ; echo Over..
+# 23:34:48 >  
+
+# builtin opt  gdk_arch = 64bitx86_64-unknown-linux-gnu
+# builtin opt  gdk_version = 1.28.0
+# builtin opt  monet_pid = 28386
+# 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_mem_bigsize = 262144
+# builtin opt  gdk_alloc_map = yes
+# builtin opt  gdk_mem_pagebits = 14
+# 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:${exec_prefix}/lib/bin
+# 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  sql_logdir = ${prefix}/var/MonetDB
+# builtin opt  xquery_logdir = ${prefix}/var/MonetDB
+# 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
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to