Update of /cvsroot/monetdb/sql/src/test/osm/Tests
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1157

Modified Files:
        drop_constraint_bug.sql drop_constraint_bug.stable.err 
Log Message:
The test should cover the problem, i.e. if you drop the primary key you only get
the dependency problem if the foreign key is also created 

Approve the new err output


U drop_constraint_bug.sql
Index: drop_constraint_bug.sql
===================================================================
RCS file: /cvsroot/monetdb/sql/src/test/osm/Tests/drop_constraint_bug.sql,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- drop_constraint_bug.sql     27 Dec 2008 14:04:28 -0000      1.1
+++ drop_constraint_bug.sql     27 Dec 2008 18:24:41 -0000      1.2
@@ -5,7 +5,8 @@
         "timestamp" timestamptz(7),
         CONSTRAINT "ways_id_pkey" PRIMARY KEY ("id")
 );
-CREATE TABLE way_tags (way integer, k varchar(255), v varchar(1024));
+CREATE TABLE way_tags (way integer, k varchar(255), v varchar(1024),
+primary key (way, k), foreign key(way) references ways);
 alter table ways drop constraint ways_id_pkey;
 SELECT count(*) FROM ways
 LEFT JOIN way_tags ON

U drop_constraint_bug.stable.err
Index: drop_constraint_bug.stable.err
===================================================================
RCS file: 
/cvsroot/monetdb/sql/src/test/osm/Tests/drop_constraint_bug.stable.err,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- drop_constraint_bug.stable.err      27 Dec 2008 14:04:28 -0000      1.1
+++ drop_constraint_bug.stable.err      27 Dec 2008 18:24:41 -0000      1.2
@@ -79,6 +79,9 @@
 # 14:06:51 >  mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35987 
 # 14:06:51 >  
 
+MAPI  = mone...@alviss:31477
+QUERY = alter table ways drop constraint ways_id_pkey;
+ERROR = !unable to drop constraint ways_id_pkey (there are database objects 
which depend on it)
 
 # 14:06:51 >  
 # 14:06:51 >  Done.


------------------------------------------------------------------------------
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to