Changeset: 6e0ddc83fbc4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6e0ddc83fbc4
Added Files:
sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.SQL.py
sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.sql
sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.stable.err
sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.stable.out
Removed Files:
sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.sql
sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.stable.err
sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.stable.out
sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.test
Modified Files:
sql/test/BugTracker-2010/Tests/All
sql/test/prepare/Tests/All
Branch: mtest
Log Message:
fix crash_with_prepare_statement.Bug-2549
diffs (truncated from 437 to 300 lines):
diff --git a/sql/test/BugTracker-2010/Tests/All
b/sql/test/BugTracker-2010/Tests/All
--- a/sql/test/BugTracker-2010/Tests/All
+++ b/sql/test/BugTracker-2010/Tests/All
@@ -8,7 +8,6 @@ correlated_update_type_mismatch.SF-29478
heap_combine_crash.SF-2947763
rank-over-crash.SF-2926454
embedded_record_seperator.SF-2991400
-crash_with_prepare_statement.Bug-2549
mat.slice_on_empty_BATs.SF-2994521
reorder.SF-2995671
crashonschema.Bug-2547
diff --git
a/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.sql
b/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.sql
deleted file mode 100644
--- a/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.sql
+++ /dev/null
@@ -1,32 +0,0 @@
-CREATE SCHEMA TB;
-
-CREATE TABLE TB.STOCK_ITEM (
- S_W_ID INTEGER NOT NULL,
- S_I_ID INTEGER NOT NULL,
- S_QUANTITY INTEGER NOT NULL,
- S_DIST_01 CHAR(24) NOT NULL,
- S_DIST_02 CHAR(24) NOT NULL,
- S_DIST_03 CHAR(24) NOT NULL,
- S_DIST_04 CHAR(24) NOT NULL,
- S_DIST_05 CHAR(24) NOT NULL,
- S_DIST_06 CHAR(24) NOT NULL,
- S_DIST_07 CHAR(24) NOT NULL,
- S_DIST_08 CHAR(24) NOT NULL,
- S_DIST_09 CHAR(24) NOT NULL ,
- S_DIST_10 CHAR(24) NOT NULL,
- S_YTD DECIMAL(8,0) NOT NULL,
- S_ORDER_CNT INTEGER NOT NULL,
- S_REMOTE_CNT INTEGER NOT NULL,
- S_DATA VARCHAR(50) NOT NULL
-);
-
-PREPARE
-UPDATE TB.STOCK_ITEM SET
- S_QUANTITY = ?,
- S_YTD = S_YTD + ?,
- S_ORDER_CNT = S_ORDER_CNT + 1
-WHERE S_W_ID = ? AND S_I_ID = ?;
-
-drop table TB.STOCK_ITEM;
-
-drop schema TB;
diff --git
a/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.stable.err
b/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.stable.err
deleted file mode 100644
---
a/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.stable.err
+++ /dev/null
@@ -1,86 +0,0 @@
-stderr of test 'crash_with_prepare_statement.Bug-2549` in directory
'sql/test/BugTracker-2010` itself:
-
-
-# 00:18:04 >
-# 00:18:04 > mserver5
"--config=/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/etc/monetdb5.conf"
--debug=10 --set gdk_nr_threads=0 --set
"monet_mod_path=/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/lib64/MonetDB5:/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/lib64/MonetDB5/lib:/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/lib64/MonetDB5/bin"
--set
"gdk_dbfarm=/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/var/MonetDB5/dbfarm"
--set mapi_open=true --set xrpc_open=true --set mapi_port=34918 --set
xrpc_port=49630 --set monet_prompt= --trace
"--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 "--dbinit=
include sql;" ; echo ; echo Ov
er..
-# 00:18:04 >
-
-# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu
-# builtin opt gdk_version = 1.36.6
-# builtin opt prefix =
/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert
-# 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}/lib64/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/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert
-# config opt config = ${prefix}/etc/monetdb5.conf
-# config opt prefix =
/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert
-# 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}/lib64/MonetDB5:${exec_prefix}/lib64/MonetDB5/lib:${exec_prefix}/lib64/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 mero_controlport = 50001
-# config opt mal_init = ${exec_prefix}/lib64/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 = default_pipe
-# config opt default_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,garbageCollector,dataflow,history,multiplex
-# config opt nov2009_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,garbageCollector,dataflow,history,multiplex
-# config opt replication_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,garbageCollector,dataflow,history,replication,multiplex
-# config opt accumulator_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,accumulators,garbageCollector,dataflow,history,multiplex
-# config opt recycler_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,deadcode,constants,commonTerms,joinPath,deadcode,recycle,reduce,garbageCollector,dataflow,history,multiplex
-# config opt cracker_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,selcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,garbageCollector,dataflow,history,multiplex
-# config opt sidcrack_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,sidcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,garbageCollector,dataflow,history,multiplex
-# config opt octopus_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,constants,commonTerms,joinPath,octopus,deadcode,reduce,garbageCollector,dataflow,history,multiplex
-# config opt datacyclotron_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,datacyclotron,mergetable,deadcode,constants,commonTerms,joinPath,reorder,deadcode,reduce,garbageCollector,dataflow,history,replication,multiplex
-# config opt derive_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,derivePath,joinPath,deadcode,reduce,garbageCollector,dataflow,history,multiplex
-# config opt dictionary_pipe =
inline,remap,dictionary,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,garbageCollector,dataflow,history,multiplex
-# cmdline opt config =
/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/etc/monetdb5.conf
-# cmdline opt gdk_nr_threads = 0
-# cmdline opt monet_mod_path =
/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/lib64/MonetDB5:/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/lib64/MonetDB5/lib:/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/lib64/MonetDB5/bin
-# cmdline opt gdk_dbfarm =
/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/var/MonetDB5/dbfarm
-# cmdline opt mapi_open = true
-# cmdline opt xrpc_open = true
-# cmdline opt mapi_port = 34918
-# cmdline opt xrpc_port = 49630
-# cmdline opt monet_prompt =
-# 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/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/etc/monetdb5.conf)
-
-# 00:18:05 >
-# 00:18:05 > mclient -lsql -ftest -i -e --host=rig --port=34918
-# 00:18:05 >
-
-
-# 00:18:05 >
-# 00:18:05 > Done.
-# 00:18:05 >
-
diff --git
a/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.stable.out
b/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.stable.out
deleted file mode 100644
---
a/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.stable.out
+++ /dev/null
@@ -1,47 +0,0 @@
-stdout of test 'crash_with_prepare_statement.Bug-2549` in directory
'sql/test/BugTracker-2010` itself:
-
-
-# 00:18:04 >
-# 00:18:04 > mserver5
"--config=/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/etc/monetdb5.conf"
--debug=10 --set gdk_nr_threads=0 --set
"monet_mod_path=/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/lib64/MonetDB5:/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/lib64/MonetDB5/lib:/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/lib64/MonetDB5/bin"
--set
"gdk_dbfarm=/ufs/manegold/_/scratch0/Monet/HG/Feb2010/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/var/MonetDB5/dbfarm"
--set mapi_open=true --set xrpc_open=true --set mapi_port=34918 --set
xrpc_port=49630 --set monet_prompt= --trace
"--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 "--dbinit=
include sql;" ; echo ; echo Ov
er..
-# 00:18:04 >
-
-# MonetDB server v5.18.6, based on kernel v1.36.6
-# 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-2015 MonetDB B.V., all rights reserved
-# Visit http://monetdb.cwi.nl/ for further information
-# Listening for connection requests on mapi:monetdb://rig.ins.cwi.nl:34918/
-# MonetDB/SQL module v2.36.6 loaded
-
-#function user.main():void;
-# clients.quit();
-#end main;
-
-
-# 00:21:12 >
-# 00:21:12 > mclient -lsql -ftest -i -e --host=rig --port=38530
-# 00:21:12 >
-
-#PREPARE
-#UPDATE TB.STOCK_ITEM SET
-# S_QUANTITY = ?,
-# S_YTD = S_YTD + ?,
-# S_ORDER_CNT = S_ORDER_CNT + 1
-#WHERE S_W_ID = ? AND S_I_ID = ?;
-% .prepare, .prepare, .prepare, .prepare, .prepare,
.prepare # table_name
-% type, digits, scale, schema, table, column # name
-% varchar, int, int, str, str, str # type
-% 7, 2, 1, 0, 0, 0 # length
-[ "int", 32, 0, NULL, NULL, NULL ]
-[ "decimal", 9, 0, NULL, NULL, NULL ]
-[ "int", 32, 0, NULL, NULL, NULL ]
-[ "int", 32, 0, NULL, NULL, NULL ]
-#drop table TB.STOCK_ITEM;
-#drop schema TB;
-
-# 12:42:02 >
-# 12:42:02 > "Done."
-# 12:42:02 >
-
diff --git
a/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.test
b/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.test
deleted file mode 100644
--- a/sql/test/BugTracker-2010/Tests/crash_with_prepare_statement.Bug-2549.test
+++ /dev/null
@@ -1,39 +0,0 @@
-statement ok
-CREATE SCHEMA TB
-
-statement ok
-CREATE TABLE TB.STOCK_ITEM (
- S_W_ID INTEGER NOT NULL,
- S_I_ID INTEGER NOT NULL,
- S_QUANTITY INTEGER NOT NULL,
- S_DIST_01 CHAR(24) NOT NULL,
- S_DIST_02 CHAR(24) NOT NULL,
- S_DIST_03 CHAR(24) NOT NULL,
- S_DIST_04 CHAR(24) NOT NULL,
- S_DIST_05 CHAR(24) NOT NULL,
- S_DIST_06 CHAR(24) NOT NULL,
- S_DIST_07 CHAR(24) NOT NULL,
- S_DIST_08 CHAR(24) NOT NULL,
- S_DIST_09 CHAR(24) NOT NULL ,
- S_DIST_10 CHAR(24) NOT NULL,
- S_YTD DECIMAL(8,0) NOT NULL,
- S_ORDER_CNT INTEGER NOT NULL,
- S_REMOTE_CNT INTEGER NOT NULL,
- S_DATA VARCHAR(50) NOT NULL
-)
-
-statement ok
-PREPARE
-UPDATE TB.STOCK_ITEM SET
- S_QUANTITY = ?,
- S_YTD = S_YTD + ?,
- S_ORDER_CNT = S_ORDER_CNT + 1
-WHERE S_W_ID = ? AND S_I_ID = ?
-
-statement ok
-drop table TB.STOCK_ITEM
-
-statement ok
-drop schema TB
-
-
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
@@ -13,3 +13,4 @@ prepared-select-with-error-causes-hang.B
sample.15
prepare-where.SF-1238867.1238959.1238965.1240124
prepare_doesnot_like_LIKE.SF-1234205
+crash_with_prepare_statement.Bug-2549
diff --git
a/sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.SQL.py
b/sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.SQL.py
new file mode 100644
--- /dev/null
+++ b/sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.SQL.py
@@ -0,0 +1,9 @@
+from MonetDBtesting.sqltest import SQLTestCase
+
+with SQLTestCase() as tc:
+ # optional or default connection
+ tc.connect()
+ with open('crash_with_prepare_statement.Bug-2549.sql') as f:
+ tc.execute(query=None, client='mclient', stdin=f)\
+ .assertSucceeded()\
+
.assertMatchStableOut(fout='crash_with_prepare_statement.Bug-2549.stable.out')
diff --git a/sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.sql
b/sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.sql
@@ -0,0 +1,32 @@
+CREATE SCHEMA TB;
+
+CREATE TABLE TB.STOCK_ITEM (
+ S_W_ID INTEGER NOT NULL,
+ S_I_ID INTEGER NOT NULL,
+ S_QUANTITY INTEGER NOT NULL,
+ S_DIST_01 CHAR(24) NOT NULL,
+ S_DIST_02 CHAR(24) NOT NULL,
+ S_DIST_03 CHAR(24) NOT NULL,
+ S_DIST_04 CHAR(24) NOT NULL,
+ S_DIST_05 CHAR(24) NOT NULL,
+ S_DIST_06 CHAR(24) NOT NULL,
+ S_DIST_07 CHAR(24) NOT NULL,
+ S_DIST_08 CHAR(24) NOT NULL,
+ S_DIST_09 CHAR(24) NOT NULL ,
+ S_DIST_10 CHAR(24) NOT NULL,
+ S_YTD DECIMAL(8,0) NOT NULL,
+ S_ORDER_CNT INTEGER NOT NULL,
+ S_REMOTE_CNT INTEGER NOT NULL,
+ S_DATA VARCHAR(50) NOT NULL
+);
+
+PREPARE
+UPDATE TB.STOCK_ITEM SET
+ S_QUANTITY = ?,
+ S_YTD = S_YTD + ?,
+ S_ORDER_CNT = S_ORDER_CNT + 1
+WHERE S_W_ID = ? AND S_I_ID = ?;
+
+drop table TB.STOCK_ITEM;
+
+drop schema TB;
diff --git
a/sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.stable.err
b/sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/prepare/Tests/crash_with_prepare_statement.Bug-2549.stable.err
@@ -0,0 +1,86 @@
+stderr of test 'crash_with_prepare_statement.Bug-2549` in directory
'sql/test/BugTracker-2010` itself:
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list