Merge lp:~zorba-coders/zorba/coll-iter-state-init into lp:zorba

Proposed by David Graf
Status: Merged
Approved by: David Graf
Approved revision: 11100
Merged at revision: 11111
Proposed branch: lp:~zorba-coders/zorba/coll-iter-state-init
Merge into: lp:zorba
Diff against target: 42 lines (+14/-0)
2 files modified
src/runtime/collections/collections_impl.cpp (+1/-0)
test/rbkt/Queries/zorba/collections/paging_1.xq (+13/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/coll-iter-state-init
Reviewer Review Type Date Requested Status
David Graf (community) Approve
Matthias Brantner Approve
Review via email: mp+130055@code.launchpad.net

Commit message

Init ZorbaCollectionIteratorState::theIteratorOpened properly.

Description of the change

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).

To post a comment you must log in.
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job coll-iter-state-init-2012-10-17T18-29-41.949Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.

Revision history for this message
David Graf (davidagraf) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job coll-iter-state-init-2012-10-25T15-46-52.705Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/runtime/collections/collections_impl.cpp'
2--- src/runtime/collections/collections_impl.cpp 2012-10-15 13:35:59 +0000
3+++ src/runtime/collections/collections_impl.cpp 2012-10-17 09:21:21 +0000
4@@ -346,6 +346,7 @@
5 void ZorbaCollectionIteratorState::init(PlanState& planState)
6 {
7 PlanIteratorState::init(planState);
8+ theIteratorOpened = false;
9 theIterator = NULL;
10 }
11
12
13=== modified file 'test/rbkt/Queries/zorba/collections/paging_1.xq'
14--- test/rbkt/Queries/zorba/collections/paging_1.xq 2012-09-19 21:16:15 +0000
15+++ test/rbkt/Queries/zorba/collections/paging_1.xq 2012-10-17 09:21:21 +0000
16@@ -4,6 +4,7 @@
17 import module namespace ref = "http://www.zorba-xquery.com/modules/node-reference";
18
19 declare namespace ann = "http://www.zorba-xquery.com/annotations";
20+declare namespace zerr = "http://www.zorba-xquery.com/errors";
21
22 declare function local:order($items)
23 {
24@@ -18,6 +19,18 @@
25 dml:insert-nodes(xs:QName("ns:test2"), <a/>);
26 dml:insert-nodes(xs:QName("ns:test2"), <b/>);
27 dml:insert-nodes(xs:QName("ns:test2"), (<c/>, <d/>, <e/>));
28+
29+ try {
30+ dml:collection(xs:QName("ns:test2"),
31+ xs:anyURI("urn:uuid:00000000-0000-0000-0000-000000000000"),
32+ 0);
33+ fn:error(); (: has to fail :)
34+ }
35+ catch zerr:ZSTR0066
36+ {
37+ (: all ok :)
38+ }
39+
40 (
41 local:order(dml:collection(xs:QName("ns:test2"), 3)), <delim/>,
42 local:order(dml:collection(xs:QName("ns:test2"), -1)), <delim/>,

Subscribers

People subscribed via source and target branches