← 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/77033

Fixed bug 859522
-- 
https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/77033
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/store/naive/pul_primitives.cpp'
--- src/store/naive/pul_primitives.cpp	2011-09-26 15:50:32 +0000
+++ src/store/naive/pul_primitives.cpp	2011-09-26 18:34:32 +0000
@@ -1490,11 +1490,11 @@
 
   theDoc = store->getDocument(lUri); // remember for undo
 
-  ZORBA_ASSERT(theDoc != NULL); // checked in the iterator
-
-  store->deleteDocument(lUri);
-
-  theIsApplied = true;
+  if(theDoc != NULL) //is not checked in the iterator if two
+  {                  //deleteDocument are present for the same uri
+    store->deleteDocument(lUri);
+    theIsApplied = true;
+  }
 }
 
 

=== added file 'test/rbkt/ExpQueryResults/zorba/updates/upd12.xml.res'
--- test/rbkt/ExpQueryResults/zorba/updates/upd12.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/updates/upd12.xml.res	2011-09-26 18:34:32 +0000
@@ -0,0 +1,1 @@
+OK
\ No newline at end of file

=== added file 'test/rbkt/Queries/zorba/updates/upd12.xq'
--- test/rbkt/Queries/zorba/updates/upd12.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/updates/upd12.xq	2011-09-26 18:34:32 +0000
@@ -0,0 +1,10 @@
+import module namespace doc = "http://www.zorba-xquery.com/modules/store/dynamic/documents";;
+
+doc:put("foo", document { <foo>bar</foo> });
+
+(
+doc:remove("foo"),
+doc:remove("foo")
+);
+
+"OK"
\ No newline at end of file


Follow ups