David Graf has proposed merging lp:~zorba-coders/zorba/coll-iter-state-init 
into lp:zorba.

Commit message:
Init ZorbaCollectionIteratorState::theIteratorOpened properly.

Requested reviews:
  David Graf (davidagraf)
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/coll-iter-state-init/+merge/130055

Init ZorbaCollectionIteratorState::theIteratorOpened properly.

I made this fix because it caused a failure in 28msec's persistent store. 
Unfortunately, I am not able to reproduce a similar problem in Zorba's 
simplestore. Although I moved the failing code into a test (see diff).
-- 
https://code.launchpad.net/~zorba-coders/zorba/coll-iter-state-init/+merge/130055
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/runtime/collections/collections_impl.cpp'
--- src/runtime/collections/collections_impl.cpp	2012-10-15 13:35:59 +0000
+++ src/runtime/collections/collections_impl.cpp	2012-10-17 09:16:48 +0000
@@ -346,6 +346,7 @@
 void ZorbaCollectionIteratorState::init(PlanState& planState)
 {
   PlanIteratorState::init(planState);
+  theIteratorOpened = false;
   theIterator = NULL;
 }
 

=== modified file 'test/rbkt/Queries/zorba/collections/paging_1.xq'
--- test/rbkt/Queries/zorba/collections/paging_1.xq	2012-09-19 21:16:15 +0000
+++ test/rbkt/Queries/zorba/collections/paging_1.xq	2012-10-17 09:16:48 +0000
@@ -4,6 +4,7 @@
 import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";;
 
 declare namespace ann = "http://www.zorba-xquery.com/annotations";;
+declare namespace zerr = "http://www.zorba-xquery.com/errors";;
 
 declare function local:order($items)
 {
@@ -18,6 +19,18 @@
   dml:insert-nodes(xs:QName("ns:test2"), <a/>);
   dml:insert-nodes(xs:QName("ns:test2"), <b/>);
   dml:insert-nodes(xs:QName("ns:test2"), (<c/>, <d/>, <e/>));
+
+  try {                                                                              
+      dml:collection(xs:QName("ns:test2"),                                            
+                     xs:anyURI("urn:uuid:00000000-0000-0000-0000-000000000000"),
+                     0);                                                   
+      fn:error(); (: has to fail :)                                                  
+  }                                                                                  
+  catch zerr:ZSTR0066                                                                
+  {                                                                                  
+    (: all ok :)                                                                     
+  }
+
   (
     local:order(dml:collection(xs:QName("ns:test2"), 3)), <delim/>,
     local:order(dml:collection(xs:QName("ns:test2"), -1)), <delim/>,

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to