← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~fcavalieri/zorba/bugs into lp:zorba

 

Federico Cavalieri has proposed merging lp:~fcavalieri/zorba/bugs into lp:zorba.

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/76945

Fixed 859467 and 859468
-- 
https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/76945
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/store/naive/simple_store.cpp'
--- src/store/naive/simple_store.cpp	2011-09-12 22:42:28 +0000
+++ src/store/naive/simple_store.cpp	2011-09-26 09:15:29 +0000
@@ -810,10 +810,7 @@
 
   if (theICs.get(qname, ic))
   {
-    throw ZORBA_EXCEPTION(
-      zerr::ZSTR0015_IC_ALREADY_EXISTS,
-      ERROR_PARAMS( qname->getStringValue() )
-    );
+    return ic; // already activated => noop
   }
 
   ic = new ICCollectionImpl(icQName, collectionQName);
@@ -840,10 +837,7 @@
 
   if (theICs.get(qname, ic))
   {
-    throw ZORBA_EXCEPTION(
-      zerr::ZSTR0015_IC_ALREADY_EXISTS,
-      ERROR_PARAMS( qname->getStringValue() )
-    );
+    return ic; // already activated => noop
   }
 
   ic = new ICForeignKeyImpl(qname, fromCollectionQName, toCollectionQName);

=== added file 'test/rbkt/ExpQueryResults/zorba/xqddf/ic-foreignKey2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/xqddf/ic-foreignKey2.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/xqddf/ic-foreignKey2.xml.res	2011-09-26 09:15:29 +0000
@@ -0,0 +1,1 @@
+OK
\ No newline at end of file

=== added file 'test/rbkt/ExpQueryResults/zorba/xqddf/ic-simple3.xml.res'
--- test/rbkt/ExpQueryResults/zorba/xqddf/ic-simple3.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/xqddf/ic-simple3.xml.res	2011-09-26 09:15:29 +0000
@@ -0,0 +1,1 @@
+OK
\ No newline at end of file

=== added file 'test/rbkt/Queries/zorba/xqddf/ic-foreignKey2.xq'
--- test/rbkt/Queries/zorba/xqddf/ic-foreignKey2.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/xqddf/ic-foreignKey2.xq	2011-09-26 09:15:29 +0000
@@ -0,0 +1,14 @@
+import module namespace m = 'xqueryzorba.org/test/xqddf/ic' at 'ic.xqlib';
+import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";;
+import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";;
+import module namespace ic_ddl = "http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl";;
+
+ddl:create($m:empc);  
+ddl:create($m:trnc);  
+
+(
+ic_ddl:activate(xs:QName("m:ic_foreignKey")),
+ic_ddl:activate(xs:QName("m:ic_foreignKey"))
+);
+
+"OK"
\ No newline at end of file

=== added file 'test/rbkt/Queries/zorba/xqddf/ic-simple3.xq'
--- test/rbkt/Queries/zorba/xqddf/ic-simple3.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/xqddf/ic-simple3.xq	2011-09-26 09:15:29 +0000
@@ -0,0 +1,12 @@
+import module namespace m = 'xqueryzorba.org/test/xqddf/ic' at 'ic.xqlib';
+import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";;
+import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";;
+import module namespace ic_ddl = "http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl";;
+
+ddl:create($m:empc);
+(
+ic_ddl:activate(xs:QName("m:ic_simple")),
+ic_ddl:activate(xs:QName("m:ic_simple")) 
+);
+
+"OK"
\ No newline at end of file


Follow ups