Changeset: a7c28593a171 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a7c28593a171
Modified Files:
        sql/test/BugTracker-2011/Tests/All
        sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.sql
        
sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.stable.err
        
sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.stable.out
Branch: Aug2011
Log Message:

added test for bug 2849


diffs (153 lines):

diff --git a/sql/test/BugTracker-2011/Tests/All 
b/sql/test/BugTracker-2011/Tests/All
--- a/sql/test/BugTracker-2011/Tests/All
+++ b/sql/test/BugTracker-2011/Tests/All
@@ -29,3 +29,4 @@
 select_value_insert_into.Bug-2845
 recursive_case.Bug-2838
 str_cast_exception.Bug-2847
+multicolumn_constraints.Bug-2849
diff --git 
a/sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.sql 
b/sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.sql
@@ -0,0 +1,26 @@
+CREATE TABLE "portmapping" (
+         "id" int  NOT NULL AUTO_INCREMENT,
+         "port" int  NOT NULL,
+         "type" int NOT NULL,
+         "appname" varchar(25) NOT NULL,
+         "description" varchar(255) DEFAULT NULL,
+         CONSTRAINT "port" UNIQUE ("port","type"),
+         CONSTRAINT "appname" UNIQUE ("appname","type"),
+         PRIMARY KEY ("id")
+) ;
+
+-- duplicate port and appname
+INSERT INTO "portmapping" VALUES (2,1,1,'name','test');
+INSERT INTO "portmapping" VALUES (3,1,2,'name','test');
+
+-- duplicate type
+INSERT INTO "portmapping" VALUES (4,5,1,'x','test');
+INSERT INTO "portmapping" VALUES (5,5,1,'y','test');
+
+-- unique records
+INSERT INTO "portmapping" VALUES (6,7,1,'z1','test');
+INSERT INTO "portmapping" VALUES (7,8,2,'z2','test');
+
+SELECT * FROM "portmapping";
+
+DROP TABLE "portmapping";
diff --git 
a/sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.stable.err 
b/sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.stable.err
@@ -0,0 +1,40 @@
+stderr of test 'multicolumn_constraints.Bug-2849` in directory 
'test/BugTracker-2011` itself:
+
+
+# 16:14:18 >  
+# 16:14:18 >   mserver5  --debug=10 --set gdk_nr_threads=0  --set 
"gdk_dbfarm=/ufs/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB" --set 
mapi_open=true --set mapi_port=34629 --set monet_prompt= --trace --forcemito 
--set mal_listing=2  "--dbname=mTests_test_BugTracker-2011" --set mal_listing=0 
; echo ; echo Over..
+# 16:14:18 >  
+
+# builtin opt  gdk_dbname = demo
+# builtin opt  gdk_dbfarm = 
/ufs/niels/scratch/rc-clean/Linux-x86_64/var/monetdb5/dbfarm
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_alloc_map = no
+# builtin opt  gdk_vmtrim = yes
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  gdk_dbfarm = 
/ufs/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 34629
+# cmdline opt  monet_prompt = 
+# cmdline opt  mal_listing = 2
+# cmdline opt  gdk_dbname = mTests_test_BugTracker-2011
+# cmdline opt  mal_listing = 0
+
+# 16:14:18 >  
+# 16:14:18 >  mclient -lsql -ftest -i -e --host=alf --port=34629 
+# 16:14:18 >  
+
+MAPI  = monetdb@alf:34629
+QUERY = INSERT INTO "portmapping" VALUES (5,5,1,'y','test');
+ERROR = !SQLException:assert:INSERT INTO: UNIQUE constraint 'portmapping.port' 
violated
+
+# 16:14:18 >  
+# 16:14:18 >  Done.
+# 16:14:18 >  
+
diff --git 
a/sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.stable.out 
b/sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2011/Tests/multicolumn_constraints.Bug-2849.stable.out
@@ -0,0 +1,64 @@
+stdout of test 'multicolumn_constraints.Bug-2849` in directory 
'test/BugTracker-2011` itself:
+
+
+# 16:14:18 >  
+# 16:14:18 >   mserver5  --debug=10 --set gdk_nr_threads=0  --set 
"gdk_dbfarm=/ufs/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB" --set 
mapi_open=true --set mapi_port=34629 --set monet_prompt= --trace --forcemito 
--set mal_listing=2  "--dbname=mTests_test_BugTracker-2011" --set mal_listing=0 
; echo ; echo Over..
+# 16:14:18 >  
+
+# MonetDB 5 server v11.5.0
+# This is an unreleased version
+# Serving database 'mTests_test_BugTracker-2011', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
+# Found 7.752 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2011 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+#WARNING: MALException:malInclude:could not open file: bpm
+# Listening for connection requests on mapi:monetdb://alf.ins.cwi.nl:34629/
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+Over..
+
+# 16:14:18 >  
+# 16:14:18 >  mclient -lsql -ftest -i -e --host=alf --port=34629 
+# 16:14:18 >  
+
+#CREATE TABLE "portmapping" (
+#        "id" int  NOT NULL AUTO_INCREMENT,
+#        "port" int  NOT NULL,
+#        "type" int NOT NULL,
+#        "appname" varchar(25) NOT NULL,
+#        "description" varchar(255) DEFAULT NULL,
+#        CONSTRAINT "port" UNIQUE ("port","type"),
+#        CONSTRAINT "appname" UNIQUE ("appname","type"),
+#        PRIMARY KEY ("id")
+#) ;
+#INSERT INTO "portmapping" VALUES (2,1,1,'name','test');
+[ 1    ]
+#INSERT INTO "portmapping" VALUES (3,1,2,'name','test');
+[ 1    ]
+#INSERT INTO "portmapping" VALUES (4,5,1,'x','test');
+[ 1    ]
+#INSERT INTO "portmapping" VALUES (6,7,1,'z1','test');
+[ 1    ]
+#INSERT INTO "portmapping" VALUES (7,8,2,'z2','test');
+[ 1    ]
+#SELECT * FROM "portmapping";
+% sys.portmapping,     sys.portmapping,        sys.portmapping,        
sys.portmapping,        sys.portmapping # table_name
+% id,  port,   type,   appname,        description # name
+% int, int,    int,    varchar,        varchar # type
+% 1,   1,      1,      4,      4 # length
+[ 2,   1,      1,      "name", "test"  ]
+[ 3,   1,      2,      "name", "test"  ]
+[ 4,   5,      1,      "x",    "test"  ]
+[ 6,   7,      1,      "z1",   "test"  ]
+[ 7,   8,      2,      "z2",   "test"  ]
+#DROP TABLE "portmapping";
+
+# 16:14:18 >  
+# 16:14:18 >  Done.
+# 16:14:18 >  
+
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to