← Back to team overview

zorba-coders team mailing list archive

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

 

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

Requested reviews:
  Markos Zaharioudakis (markos-za)

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

Fixed bug 868258
-- 
https://code.launchpad.net/~fcavalieri/zorba/bugs2/+merge/78401
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2011-10-05 22:39:18 +0000
+++ ChangeLog	2011-10-06 12:52:36 +0000
@@ -41,6 +41,7 @@
   * Fixed bug #863730 (static delete-node* functions don't raise ZDDY0012)
   * Implemented the probe-index-range-value for general indexes
   * Fixed bug #867662 ("nullptr" warning)
+  * Fixed bug #868258 (Assertion failure with two delete collection)
 
 version 2.0.1
 

=== modified file 'src/store/naive/pul_primitives.cpp'
--- src/store/naive/pul_primitives.cpp	2011-09-27 06:25:16 +0000
+++ src/store/naive/pul_primitives.cpp	2011-10-06 12:52:36 +0000
@@ -807,7 +807,8 @@
 void UpdDeleteCollection::apply()
 {
   theCollection = GET_STORE().getCollection(theName, theDynamicCollection);
-  assert(theCollection);
+  if (theCollection == NULL)
+    return;//If two delete collection are issued in the same snapshot is a noop
   SimpleCollection* collection = static_cast<SimpleCollection*>(theCollection.getp());
 
   std::vector<store::Index*> indexes;

=== added file 'test/rbkt/ExpQueryResults/zorba/collections/delete_double.xml.res'
--- test/rbkt/ExpQueryResults/zorba/collections/delete_double.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/collections/delete_double.xml.res	2011-10-06 12:52:36 +0000
@@ -0,0 +1,1 @@
+OK
\ No newline at end of file

=== added file 'test/rbkt/Queries/zorba/collections/delete_double.xq'
--- test/rbkt/Queries/zorba/collections/delete_double.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/collections/delete_double.xq	2011-10-06 12:52:36 +0000
@@ -0,0 +1,10 @@
+import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";;
+import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";;
+
+ddl:create(xs:QName("ddl:coll"),(<a/>,<b/>));
+(
+ddl:delete(xs:QName("ddl:coll")),
+ddl:delete(xs:QName("ddl:coll"))
+);
+
+"OK"
\ No newline at end of file


Follow ups