Changeset: 3ca66fff56fd for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3ca66fff56fd
Added Files:
        sql/test/prepare/Tests/prepare-smallint.Bug-3297.SQL.py
        sql/test/prepare/Tests/prepare-smallint.Bug-3297.sql
        sql/test/prepare/Tests/prepare-smallint.Bug-3297.stable.out
        sql/test/prepare/Tests/prepare-smallint.Bug-3297.stable.out.int128
Branch: mtest
Log Message:

move prepare-smallint.Bug-3297


diffs (197 lines):

diff --git a/sql/test/prepare/Tests/prepare-smallint.Bug-3297.SQL.py 
b/sql/test/prepare/Tests/prepare-smallint.Bug-3297.SQL.py
new file mode 100644
--- /dev/null
+++ b/sql/test/prepare/Tests/prepare-smallint.Bug-3297.SQL.py
@@ -0,0 +1,13 @@
+import os
+from MonetDBtesting.sqltest import SQLTestCase
+
+stableout = 'prepare-smallint.Bug-3297.stable.out.int128' if 
os.getenv('HAVE_HGE') else 'prepare-smallint.Bug-3297.stable.out'
+
+with SQLTestCase() as tc:
+    # optional or default connection
+    tc.connect()
+    with open('prepare-smallint.Bug-3297.sql') as f:
+        tc.execute(query=None, client='mclient', stdin=f)\
+            .assertSucceeded()\
+            .assertMatchStableOut(fout=stableout)
+
diff --git a/sql/test/prepare/Tests/prepare-smallint.Bug-3297.sql 
b/sql/test/prepare/Tests/prepare-smallint.Bug-3297.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/prepare/Tests/prepare-smallint.Bug-3297.sql
@@ -0,0 +1,14 @@
+CREATE TABLE ints ( val int );
+prepare INSERT INTO ints VALUES ( ? - 20 );
+exec **(1);
+exec **(10);
+exec **(100);
+exec **(1000);
+exec **(10000);
+exec **(100000);
+exec **(1000000);
+exec **(10000000);
+exec **(100000000);
+exec **(1000000000);
+select * from ints;
+drop table ints;
diff --git a/sql/test/prepare/Tests/prepare-smallint.Bug-3297.stable.out 
b/sql/test/prepare/Tests/prepare-smallint.Bug-3297.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/prepare/Tests/prepare-smallint.Bug-3297.stable.out
@@ -0,0 +1,75 @@
+stdout of test 'prepare-smallint.Bug-3297` in directory 
'sql/test/BugTracker-2013` itself:
+
+
+# 20:19:33 >  
+# 20:19:33 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=35817" "--set" 
"mapi_usock=/var/tmp/mtest-25917/.s.monetdb.35817" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2013"
 "--set" "mal_listing=0"
+# 20:19:33 >  
+
+# MonetDB 5 server v11.15.4
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2013', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
+# Found 3.777 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on 
mapi:monetdb://niels.nesco.mine.nu:35817/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-25917/.s.monetdb.35817
+# MonetDB/GIS module loaded
+# MonetDB/JAQL module loaded
+# MonetDB/SQL module loaded
+
+
+# 20:19:34 >  
+# 20:19:34 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-25917" "--port=35817"
+# 20:19:34 >  
+
+#CREATE TABLE ints ( val int );
+#prepare INSERT INTO ints VALUES ( ? - 20 );
+#prepare INSERT INTO ints VALUES ( ? - 20 );
+% .prepare,    .prepare,       .prepare,       .prepare,       .prepare,       
.prepare # table_name
+% type,        digits, scale,  schema, table,  column # name
+% varchar,     int,    int,    str,    str,    str # type
+% 6,   2,      1,      0,      0,      0 # length
+[ "bigint",    64,     0,      NULL,   NULL,   NULL    ]
+#exec  5(1);
+[ 1    ]
+#exec  5(10);
+[ 1    ]
+#exec  5(100);
+[ 1    ]
+#exec  5(1000);
+[ 1    ]
+#exec  5(10000);
+[ 1    ]
+#exec  5(100000);
+[ 1    ]
+#exec  5(1000000);
+[ 1    ]
+#exec  5(10000000);
+[ 1    ]
+#exec  5(100000000);
+[ 1    ]
+#exec  5(1000000000);
+[ 1    ]
+#select * from ints;
+% sys.ints # table_name
+% val # name
+% int # type
+% 9 # length
+[ -19  ]
+[ -10  ]
+[ 80   ]
+[ 980  ]
+[ 9980 ]
+[ 99980        ]
+[ 999980       ]
+[ 9999980      ]
+[ 99999980     ]
+[ 999999980    ]
+#drop table ints;
+
+# 20:19:34 >  
+# 20:19:34 >  "Done."
+# 20:19:34 >  
+
diff --git a/sql/test/prepare/Tests/prepare-smallint.Bug-3297.stable.out.int128 
b/sql/test/prepare/Tests/prepare-smallint.Bug-3297.stable.out.int128
new file mode 100644
--- /dev/null
+++ b/sql/test/prepare/Tests/prepare-smallint.Bug-3297.stable.out.int128
@@ -0,0 +1,75 @@
+stdout of test 'prepare-smallint.Bug-3297` in directory 
'sql/test/BugTracker-2013` itself:
+
+
+# 20:19:33 >  
+# 20:19:33 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=35817" "--set" 
"mapi_usock=/var/tmp/mtest-25917/.s.monetdb.35817" "--set" "monet_prompt=" 
"--forcemito" "--set" "mal_listing=2" 
"--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_test_BugTracker-2013"
 "--set" "mal_listing=0"
+# 20:19:33 >  
+
+# MonetDB 5 server v11.15.4
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2013', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
+# Found 3.777 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on 
mapi:monetdb://niels.nesco.mine.nu:35817/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-25917/.s.monetdb.35817
+# MonetDB/GIS module loaded
+# MonetDB/JAQL module loaded
+# MonetDB/SQL module loaded
+
+
+# 20:19:34 >  
+# 20:19:34 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-25917" "--port=35817"
+# 20:19:34 >  
+
+#CREATE TABLE ints ( val int );
+#prepare INSERT INTO ints VALUES ( ? - 20 );
+#prepare INSERT INTO ints VALUES ( ? - 20 );
+% .prepare,    .prepare,       .prepare,       .prepare,       .prepare,       
.prepare # table_name
+% type,        digits, scale,  schema, table,  column # name
+% varchar,     int,    int,    str,    str,    str # type
+% 7,   3,      1,      0,      0,      0 # length
+[ "hugeint",   128,    0,      NULL,   NULL,   NULL    ]
+#exec  5(1);
+[ 1    ]
+#exec  5(10);
+[ 1    ]
+#exec  5(100);
+[ 1    ]
+#exec  5(1000);
+[ 1    ]
+#exec  5(10000);
+[ 1    ]
+#exec  5(100000);
+[ 1    ]
+#exec  5(1000000);
+[ 1    ]
+#exec  5(10000000);
+[ 1    ]
+#exec  5(100000000);
+[ 1    ]
+#exec  5(1000000000);
+[ 1    ]
+#select * from ints;
+% sys.ints # table_name
+% val # name
+% int # type
+% 9 # length
+[ -19  ]
+[ -10  ]
+[ 80   ]
+[ 980  ]
+[ 9980 ]
+[ 99980        ]
+[ 999980       ]
+[ 9999980      ]
+[ 99999980     ]
+[ 999999980    ]
+#drop table ints;
+
+# 20:19:34 >  
+# 20:19:34 >  "Done."
+# 20:19:34 >  
+
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to