Merge lp:~zorba-coders/zorba/bug-1026250 into lp:zorba
- bug-1026250
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 11609 | ||||
Proposed branch: | lp:~zorba-coders/zorba/bug-1026250 | ||||
Merge into: | lp:zorba | ||||
Diff against target: |
993 lines (+563/-31) 31 files modified
include/zorba/pregenerated/diagnostic_list.h (+2/-0) modules/pregenerated/zorba-errors.xq (+4/-0) src/compiler/codegen/plan_visitor.cpp (+8/-7) src/compiler/expression/flwor_expr.cpp (+22/-1) src/compiler/expression/flwor_expr.h (+5/-2) src/compiler/parser/parser.y (+4/-10) src/compiler/parsetree/parsenodes.h (+1/-1) src/compiler/translator/translator.cpp (+27/-0) src/diagnostics/diagnostic_en.xml (+5/-1) src/diagnostics/pregenerated/diagnostic_list.cpp (+3/-0) src/diagnostics/pregenerated/dict_en.cpp (+2/-1) src/store/naive/simple_collection.cpp (+25/-6) src/store/naive/simple_collection.h (+3/-0) test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor24.iter (+56/-0) test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor25.iter (+56/-0) test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor26.iter (+66/-0) test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor27.iter (+63/-0) test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor28.iter (+57/-0) test/rbkt/ExpQueryResults/zorba/flwor/flwor24.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/flwor/flwor25.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/flwor/flwor27.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/flwor/flwor28.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/scripting/flwor2.xml.res (+0/-2) test/rbkt/Queries/zorba/flwor/flwor24.xml (+5/-0) test/rbkt/Queries/zorba/flwor/flwor24.xq (+25/-0) test/rbkt/Queries/zorba/flwor/flwor25.xq (+29/-0) test/rbkt/Queries/zorba/flwor/flwor26.spec (+1/-0) test/rbkt/Queries/zorba/flwor/flwor26.xq (+30/-0) test/rbkt/Queries/zorba/flwor/flwor27.xq (+30/-0) test/rbkt/Queries/zorba/flwor/flwor28.xq (+29/-0) test/rbkt/Queries/zorba/scripting/flwor2.spec (+1/-0) |
||||
To merge this branch: | bzr merge lp:~zorba-coders/zorba/bug-1026250 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Markos Zaharioudakis | Approve | ||
Matthias Brantner | Approve | ||
Review via email: mp+138044@code.launchpad.net |
Commit message
fix for bug lp:1026250
Description of the change
- annotation to turn on sequential flwor streaming
- introduce support for pragmas and allows the body of a pragma to be a statement (recent scripting extension)
- collections are versioned in order to avoid deadlocks when modifying a collection that is currently read from (instead raise an error)
Zorba Build Bot (zorba-buildbot) wrote : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~zorba-coders/zorba/bug-1026250 into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job bug-1026250-2012-12-
final status was:
13 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
Paul J. Lucas (paul-lucas) wrote : | # |
Of the failing tests, only some have been modified. If you changed the default behavior, shouldn't you also have to change every affected test by adding the pragma?
- 11088. By Paul J. Lucas
-
Cosmetic change.
- 11089. By Paul J. Lucas
-
Cleaned-up assert message.
- 11090. By Paul J. Lucas
-
Added operator<< for flwor_expr:
:ClauseKind. - 11091. By Paul J. Lucas
-
Cleaned-up assert message.
Paul J. Lucas (paul-lucas) wrote : | # |
I modified test flwor10.xq to be:
declare namespace ext = "http://
variable $x := 0;
(# ext:materialize #) {
for $i in (1, 2, 3)
let $y := { $x := $x + $i; () }
return $x
}
ran it and got:
Zorba error [zerr:ZXQP0002]: "false": assertion failed with the message: ClauseKind = materialize_clause; raised at /Users/
The switch statement doesn't have a case for materialize_clause. Either it should, or it should never be the case that a materialize_clause should occur here.
FYI: I modified the code on the branch to overload operator<< for ClauseKind -- makes it handy for debugging.
Chris Hillery (ceejatec) wrote : | # |
Please put a more descriptive commit message for this change.
Chris Hillery (ceejatec) wrote : | # |
Matthias will get this scheduled within 28msec, hopefully soon.
- 11092. By Federico Cavalieri
-
Merged trunk into the branch
- 11093. By Federico Cavalieri
-
Fixed compilation
- 11094. By Federico Cavalieri
-
Inverted annotation semantic
- 11095. By Federico Cavalieri
-
Implemented no-streaming extension
Federico Cavalieri (fcavalieri) wrote : | # |
Ready for review
Ghislain Fourny (gislenius) wrote : | # |
One of the tests uses ext:nomateriali
Federico Cavalieri (fcavalieri) wrote : | # |
nope, let me fix it
On Wed, Aug 14, 2013 at 3:14 PM, Ghislain Fourny <ghislain.
> wrote:
> One of the tests uses ext:nomateriali
> --
> https:/
> Your team Zorba Coders is subscribed to branch lp:zorba.
>
> --
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
- 11096. By Federico Cavalieri
-
Fixed test28
Federico Cavalieri (fcavalieri) wrote : | # |
Fixed and pushed
On Wed, Aug 14, 2013 at 9:36 PM, Federico Cavalieri <
federico.
> nope, let me fix it
>
>
> On Wed, Aug 14, 2013 at 3:14 PM, Ghislain Fourny <
> ghislain.
>
>> One of the tests uses ext:nomateriali
>> intented?
>> --
>> https:/
>> Your team Zorba Coders is subscribed to branch lp:zorba.
>>
>> --
>> Mailing list: https:/
>> Post to : <email address hidden>
>> Unsubscribe : https:/
>> More help : https:/
>>
>
>
Matthias Brantner (matthias-brantner) wrote : | # |
Nice change.
The modifications in the following files don't seem to be needed:
- test/rbkt/
- test/rbkt/
- test/rbkt/
- test/rbkt/
I'll add Markos as a second reviewer.
Matthias Brantner (matthias-brantner) : | # |
- 11097. By Federico Cavalieri
-
Completely reverted unnecessary test modifications
- 11098. By Federico Cavalieri
-
Reverted additional unnecessary test modification
- 11099. By Federico Cavalieri
-
Reverted further unnecessary modifications
Federico Cavalieri (fcavalieri) wrote : | # |
Thanks for the review.
Can you explain me why
SYNC_CODE(
and
SYNC_CODE(
has been commented in this branch?
They were already commented in the branch when I started working on it.
Matthias Brantner (matthias-brantner) wrote : | # |
> Thanks for the review.
> Can you explain me why
> SYNC_CODE(
> and
> SYNC_CODE(
> has been commented in this branch?
> They were already commented in the branch when I started working on it.
They were causing a deadlock when the collection being read from was modified. This is now fixed using collection versioning. The two lines can be removed.
Markos Zaharioudakis (markos-za) wrote : | # |
I did not like very much the versioning solution for the collection deadlock. It certainly does not work with multi-threading. But this is not the only thing that is wrong for multi-threading, so I will approve.
I think a better solution would be that any dml:collection() function that is executed within a nonmaterialize pragma acquires the collection lock in exclussive mode. Of course that would require changes in the compiler, runtime, and store api.
Markos Zaharioudakis (markos-za) wrote : | # |
I did not like very much the versioning solution for the collection deadlock. It certainly does not work with multi-threading. But this is not the only thing that is wrong for multi-threading, so I will approve.
I think a better solution would be that any dml:collection() function that is executed within a nonmaterialize pragma acquires the collection lock in exclussive mode. Of course that would require changes in the compiler, runtime, and store api.
Federico Cavalieri (fcavalieri) wrote : | # |
Thanks for the feedback.
Merging
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for the following merge proposals:
https:/
Progress dashboard at http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue succeeded - proposal merged!
Preview Diff
1 | === modified file 'include/zorba/pregenerated/diagnostic_list.h' | |||
2 | --- include/zorba/pregenerated/diagnostic_list.h 2013-08-01 09:41:39 +0000 | |||
3 | +++ include/zorba/pregenerated/diagnostic_list.h 2013-08-16 07:08:59 +0000 | |||
4 | @@ -692,6 +692,8 @@ | |||
5 | 692 | 692 | ||
6 | 693 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0040_INCONSISTENT_EDIT; | 693 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0040_INCONSISTENT_EDIT; |
7 | 694 | 694 | ||
8 | 695 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0041_CONCURRENT_MODIFICATION; | ||
9 | 696 | |||
10 | 695 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0001_COLLECTION_ALREADY_DECLARED; | 697 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0001_COLLECTION_ALREADY_DECLARED; |
11 | 696 | 698 | ||
12 | 697 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0002_COLLECTION_ALREADY_IMPORTED; | 699 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0002_COLLECTION_ALREADY_IMPORTED; |
13 | 698 | 700 | ||
14 | === modified file 'modules/pregenerated/zorba-errors.xq' | |||
15 | --- modules/pregenerated/zorba-errors.xq 2013-08-07 05:28:39 +0000 | |||
16 | +++ modules/pregenerated/zorba-errors.xq 2013-08-16 07:08:59 +0000 | |||
17 | @@ -602,6 +602,10 @@ | |||
18 | 602 | 602 | ||
19 | 603 | (:~ | 603 | (:~ |
20 | 604 | :) | 604 | :) |
21 | 605 | declare variable $zerr:ZDDY0041 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0041"); | ||
22 | 606 | |||
23 | 607 | (:~ | ||
24 | 608 | :) | ||
25 | 605 | declare variable $zerr:ZDST0001 as xs:QName := fn:QName($zerr:NS, "zerr:ZDST0001"); | 609 | declare variable $zerr:ZDST0001 as xs:QName := fn:QName($zerr:NS, "zerr:ZDST0001"); |
26 | 606 | 610 | ||
27 | 607 | (:~ | 611 | (:~ |
28 | 608 | 612 | ||
29 | === modified file 'src/compiler/codegen/plan_visitor.cpp' | |||
30 | --- src/compiler/codegen/plan_visitor.cpp 2013-07-01 18:59:06 +0000 | |||
31 | +++ src/compiler/codegen/plan_visitor.cpp 2013-08-16 07:08:59 +0000 | |||
32 | @@ -935,6 +935,9 @@ | |||
33 | 935 | 935 | ||
34 | 936 | if (v.is_sequential()) | 936 | if (v.is_sequential()) |
35 | 937 | { | 937 | { |
36 | 938 | pragma* pr = 0; | ||
37 | 939 | theCCB->lookup_pragma(&v, "no-materialization", pr); | ||
38 | 940 | |||
39 | 938 | if (!isGeneral) | 941 | if (!isGeneral) |
40 | 939 | { | 942 | { |
41 | 940 | if (v.has_sequential_clauses()) | 943 | if (v.has_sequential_clauses()) |
42 | @@ -983,15 +986,13 @@ | |||
43 | 983 | 986 | ||
44 | 984 | // Note: a materialize clause may exist already in case plan serialization | 987 | // Note: a materialize clause may exist already in case plan serialization |
45 | 985 | // is on (see comment in materialize_clause::clone) | 988 | // is on (see comment in materialize_clause::clone) |
47 | 986 | if (!isGeneral && | 989 | if (!pr && !isGeneral && |
48 | 987 | v.get_return_expr()->is_sequential() && | 990 | v.get_return_expr()->is_sequential() && |
49 | 988 | v.get_clause(numClauses-1)->get_kind() != flwor_clause::materialize_clause && | 991 | v.get_clause(numClauses-1)->get_kind() != flwor_clause::materialize_clause && |
50 | 989 | (v.get_order_clause() != NULL || v.get_group_clause() == NULL)) | 992 | (v.get_order_clause() != NULL || v.get_group_clause() == NULL)) |
51 | 990 | { | 993 | { |
54 | 991 | materialize_clause* mat = | 994 | materialize_clause* mat = theCCB->theEM->create_materialize_clause(v.get_sctx(), |
53 | 992 | theCCB->theEM->create_materialize_clause(v.get_sctx(), | ||
55 | 993 | v.get_return_expr()->get_loc()); | 995 | v.get_return_expr()->get_loc()); |
56 | 994 | |||
57 | 995 | v.add_clause(mat); | 996 | v.add_clause(mat); |
58 | 996 | ++numClauses; | 997 | ++numClauses; |
59 | 997 | } | 998 | } |
60 | @@ -1027,7 +1028,7 @@ | |||
61 | 1027 | ++numForClauses; | 1028 | ++numForClauses; |
62 | 1028 | } | 1029 | } |
63 | 1029 | 1030 | ||
65 | 1030 | if (domExpr->is_sequential() && | 1031 | if (!pr && domExpr->is_sequential() && |
66 | 1031 | (k == flwor_clause::for_clause || | 1032 | (k == flwor_clause::for_clause || |
67 | 1032 | k == flwor_clause::window_clause || | 1033 | k == flwor_clause::window_clause || |
68 | 1033 | numForClauses > 0)) | 1034 | numForClauses > 0)) |
69 | @@ -1066,8 +1067,8 @@ | |||
70 | 1066 | break; | 1067 | break; |
71 | 1067 | } | 1068 | } |
72 | 1068 | default: | 1069 | default: |
75 | 1069 | ZORBA_ASSERT(false); | 1070 | ZORBA_ASSERT_WITH_MSG(false, "ClauseKind = " << k); |
76 | 1070 | } | 1071 | } // switch |
77 | 1071 | 1072 | ||
78 | 1072 | ++i; | 1073 | ++i; |
79 | 1073 | } | 1074 | } |
80 | 1074 | 1075 | ||
81 | === modified file 'src/compiler/expression/flwor_expr.cpp' | |||
82 | --- src/compiler/expression/flwor_expr.cpp 2013-06-14 04:50:39 +0000 | |||
83 | +++ src/compiler/expression/flwor_expr.cpp 2013-08-16 07:08:59 +0000 | |||
84 | @@ -52,6 +52,27 @@ | |||
85 | 52 | /******************************************************************************* | 52 | /******************************************************************************* |
86 | 53 | 53 | ||
87 | 54 | ********************************************************************************/ | 54 | ********************************************************************************/ |
88 | 55 | std::ostream& operator<<( std::ostream &o, flwor_clause::ClauseKind k ) { | ||
89 | 56 | char const *const s[] = { | ||
90 | 57 | "for_clause", | ||
91 | 58 | "let_clause", | ||
92 | 59 | "window_clause", | ||
93 | 60 | "group_clause", | ||
94 | 61 | "order_clause", | ||
95 | 62 | "count_clause", | ||
96 | 63 | "where_clause", | ||
97 | 64 | "materialize_clause" | ||
98 | 65 | }; | ||
99 | 66 | if ( k >= flwor_clause::for_clause && k <= flwor_clause::materialize_clause ) | ||
100 | 67 | o << s[k]; | ||
101 | 68 | else | ||
102 | 69 | o << "[invalid ClauseKind: " << (int)k << ']'; | ||
103 | 70 | return o; | ||
104 | 71 | } | ||
105 | 72 | |||
106 | 73 | /******************************************************************************* | ||
107 | 74 | |||
108 | 75 | ********************************************************************************/ | ||
109 | 55 | forletwin_clause::forletwin_clause( | 76 | forletwin_clause::forletwin_clause( |
110 | 56 | static_context* sctx, | 77 | static_context* sctx, |
111 | 57 | CompilerCB* ccb, | 78 | CompilerCB* ccb, |
112 | @@ -671,7 +692,7 @@ | |||
113 | 671 | expr::substitution_t& subst) const | 692 | expr::substitution_t& subst) const |
114 | 672 | { | 693 | { |
115 | 673 | // we will reach here under the following scenario: | 694 | // we will reach here under the following scenario: |
117 | 674 | // 1. We do plan seriazation | 695 | // 1. We do plan serialization |
118 | 675 | // 2. getPlan is called on udf A; this causes a mat clause to be created | 696 | // 2. getPlan is called on udf A; this causes a mat clause to be created |
119 | 676 | // during the codegen on A's body | 697 | // during the codegen on A's body |
120 | 677 | // 3. getPlan is called on udf B, which invokes A, and A's body is | 698 | // 3. getPlan is called on udf B, which invokes A, and A's body is |
121 | 678 | 699 | ||
122 | === modified file 'src/compiler/expression/flwor_expr.h' | |||
123 | --- src/compiler/expression/flwor_expr.h 2013-06-14 04:50:39 +0000 | |||
124 | +++ src/compiler/expression/flwor_expr.h 2013-08-16 07:08:59 +0000 | |||
125 | @@ -50,7 +50,7 @@ | |||
126 | 50 | public: | 50 | public: |
127 | 51 | typedef var_rebind_list_t rebind_list_t; | 51 | typedef var_rebind_list_t rebind_list_t; |
128 | 52 | 52 | ||
130 | 53 | typedef enum | 53 | enum ClauseKind |
131 | 54 | { | 54 | { |
132 | 55 | for_clause, | 55 | for_clause, |
133 | 56 | let_clause, | 56 | let_clause, |
134 | @@ -60,7 +60,8 @@ | |||
135 | 60 | count_clause, | 60 | count_clause, |
136 | 61 | where_clause, | 61 | where_clause, |
137 | 62 | materialize_clause | 62 | materialize_clause |
139 | 63 | } ClauseKind; | 63 | // if you change this, also ensure that operator<< for it is still correct |
140 | 64 | }; | ||
141 | 64 | 65 | ||
142 | 65 | protected: | 66 | protected: |
143 | 66 | static_context * theContext; | 67 | static_context * theContext; |
144 | @@ -106,6 +107,8 @@ | |||
145 | 106 | expr::substitution_t& substitution) const = 0; | 107 | expr::substitution_t& substitution) const = 0; |
146 | 107 | }; | 108 | }; |
147 | 108 | 109 | ||
148 | 110 | // for debugging | ||
149 | 111 | std::ostream& operator<<( std::ostream&, flwor_clause::ClauseKind ); | ||
150 | 109 | 112 | ||
151 | 110 | /***************************************************************************//** | 113 | /***************************************************************************//** |
152 | 111 | 114 | ||
153 | 112 | 115 | ||
154 | === modified file 'src/compiler/parser/parser.y' | |||
155 | --- src/compiler/parser/parser.y 2013-06-17 20:05:21 +0000 | |||
156 | +++ src/compiler/parser/parser.y 2013-08-16 07:08:59 +0000 | |||
157 | @@ -4048,16 +4048,10 @@ | |||
158 | 4048 | 4048 | ||
159 | 4049 | // [64] | 4049 | // [64] |
160 | 4050 | ExtensionExpr : | 4050 | ExtensionExpr : |
171 | 4051 | Pragma_list LBRACE RBRACE | 4051 | Pragma_list BlockExpr |
172 | 4052 | { | 4052 | { |
173 | 4053 | $$ = new ExtensionExpr( | 4053 | $$ = new ExtensionExpr( |
174 | 4054 | LOC(@$), dynamic_cast<PragmaList*>($1), NULL | 4054 | LOC(@$), dynamic_cast<PragmaList*>($1), $2 |
165 | 4055 | ); | ||
166 | 4056 | } | ||
167 | 4057 | | Pragma_list LBRACE Expr RBRACE | ||
168 | 4058 | { | ||
169 | 4059 | $$ = new ExtensionExpr( | ||
170 | 4060 | LOC(@$), dynamic_cast<PragmaList*>($1), $3 | ||
175 | 4061 | ); | 4055 | ); |
176 | 4062 | } | 4056 | } |
177 | 4063 | ; | 4057 | ; |
178 | 4064 | 4058 | ||
179 | === modified file 'src/compiler/parsetree/parsenodes.h' | |||
180 | --- src/compiler/parsetree/parsenodes.h 2013-08-05 13:20:52 +0000 | |||
181 | +++ src/compiler/parsetree/parsenodes.h 2013-08-16 07:08:59 +0000 | |||
182 | @@ -3506,7 +3506,7 @@ | |||
183 | 3506 | 3506 | ||
184 | 3507 | 3507 | ||
185 | 3508 | /******************************************************************************* | 3508 | /******************************************************************************* |
187 | 3509 | [88] ExtensionExpr ::= PragmaList "{" Expr? "}" | 3509 | [88] ExtensionExpr ::= PragmaList BlockExpr |
188 | 3510 | ********************************************************************************/ | 3510 | ********************************************************************************/ |
189 | 3511 | class ExtensionExpr : public exprnode | 3511 | class ExtensionExpr : public exprnode |
190 | 3512 | { | 3512 | { |
191 | 3513 | 3513 | ||
192 | === modified file 'src/compiler/translator/translator.cpp' | |||
193 | --- src/compiler/translator/translator.cpp 2013-08-12 09:28:02 +0000 | |||
194 | +++ src/compiler/translator/translator.cpp 2013-08-16 07:08:59 +0000 | |||
195 | @@ -2451,6 +2451,31 @@ | |||
196 | 2451 | } | 2451 | } |
197 | 2452 | 2452 | ||
198 | 2453 | 2453 | ||
199 | 2454 | /******************************************************************************* | ||
200 | 2455 | ********************************************************************************/ | ||
201 | 2456 | void | ||
202 | 2457 | recognizePragma(expr* e, const zstring& aLocalName) | ||
203 | 2458 | { | ||
204 | 2459 | for (std::vector<pragma*>::const_iterator lIter = theScopedPragmas.begin(); | ||
205 | 2460 | lIter != theScopedPragmas.end(); | ||
206 | 2461 | ++lIter) | ||
207 | 2462 | { | ||
208 | 2463 | pragma* p = *lIter; | ||
209 | 2464 | if (p->theQName->getNamespace() == ZORBA_EXTENSIONS_NS) | ||
210 | 2465 | { | ||
211 | 2466 | if (p->theQName->getLocalName() == aLocalName) | ||
212 | 2467 | { | ||
213 | 2468 | e->get_ccb()->add_pragma(e, p); | ||
214 | 2469 | e->setContainsPragma(ANNOTATION_TRUE); | ||
215 | 2470 | break; | ||
216 | 2471 | } | ||
217 | 2472 | } | ||
218 | 2473 | } | ||
219 | 2474 | } | ||
220 | 2475 | |||
221 | 2476 | |||
222 | 2477 | |||
223 | 2478 | |||
224 | 2454 | ///////////////////////////////////////////////////////////////////////////////// | 2479 | ///////////////////////////////////////////////////////////////////////////////// |
225 | 2455 | // // | 2480 | // // |
226 | 2456 | // Module, VersionDecl, MainModule, LibraryModule, ModuleDecl // | 2481 | // Module, VersionDecl, MainModule, LibraryModule, ModuleDecl // |
227 | @@ -6938,6 +6963,8 @@ | |||
228 | 6938 | 6963 | ||
229 | 6939 | theFlworClausesStack.resize(curClausePos); | 6964 | theFlworClausesStack.resize(curClausePos); |
230 | 6940 | 6965 | ||
231 | 6966 | recognizePragma(flwor, "no-materialization"); | ||
232 | 6967 | |||
233 | 6941 | push_nodestack(flwor); | 6968 | push_nodestack(flwor); |
234 | 6942 | } | 6969 | } |
235 | 6943 | 6970 | ||
236 | 6944 | 6971 | ||
237 | === modified file 'src/diagnostics/diagnostic_en.xml' | |||
238 | --- src/diagnostics/diagnostic_en.xml 2013-08-14 04:05:45 +0000 | |||
239 | +++ src/diagnostics/diagnostic_en.xml 2013-08-16 07:08:59 +0000 | |||
240 | @@ -2279,7 +2279,7 @@ | |||
241 | 2279 | A Zorba programming assertion failed. If this error occurs, it is a bug | 2279 | A Zorba programming assertion failed. If this error occurs, it is a bug |
242 | 2280 | and should be reported. | 2280 | and should be reported. |
243 | 2281 | </comment> | 2281 | </comment> |
245 | 2282 | <value>"$1": assertion failed.${ The following information might help: 2}</value> | 2282 | <value>"$1": assertion failed${ with the message: 2}</value> |
246 | 2283 | </diagnostic> | 2283 | </diagnostic> |
247 | 2284 | 2284 | ||
248 | 2285 | <diagnostic code="ZXQP0003" name="INTERNAL_ERROR"> | 2285 | <diagnostic code="ZXQP0003" name="INTERNAL_ERROR"> |
249 | @@ -2847,6 +2847,10 @@ | |||
250 | 2847 | <diagnostic code="ZDDY0040" name="INCONSISTENT_EDIT"> | 2847 | <diagnostic code="ZDDY0040" name="INCONSISTENT_EDIT"> |
251 | 2848 | <value>attempt to edit an item with a template of a different kind (for example an object with a node).</value> | 2848 | <value>attempt to edit an item with a template of a different kind (for example an object with a node).</value> |
252 | 2849 | </diagnostic> | 2849 | </diagnostic> |
253 | 2850 | |||
254 | 2851 | <diagnostic code="ZDDY0041" name="CONCURRENT_MODIFICATION"> | ||
255 | 2852 | <value>"$1": collection was modified while reading</value> | ||
256 | 2853 | </diagnostic> | ||
257 | 2850 | 2854 | ||
258 | 2851 | <diagnostic code="ZDST0001" name="COLLECTION_ALREADY_DECLARED"> | 2855 | <diagnostic code="ZDST0001" name="COLLECTION_ALREADY_DECLARED"> |
259 | 2852 | <value>"$1": collection already declared</value> | 2856 | <value>"$1": collection already declared</value> |
260 | 2853 | 2857 | ||
261 | === modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp' | |||
262 | --- src/diagnostics/pregenerated/diagnostic_list.cpp 2013-08-01 09:41:39 +0000 | |||
263 | +++ src/diagnostics/pregenerated/diagnostic_list.cpp 2013-08-16 07:08:59 +0000 | |||
264 | @@ -1017,6 +1017,9 @@ | |||
265 | 1017 | ZorbaErrorCode ZDDY0040_INCONSISTENT_EDIT( "ZDDY0040" ); | 1017 | ZorbaErrorCode ZDDY0040_INCONSISTENT_EDIT( "ZDDY0040" ); |
266 | 1018 | 1018 | ||
267 | 1019 | 1019 | ||
268 | 1020 | ZorbaErrorCode ZDDY0041_CONCURRENT_MODIFICATION( "ZDDY0041" ); | ||
269 | 1021 | |||
270 | 1022 | |||
271 | 1020 | ZorbaErrorCode ZDST0001_COLLECTION_ALREADY_DECLARED( "ZDST0001" ); | 1023 | ZorbaErrorCode ZDST0001_COLLECTION_ALREADY_DECLARED( "ZDST0001" ); |
272 | 1021 | 1024 | ||
273 | 1022 | 1025 | ||
274 | 1023 | 1026 | ||
275 | === modified file 'src/diagnostics/pregenerated/dict_en.cpp' | |||
276 | --- src/diagnostics/pregenerated/dict_en.cpp 2013-08-14 04:12:57 +0000 | |||
277 | +++ src/diagnostics/pregenerated/dict_en.cpp 2013-08-16 07:08:59 +0000 | |||
278 | @@ -356,6 +356,7 @@ | |||
279 | 356 | { "ZDDY0038", "\"$1\": illegal edit from queue collection" }, | 356 | { "ZDDY0038", "\"$1\": illegal edit from queue collection" }, |
280 | 357 | { "ZDDY0039", "attempt to edit non-root node in collection \"$1\"" }, | 357 | { "ZDDY0039", "attempt to edit non-root node in collection \"$1\"" }, |
281 | 358 | { "ZDDY0040", "attempt to edit an item with a template of a different kind (for example an object with a node)." }, | 358 | { "ZDDY0040", "attempt to edit an item with a template of a different kind (for example an object with a node)." }, |
282 | 359 | { "ZDDY0041", "\"$1\": collection was modified while reading" }, | ||
283 | 359 | { "ZDST0001", "\"$1\": collection already declared" }, | 360 | { "ZDST0001", "\"$1\": collection already declared" }, |
284 | 360 | { "ZDST0002", "\"$1\": collection already imported into module \"$2\"" }, | 361 | { "ZDST0002", "\"$1\": collection already imported into module \"$2\"" }, |
285 | 361 | { "ZDST0003", "\"$1\": collection declaration not allowed in main module" }, | 362 | { "ZDST0003", "\"$1\": collection declaration not allowed in main module" }, |
286 | @@ -462,7 +463,7 @@ | |||
287 | 462 | { "ZXQD0006", "\"$1\": invalid UTF-8 byte sequence" }, | 463 | { "ZXQD0006", "\"$1\": invalid UTF-8 byte sequence" }, |
288 | 463 | { "ZXQP0000", "no error" }, | 464 | { "ZXQP0000", "no error" }, |
289 | 464 | { "ZXQP0001", "dynamic runtime error${: 1}" }, | 465 | { "ZXQP0001", "dynamic runtime error${: 1}" }, |
291 | 465 | { "ZXQP0002", "\"$1\": assertion failed.${ The following information might help: 2}" }, | 466 | { "ZXQP0002", "\"$1\": assertion failed${ with the message: 2}" }, |
292 | 466 | { "ZXQP0003", "internal error${: 1}" }, | 467 | { "ZXQP0003", "internal error${: 1}" }, |
293 | 467 | { "ZXQP0004", "not yet implemented: $1" }, | 468 | { "ZXQP0004", "not yet implemented: $1" }, |
294 | 468 | { "ZXQP0005", "\"$1\": feature not enabled" }, | 469 | { "ZXQP0005", "\"$1\": feature not enabled" }, |
295 | 469 | 470 | ||
296 | === modified file 'src/store/naive/simple_collection.cpp' | |||
297 | --- src/store/naive/simple_collection.cpp 2013-06-15 02:57:08 +0000 | |||
298 | +++ src/store/naive/simple_collection.cpp 2013-08-16 07:08:59 +0000 | |||
299 | @@ -41,8 +41,9 @@ | |||
300 | 41 | bool isDynamic) | 41 | bool isDynamic) |
301 | 42 | : | 42 | : |
302 | 43 | Collection(name), | 43 | Collection(name), |
305 | 44 | theIsDynamic(isDynamic), | 44 | theIsDynamic(isDynamic), |
306 | 45 | theAnnotations(annotations) | 45 | theAnnotations(annotations), |
307 | 46 | theVersion(0) | ||
308 | 46 | { | 47 | { |
309 | 47 | theId = GET_STORE().createCollectionId(); | 48 | theId = GET_STORE().createCollectionId(); |
310 | 48 | theTreeIdGenerator = GET_STORE().getTreeIdGeneratorFactory().createTreeGenerator(0); | 49 | theTreeIdGenerator = GET_STORE().getTreeIdGeneratorFactory().createTreeGenerator(0); |
311 | @@ -55,7 +56,8 @@ | |||
312 | 55 | ********************************************************************************/ | 56 | ********************************************************************************/ |
313 | 56 | SimpleCollection::SimpleCollection() | 57 | SimpleCollection::SimpleCollection() |
314 | 57 | : | 58 | : |
316 | 58 | theIsDynamic(false) | 59 | theIsDynamic(false), |
317 | 60 | theVersion(0) | ||
318 | 59 | { | 61 | { |
319 | 60 | theTreeIdGenerator = GET_STORE().getTreeIdGeneratorFactory().createTreeGenerator(0); | 62 | theTreeIdGenerator = GET_STORE().getTreeIdGeneratorFactory().createTreeGenerator(0); |
320 | 61 | } | 63 | } |
321 | @@ -282,7 +284,8 @@ | |||
322 | 282 | ERROR_PARAMS(ZED(ZXQD0004_NOT_WITHIN_RANGE), position) | 284 | ERROR_PARAMS(ZED(ZXQD0004_NOT_WITHIN_RANGE), position) |
323 | 283 | ); | 285 | ); |
324 | 284 | } | 286 | } |
326 | 285 | 287 | ||
327 | 288 | ++theVersion; | ||
328 | 286 | } | 289 | } |
329 | 287 | 290 | ||
330 | 288 | 291 | ||
331 | @@ -382,6 +385,8 @@ | |||
332 | 382 | theTrees[targetPos + i].transfer(items[i]); | 385 | theTrees[targetPos + i].transfer(items[i]); |
333 | 383 | } | 386 | } |
334 | 384 | 387 | ||
335 | 388 | ++theVersion; | ||
336 | 389 | |||
337 | 385 | return xs_integer(targetPos); | 390 | return xs_integer(targetPos); |
338 | 386 | } | 391 | } |
339 | 387 | 392 | ||
340 | @@ -415,6 +420,7 @@ | |||
341 | 415 | { | 420 | { |
342 | 416 | csize pos = to_xs_unsignedInt(position); | 421 | csize pos = to_xs_unsignedInt(position); |
343 | 417 | theTrees.erase(theTrees.begin() + pos); | 422 | theTrees.erase(theTrees.begin() + pos); |
344 | 423 | ++theVersion; | ||
345 | 418 | return true; | 424 | return true; |
346 | 419 | } | 425 | } |
347 | 420 | catch (const std::range_error&) | 426 | catch (const std::range_error&) |
348 | @@ -468,6 +474,7 @@ | |||
349 | 468 | structuredItem->detachFromCollection(); | 474 | structuredItem->detachFromCollection(); |
350 | 469 | 475 | ||
351 | 470 | theTrees.erase(theTrees.begin() + pos); | 476 | theTrees.erase(theTrees.begin() + pos); |
352 | 477 | ++theVersion; | ||
353 | 471 | return true; | 478 | return true; |
354 | 472 | } | 479 | } |
355 | 473 | } | 480 | } |
356 | @@ -533,6 +540,7 @@ | |||
357 | 533 | theTrees.erase(theTrees.begin() + pos); | 540 | theTrees.erase(theTrees.begin() + pos); |
358 | 534 | } | 541 | } |
359 | 535 | 542 | ||
360 | 543 | ++theVersion; | ||
361 | 536 | return xs_integer(last - pos); | 544 | return xs_integer(last - pos); |
362 | 537 | } | 545 | } |
363 | 538 | } | 546 | } |
364 | @@ -623,11 +631,14 @@ | |||
365 | 623 | ********************************************************************************/ | 631 | ********************************************************************************/ |
366 | 624 | void SimpleCollection::CollectionIter::open() | 632 | void SimpleCollection::CollectionIter::open() |
367 | 625 | { | 633 | { |
369 | 626 | SYNC_CODE(theCollection->theLatch.rlock();) | 634 | //SYNC_CODE(theCollection->theLatch.rlock();) |
370 | 627 | theHaveLock = true; | 635 | theHaveLock = true; |
371 | 628 | 636 | ||
372 | 629 | theIterator = theCollection->theTrees.begin(); | 637 | theIterator = theCollection->theTrees.begin(); |
373 | 630 | theEnd = theCollection->theTrees.end(); | 638 | theEnd = theCollection->theTrees.end(); |
374 | 639 | |||
375 | 640 | theVersion = theCollection->theVersion; | ||
376 | 641 | |||
377 | 631 | skip(); | 642 | skip(); |
378 | 632 | } | 643 | } |
379 | 633 | 644 | ||
380 | @@ -637,6 +648,12 @@ | |||
381 | 637 | ********************************************************************************/ | 648 | ********************************************************************************/ |
382 | 638 | bool SimpleCollection::CollectionIter::next(store::Item_t& result) | 649 | bool SimpleCollection::CollectionIter::next(store::Item_t& result) |
383 | 639 | { | 650 | { |
384 | 651 | if (theVersion != theCollection->theVersion) | ||
385 | 652 | { | ||
386 | 653 | throw ZORBA_EXCEPTION(zerr::ZDDY0041_CONCURRENT_MODIFICATION, | ||
387 | 654 | ERROR_PARAMS(theCollection->getName()->getStringValue())); | ||
388 | 655 | } | ||
389 | 656 | |||
390 | 640 | if (!theHaveLock) | 657 | if (!theHaveLock) |
391 | 641 | { | 658 | { |
392 | 642 | throw ZORBA_EXCEPTION(zerr::ZDDY0019_COLLECTION_ITERATOR_NOT_OPEN, | 659 | throw ZORBA_EXCEPTION(zerr::ZDDY0019_COLLECTION_ITERATOR_NOT_OPEN, |
393 | @@ -663,6 +680,8 @@ | |||
394 | 663 | { | 680 | { |
395 | 664 | theIterator = theCollection->theTrees.begin(); | 681 | theIterator = theCollection->theTrees.begin(); |
396 | 665 | theEnd = theCollection->theTrees.end(); | 682 | theEnd = theCollection->theTrees.end(); |
397 | 683 | |||
398 | 684 | theVersion = theCollection->theVersion; | ||
399 | 666 | skip(); | 685 | skip(); |
400 | 667 | } | 686 | } |
401 | 668 | 687 | ||
402 | @@ -674,7 +693,7 @@ | |||
403 | 674 | { | 693 | { |
404 | 675 | assert(theHaveLock); | 694 | assert(theHaveLock); |
405 | 676 | theHaveLock = false; | 695 | theHaveLock = false; |
407 | 677 | SYNC_CODE(theCollection->theLatch.unlock();) | 696 | //SYNC_CODE(theCollection->theLatch.unlock();) |
408 | 678 | } | 697 | } |
409 | 679 | 698 | ||
410 | 680 | } // namespace simplestore | 699 | } // namespace simplestore |
411 | 681 | 700 | ||
412 | === modified file 'src/store/naive/simple_collection.h' | |||
413 | --- src/store/naive/simple_collection.h 2013-02-26 04:12:43 +0000 | |||
414 | +++ src/store/naive/simple_collection.h 2013-08-16 07:08:59 +0000 | |||
415 | @@ -84,6 +84,7 @@ | |||
416 | 84 | checked_vector<store::Item_t>::iterator theEnd; | 84 | checked_vector<store::Item_t>::iterator theEnd; |
417 | 85 | bool theHaveLock; | 85 | bool theHaveLock; |
418 | 86 | csize theSkip; | 86 | csize theSkip; |
419 | 87 | ulong theVersion; | ||
420 | 87 | 88 | ||
421 | 88 | public: | 89 | public: |
422 | 89 | CollectionIter(SimpleCollection* collection, const xs_integer& skip); | 90 | CollectionIter(SimpleCollection* collection, const xs_integer& skip); |
423 | @@ -111,6 +112,8 @@ | |||
424 | 111 | 112 | ||
425 | 112 | const std::vector<store::Annotation_t> theAnnotations; | 113 | const std::vector<store::Annotation_t> theAnnotations; |
426 | 113 | 114 | ||
427 | 115 | ulong theVersion; | ||
428 | 116 | |||
429 | 114 | SYNC_CODE(Latch theLatch;) | 117 | SYNC_CODE(Latch theLatch;) |
430 | 115 | 118 | ||
431 | 116 | protected: | 119 | protected: |
432 | 117 | 120 | ||
433 | === added file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor24.iter' | |||
434 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor24.iter 1970-01-01 00:00:00 +0000 | |||
435 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor24.iter 2013-08-16 07:08:59 +0000 | |||
436 | @@ -0,0 +1,56 @@ | |||
437 | 1 | Iterator tree for const-folded expr: | ||
438 | 2 | <FunctionTraceIterator> | ||
439 | 3 | <FnConcatIterator/> | ||
440 | 4 | </FunctionTraceIterator> | ||
441 | 5 | |||
442 | 6 | Iterator tree for main query: | ||
443 | 7 | <SequentialIterator> | ||
444 | 8 | <CtxVarDeclareIterator varid="4" varname="xmlcontents"> | ||
445 | 9 | <UDFunctionCallIterator function="fetch:content"> | ||
446 | 10 | <SingletonIterator value="xs:string($RBKT_SRC_DIR/Queries/zorba/flwor/flwor24.xml)"/> | ||
447 | 11 | </UDFunctionCallIterator> | ||
448 | 12 | </CtxVarDeclareIterator> | ||
449 | 13 | <flwor::FLWORIterator> | ||
450 | 14 | <ForVariable name="w"> | ||
451 | 15 | <FnZorbaParseXmlFragmentIterator> | ||
452 | 16 | <PromoteIterator type="xs:string"> | ||
453 | 17 | <FnDataIterator> | ||
454 | 18 | <CtxVarIterator varid="4" varname="xmlcontents" varkind="local"/> | ||
455 | 19 | </FnDataIterator> | ||
456 | 20 | </PromoteIterator> | ||
457 | 21 | <TreatIterator type="[NodeXQType elementNode nametest=[uri: http://zorba.io/modules/xml-options, local: options] content=[XQType ANY_TYPE_KIND*]]" quant="?"> | ||
458 | 22 | <ElementIterator> | ||
459 | 23 | <SingletonIterator value="xs:QName(http://zorba.io/modules/xml-options,opt,options)"/> | ||
460 | 24 | <ElementIterator> | ||
461 | 25 | <SingletonIterator value="xs:QName(http://zorba.io/modules/xml-options,opt,parse-external-parsed-entity)"/> | ||
462 | 26 | <AttributeIterator qname="xs:QName(http://zorba.io/modules/xml-options,opt,skip-root-nodes)"> | ||
463 | 27 | <SingletonIterator value="xs:string(1)"/> | ||
464 | 28 | </AttributeIterator> | ||
465 | 29 | </ElementIterator> | ||
466 | 30 | </ElementIterator> | ||
467 | 31 | </TreatIterator> | ||
468 | 32 | </FnZorbaParseXmlFragmentIterator> | ||
469 | 33 | </ForVariable> | ||
470 | 34 | <MaterializeClause> | ||
471 | 35 | <MaterializeForVariable inputVar="w : "/> | ||
472 | 36 | </MaterializeClause> | ||
473 | 37 | <ReturnClause> | ||
474 | 38 | <SequentialIterator> | ||
475 | 39 | <ApplyIterator> | ||
476 | 40 | <FnConcatIterator/> | ||
477 | 41 | </ApplyIterator> | ||
478 | 42 | <ForVarIterator varname="w"/> | ||
479 | 43 | </SequentialIterator> | ||
480 | 44 | </ReturnClause> | ||
481 | 45 | </flwor::FLWORIterator> | ||
482 | 46 | </SequentialIterator> | ||
483 | 47 | |||
484 | 48 | Iterator tree for fetch:content: | ||
485 | 49 | <FunctionTraceIterator> | ||
486 | 50 | <FetchContentIterator> | ||
487 | 51 | <LetVarIterator varname="uri"/> | ||
488 | 52 | <SingletonIterator value="xs:string(SOME_CONTENT)"/> | ||
489 | 53 | <SingletonIterator value="xs:string(UTF-8)"/> | ||
490 | 54 | </FetchContentIterator> | ||
491 | 55 | </FunctionTraceIterator> | ||
492 | 56 | |||
493 | 0 | 57 | ||
494 | === added file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor25.iter' | |||
495 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor25.iter 1970-01-01 00:00:00 +0000 | |||
496 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor25.iter 2013-08-16 07:08:59 +0000 | |||
497 | @@ -0,0 +1,56 @@ | |||
498 | 1 | Iterator tree for const-folded expr: | ||
499 | 2 | <FunctionTraceIterator> | ||
500 | 3 | <FnConcatIterator/> | ||
501 | 4 | </FunctionTraceIterator> | ||
502 | 5 | |||
503 | 6 | Iterator tree for main query: | ||
504 | 7 | <SequentialIterator> | ||
505 | 8 | <CtxVarDeclareIterator varid="4" varname="xmlcontents"> | ||
506 | 9 | <UDFunctionCallIterator function="fetch:content"> | ||
507 | 10 | <SingletonIterator value="xs:string($RBKT_SRC_DIR/Queries/zorba/flwor/flwor24.xml)"/> | ||
508 | 11 | </UDFunctionCallIterator> | ||
509 | 12 | </CtxVarDeclareIterator> | ||
510 | 13 | <CtxVarDeclareIterator varid="5" varname="contents"> | ||
511 | 14 | <FnZorbaParseXmlFragmentIterator> | ||
512 | 15 | <PromoteIterator type="xs:string"> | ||
513 | 16 | <FnDataIterator> | ||
514 | 17 | <CtxVarIterator varid="4" varname="xmlcontents" varkind="local"/> | ||
515 | 18 | </FnDataIterator> | ||
516 | 19 | </PromoteIterator> | ||
517 | 20 | <TreatIterator type="[NodeXQType elementNode nametest=[uri: http://zorba.io/modules/xml-options, local: options] content=[XQType ANY_TYPE_KIND*]]" quant="?"> | ||
518 | 21 | <ElementIterator> | ||
519 | 22 | <SingletonIterator value="xs:QName(http://zorba.io/modules/xml-options,opt,options)"/> | ||
520 | 23 | <ElementIterator> | ||
521 | 24 | <SingletonIterator value="xs:QName(http://zorba.io/modules/xml-options,opt,parse-external-parsed-entity)"/> | ||
522 | 25 | <AttributeIterator qname="xs:QName(http://zorba.io/modules/xml-options,opt,skip-root-nodes)"> | ||
523 | 26 | <SingletonIterator value="xs:string(1)"/> | ||
524 | 27 | </AttributeIterator> | ||
525 | 28 | </ElementIterator> | ||
526 | 29 | </ElementIterator> | ||
527 | 30 | </TreatIterator> | ||
528 | 31 | </FnZorbaParseXmlFragmentIterator> | ||
529 | 32 | </CtxVarDeclareIterator> | ||
530 | 33 | <flwor::FLWORIterator> | ||
531 | 34 | <ForVariable name="w"> | ||
532 | 35 | <CtxVarIterator varid="5" varname="contents" varkind="local"/> | ||
533 | 36 | </ForVariable> | ||
534 | 37 | <ReturnClause> | ||
535 | 38 | <SequentialIterator> | ||
536 | 39 | <ApplyIterator> | ||
537 | 40 | <FnConcatIterator/> | ||
538 | 41 | </ApplyIterator> | ||
539 | 42 | <ForVarIterator varname="w"/> | ||
540 | 43 | </SequentialIterator> | ||
541 | 44 | </ReturnClause> | ||
542 | 45 | </flwor::FLWORIterator> | ||
543 | 46 | </SequentialIterator> | ||
544 | 47 | |||
545 | 48 | Iterator tree for fetch:content: | ||
546 | 49 | <FunctionTraceIterator> | ||
547 | 50 | <FetchContentIterator> | ||
548 | 51 | <LetVarIterator varname="uri"/> | ||
549 | 52 | <SingletonIterator value="xs:string(SOME_CONTENT)"/> | ||
550 | 53 | <SingletonIterator value="xs:string(UTF-8)"/> | ||
551 | 54 | </FetchContentIterator> | ||
552 | 55 | </FunctionTraceIterator> | ||
553 | 56 | |||
554 | 0 | 57 | ||
555 | === added file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor26.iter' | |||
556 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor26.iter 1970-01-01 00:00:00 +0000 | |||
557 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor26.iter 2013-08-16 07:08:59 +0000 | |||
558 | @@ -0,0 +1,66 @@ | |||
559 | 1 | Iterator tree for main query: | ||
560 | 2 | <SequentialIterator> | ||
561 | 3 | <CtxVarDeclareIterator varid="4" varname="coll"> | ||
562 | 4 | <SingletonIterator value="xs:QName(http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl,ddl,coll1)"/> | ||
563 | 5 | </CtxVarDeclareIterator> | ||
564 | 6 | <SequentialIterator> | ||
565 | 7 | <ApplyIterator> | ||
566 | 8 | <ZorbaCreateCollectionIterator> | ||
567 | 9 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
568 | 10 | </ZorbaCreateCollectionIterator> | ||
569 | 11 | </ApplyIterator> | ||
570 | 12 | <ApplyIterator> | ||
571 | 13 | <ZorbaInsertNodesLastIterator is-dynamic="true" need-to-copy="true"> | ||
572 | 14 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
573 | 15 | <FnConcatIterator> | ||
574 | 16 | <ElementIterator> | ||
575 | 17 | <SingletonIterator value="xs:QName(,,a)"/> | ||
576 | 18 | </ElementIterator> | ||
577 | 19 | <ElementIterator> | ||
578 | 20 | <SingletonIterator value="xs:QName(,,c)"/> | ||
579 | 21 | </ElementIterator> | ||
580 | 22 | <ElementIterator> | ||
581 | 23 | <SingletonIterator value="xs:QName(,,b)"/> | ||
582 | 24 | </ElementIterator> | ||
583 | 25 | </FnConcatIterator> | ||
584 | 26 | </ZorbaInsertNodesLastIterator> | ||
585 | 27 | </ApplyIterator> | ||
586 | 28 | <flwor::FLWORIterator> | ||
587 | 29 | <ForVariable name="w"> | ||
588 | 30 | <ZorbaCollectionIterator> | ||
589 | 31 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
590 | 32 | </ZorbaCollectionIterator> | ||
591 | 33 | </ForVariable> | ||
592 | 34 | <ReturnClause> | ||
593 | 35 | <SequentialIterator> | ||
594 | 36 | <ApplyIterator> | ||
595 | 37 | <FunctionTraceIterator> | ||
596 | 38 | <IfThenElseIterator> | ||
597 | 39 | <TypedValueCompareIterator_INTEGER> | ||
598 | 40 | <ForVarIterator varname="pos"/> | ||
599 | 41 | <SingletonIterator value="xs:integer(1)"/> | ||
600 | 42 | </TypedValueCompareIterator_INTEGER> | ||
601 | 43 | <ApplyIterator> | ||
602 | 44 | <ZorbaInsertNodesLastIterator is-dynamic="true" need-to-copy="true"> | ||
603 | 45 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
604 | 46 | <ElementIterator> | ||
605 | 47 | <SingletonIterator value="xs:QName(,,d)"/> | ||
606 | 48 | <EnclosedIterator attr_cont="false"> | ||
607 | 49 | <ForVarIterator varname="pos"/> | ||
608 | 50 | </EnclosedIterator> | ||
609 | 51 | </ElementIterator> | ||
610 | 52 | </ZorbaInsertNodesLastIterator> | ||
611 | 53 | </ApplyIterator> | ||
612 | 54 | <ApplyIterator> | ||
613 | 55 | <FnConcatIterator/> | ||
614 | 56 | </ApplyIterator> | ||
615 | 57 | </IfThenElseIterator> | ||
616 | 58 | </FunctionTraceIterator> | ||
617 | 59 | </ApplyIterator> | ||
618 | 60 | <ForVarIterator varname="w"/> | ||
619 | 61 | </SequentialIterator> | ||
620 | 62 | </ReturnClause> | ||
621 | 63 | </flwor::FLWORIterator> | ||
622 | 64 | </SequentialIterator> | ||
623 | 65 | </SequentialIterator> | ||
624 | 66 | |||
625 | 0 | 67 | ||
626 | === added file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor27.iter' | |||
627 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor27.iter 1970-01-01 00:00:00 +0000 | |||
628 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor27.iter 2013-08-16 07:08:59 +0000 | |||
629 | @@ -0,0 +1,63 @@ | |||
630 | 1 | Iterator tree for const-folded expr: | ||
631 | 2 | <FunctionTraceIterator> | ||
632 | 3 | <FnConcatIterator/> | ||
633 | 4 | </FunctionTraceIterator> | ||
634 | 5 | |||
635 | 6 | Iterator tree for main query: | ||
636 | 7 | <SequentialIterator> | ||
637 | 8 | <CtxVarDeclareIterator varid="4" varname="xmlcontents"> | ||
638 | 9 | <UDFunctionCallIterator function="fetch:content"> | ||
639 | 10 | <SingletonIterator value="xs:string($RBKT_SRC_DIR/Queries/zorba/flwor/flwor24.xml)"/> | ||
640 | 11 | </UDFunctionCallIterator> | ||
641 | 12 | </CtxVarDeclareIterator> | ||
642 | 13 | <CtxVarDeclareIterator varid="5" varname="contents"> | ||
643 | 14 | <FnZorbaParseXmlFragmentIterator> | ||
644 | 15 | <PromoteIterator type="xs:string"> | ||
645 | 16 | <FnDataIterator> | ||
646 | 17 | <CtxVarIterator varid="4" varname="xmlcontents" varkind="local"/> | ||
647 | 18 | </FnDataIterator> | ||
648 | 19 | </PromoteIterator> | ||
649 | 20 | <TreatIterator type="[NodeXQType elementNode nametest=[uri: http://zorba.io/modules/xml-options, local: options] content=[XQType ANY_TYPE_KIND*]]" quant="?"> | ||
650 | 21 | <ElementIterator> | ||
651 | 22 | <SingletonIterator value="xs:QName(http://zorba.io/modules/xml-options,opt,options)"/> | ||
652 | 23 | <ElementIterator> | ||
653 | 24 | <SingletonIterator value="xs:QName(http://zorba.io/modules/xml-options,opt,parse-external-parsed-entity)"/> | ||
654 | 25 | <AttributeIterator qname="xs:QName(http://zorba.io/modules/xml-options,opt,skip-root-nodes)"> | ||
655 | 26 | <SingletonIterator value="xs:string(1)"/> | ||
656 | 27 | </AttributeIterator> | ||
657 | 28 | </ElementIterator> | ||
658 | 29 | </ElementIterator> | ||
659 | 30 | </TreatIterator> | ||
660 | 31 | </FnZorbaParseXmlFragmentIterator> | ||
661 | 32 | </CtxVarDeclareIterator> | ||
662 | 33 | <flwor::FLWORIterator> | ||
663 | 34 | <ForVariable name="w"> | ||
664 | 35 | <CtxVarIterator varid="5" varname="contents" varkind="local"/> | ||
665 | 36 | </ForVariable> | ||
666 | 37 | <OrderBySpec> | ||
667 | 38 | <FnLocalNameIterator> | ||
668 | 39 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="?"> | ||
669 | 40 | <ForVarIterator varname="w"/> | ||
670 | 41 | </TreatIterator> | ||
671 | 42 | </FnLocalNameIterator> | ||
672 | 43 | </OrderBySpec> | ||
673 | 44 | <ReturnClause> | ||
674 | 45 | <SequentialIterator> | ||
675 | 46 | <ApplyIterator> | ||
676 | 47 | <FnConcatIterator/> | ||
677 | 48 | </ApplyIterator> | ||
678 | 49 | <ForVarIterator varname="w"/> | ||
679 | 50 | </SequentialIterator> | ||
680 | 51 | </ReturnClause> | ||
681 | 52 | </flwor::FLWORIterator> | ||
682 | 53 | </SequentialIterator> | ||
683 | 54 | |||
684 | 55 | Iterator tree for fetch:content: | ||
685 | 56 | <FunctionTraceIterator> | ||
686 | 57 | <FetchContentIterator> | ||
687 | 58 | <LetVarIterator varname="uri"/> | ||
688 | 59 | <SingletonIterator value="xs:string(SOME_CONTENT)"/> | ||
689 | 60 | <SingletonIterator value="xs:string(UTF-8)"/> | ||
690 | 61 | </FetchContentIterator> | ||
691 | 62 | </FunctionTraceIterator> | ||
692 | 63 | |||
693 | 0 | 64 | ||
694 | === added file 'test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor28.iter' | |||
695 | --- test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor28.iter 1970-01-01 00:00:00 +0000 | |||
696 | +++ test/rbkt/ExpCompilerResults/IterPlan/zorba/flwor/flwor28.iter 2013-08-16 07:08:59 +0000 | |||
697 | @@ -0,0 +1,57 @@ | |||
698 | 1 | Iterator tree for const-folded expr: | ||
699 | 2 | <FunctionTraceIterator> | ||
700 | 3 | <FnConcatIterator/> | ||
701 | 4 | </FunctionTraceIterator> | ||
702 | 5 | |||
703 | 6 | Iterator tree for main query: | ||
704 | 7 | <SequentialIterator> | ||
705 | 8 | <CtxVarDeclareIterator varid="4" varname="coll"> | ||
706 | 9 | <SingletonIterator value="xs:QName(http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl,ddl,coll1)"/> | ||
707 | 10 | </CtxVarDeclareIterator> | ||
708 | 11 | <SequentialIterator> | ||
709 | 12 | <ApplyIterator> | ||
710 | 13 | <ZorbaCreateCollectionIterator> | ||
711 | 14 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
712 | 15 | </ZorbaCreateCollectionIterator> | ||
713 | 16 | </ApplyIterator> | ||
714 | 17 | <ApplyIterator> | ||
715 | 18 | <ZorbaInsertNodesLastIterator is-dynamic="true" need-to-copy="true"> | ||
716 | 19 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
717 | 20 | <FnConcatIterator> | ||
718 | 21 | <ElementIterator> | ||
719 | 22 | <SingletonIterator value="xs:QName(,,a)"/> | ||
720 | 23 | </ElementIterator> | ||
721 | 24 | <ElementIterator> | ||
722 | 25 | <SingletonIterator value="xs:QName(,,c)"/> | ||
723 | 26 | </ElementIterator> | ||
724 | 27 | <ElementIterator> | ||
725 | 28 | <SingletonIterator value="xs:QName(,,b)"/> | ||
726 | 29 | </ElementIterator> | ||
727 | 30 | </FnConcatIterator> | ||
728 | 31 | </ZorbaInsertNodesLastIterator> | ||
729 | 32 | </ApplyIterator> | ||
730 | 33 | <flwor::FLWORIterator> | ||
731 | 34 | <ForVariable name="w"> | ||
732 | 35 | <ZorbaCollectionIterator> | ||
733 | 36 | <CtxVarIterator varid="4" varname="coll" varkind="global"/> | ||
734 | 37 | </ZorbaCollectionIterator> | ||
735 | 38 | </ForVariable> | ||
736 | 39 | <OrderBySpec> | ||
737 | 40 | <FnLocalNameIterator> | ||
738 | 41 | <TreatIterator type="[NodeXQType anyNode content=[XQType ANY_TYPE_KIND*]]" quant="?"> | ||
739 | 42 | <ForVarIterator varname="w"/> | ||
740 | 43 | </TreatIterator> | ||
741 | 44 | </FnLocalNameIterator> | ||
742 | 45 | </OrderBySpec> | ||
743 | 46 | <ReturnClause> | ||
744 | 47 | <SequentialIterator> | ||
745 | 48 | <ApplyIterator> | ||
746 | 49 | <FnConcatIterator/> | ||
747 | 50 | </ApplyIterator> | ||
748 | 51 | <ForVarIterator varname="w"/> | ||
749 | 52 | </SequentialIterator> | ||
750 | 53 | </ReturnClause> | ||
751 | 54 | </flwor::FLWORIterator> | ||
752 | 55 | </SequentialIterator> | ||
753 | 56 | </SequentialIterator> | ||
754 | 57 | |||
755 | 0 | 58 | ||
756 | === added file 'test/rbkt/ExpQueryResults/zorba/flwor/flwor24.xml.res' | |||
757 | --- test/rbkt/ExpQueryResults/zorba/flwor/flwor24.xml.res 1970-01-01 00:00:00 +0000 | |||
758 | +++ test/rbkt/ExpQueryResults/zorba/flwor/flwor24.xml.res 2013-08-16 07:08:59 +0000 | |||
759 | @@ -0,0 +1,1 @@ | |||
760 | 1 | <a/><c/><b/> | ||
761 | 0 | \ No newline at end of file | 2 | \ No newline at end of file |
762 | 1 | 3 | ||
763 | === added file 'test/rbkt/ExpQueryResults/zorba/flwor/flwor25.xml.res' | |||
764 | --- test/rbkt/ExpQueryResults/zorba/flwor/flwor25.xml.res 1970-01-01 00:00:00 +0000 | |||
765 | +++ test/rbkt/ExpQueryResults/zorba/flwor/flwor25.xml.res 2013-08-16 07:08:59 +0000 | |||
766 | @@ -0,0 +1,1 @@ | |||
767 | 1 | <a/><c/><b/> | ||
768 | 0 | \ No newline at end of file | 2 | \ No newline at end of file |
769 | 1 | 3 | ||
770 | === added file 'test/rbkt/ExpQueryResults/zorba/flwor/flwor27.xml.res' | |||
771 | --- test/rbkt/ExpQueryResults/zorba/flwor/flwor27.xml.res 1970-01-01 00:00:00 +0000 | |||
772 | +++ test/rbkt/ExpQueryResults/zorba/flwor/flwor27.xml.res 2013-08-16 07:08:59 +0000 | |||
773 | @@ -0,0 +1,1 @@ | |||
774 | 1 | <c/><b/><a/> | ||
775 | 0 | \ No newline at end of file | 2 | \ No newline at end of file |
776 | 1 | 3 | ||
777 | === added file 'test/rbkt/ExpQueryResults/zorba/flwor/flwor28.xml.res' | |||
778 | --- test/rbkt/ExpQueryResults/zorba/flwor/flwor28.xml.res 1970-01-01 00:00:00 +0000 | |||
779 | +++ test/rbkt/ExpQueryResults/zorba/flwor/flwor28.xml.res 2013-08-16 07:08:59 +0000 | |||
780 | @@ -0,0 +1,1 @@ | |||
781 | 1 | <c/><b/><a/> | ||
782 | 0 | \ No newline at end of file | 2 | \ No newline at end of file |
783 | 1 | 3 | ||
784 | === added file 'test/rbkt/ExpQueryResults/zorba/scripting/flwor2.xml.res' | |||
785 | --- test/rbkt/ExpQueryResults/zorba/scripting/flwor2.xml.res 1970-01-01 00:00:00 +0000 | |||
786 | +++ test/rbkt/ExpQueryResults/zorba/scripting/flwor2.xml.res 2013-08-16 07:08:59 +0000 | |||
787 | @@ -0,0 +1,2 @@ | |||
788 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
789 | 2 | true | ||
790 | 0 | 3 | ||
791 | === removed file 'test/rbkt/ExpQueryResults/zorba/scripting/flwor2.xml.res' | |||
792 | --- test/rbkt/ExpQueryResults/zorba/scripting/flwor2.xml.res 2013-02-07 17:24:36 +0000 | |||
793 | +++ test/rbkt/ExpQueryResults/zorba/scripting/flwor2.xml.res 1970-01-01 00:00:00 +0000 | |||
794 | @@ -1,2 +0,0 @@ | |||
795 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
796 | 2 | true | ||
797 | 3 | 0 | ||
798 | === added file 'test/rbkt/Queries/zorba/flwor/flwor24.xml' | |||
799 | --- test/rbkt/Queries/zorba/flwor/flwor24.xml 1970-01-01 00:00:00 +0000 | |||
800 | +++ test/rbkt/Queries/zorba/flwor/flwor24.xml 2013-08-16 07:08:59 +0000 | |||
801 | @@ -0,0 +1,5 @@ | |||
802 | 1 | <root> | ||
803 | 2 | <a/> | ||
804 | 3 | <c/> | ||
805 | 4 | <b/> | ||
806 | 5 | </root> | ||
807 | 0 | \ No newline at end of file | 6 | \ No newline at end of file |
808 | 1 | 7 | ||
809 | === added file 'test/rbkt/Queries/zorba/flwor/flwor24.xq' | |||
810 | --- test/rbkt/Queries/zorba/flwor/flwor24.xq 1970-01-01 00:00:00 +0000 | |||
811 | +++ test/rbkt/Queries/zorba/flwor/flwor24.xq 2013-08-16 07:08:59 +0000 | |||
812 | @@ -0,0 +1,25 @@ | |||
813 | 1 | import module namespace parse-xml = "http://zorba.io/modules/xml"; | ||
814 | 2 | import schema namespace opt = "http://zorba.io/modules/xml-options"; | ||
815 | 3 | import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch"; | ||
816 | 4 | |||
817 | 5 | declare namespace an = "http://zorba.io/annotations"; | ||
818 | 6 | |||
819 | 7 | declare %an:sequential function local:test-sequential() | ||
820 | 8 | { | ||
821 | 9 | |||
822 | 10 | }; | ||
823 | 11 | |||
824 | 12 | variable $xmlcontents := fetch:content("$RBKT_SRC_DIR/Queries/zorba/flwor/flwor24.xml"); | ||
825 | 13 | |||
826 | 14 | let $contents := parse-xml:parse( | ||
827 | 15 | $xmlcontents, | ||
828 | 16 | <opt:options> | ||
829 | 17 | <opt:parse-external-parsed-entity opt:skip-root-nodes="1" /> | ||
830 | 18 | </opt:options>) | ||
831 | 19 | |||
832 | 20 | for $w at $pos in $contents | ||
833 | 21 | return | ||
834 | 22 | { | ||
835 | 23 | local:test-sequential(); | ||
836 | 24 | $w | ||
837 | 25 | } | ||
838 | 0 | \ No newline at end of file | 26 | \ No newline at end of file |
839 | 1 | 27 | ||
840 | === added file 'test/rbkt/Queries/zorba/flwor/flwor25.xq' | |||
841 | --- test/rbkt/Queries/zorba/flwor/flwor25.xq 1970-01-01 00:00:00 +0000 | |||
842 | +++ test/rbkt/Queries/zorba/flwor/flwor25.xq 2013-08-16 07:08:59 +0000 | |||
843 | @@ -0,0 +1,29 @@ | |||
844 | 1 | import module namespace parse-xml = "http://zorba.io/modules/xml"; | ||
845 | 2 | import schema namespace opt = "http://zorba.io/modules/xml-options"; | ||
846 | 3 | import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch"; | ||
847 | 4 | |||
848 | 5 | declare namespace an = "http://zorba.io/annotations"; | ||
849 | 6 | declare namespace ext = "http://zorba.io/extensions"; | ||
850 | 7 | |||
851 | 8 | declare %an:sequential function local:test-sequential() | ||
852 | 9 | { | ||
853 | 10 | |||
854 | 11 | }; | ||
855 | 12 | |||
856 | 13 | variable $xmlcontents := fetch:content("$RBKT_SRC_DIR/Queries/zorba/flwor/flwor24.xml"); | ||
857 | 14 | |||
858 | 15 | variable $contents := parse-xml:parse( | ||
859 | 16 | $xmlcontents, | ||
860 | 17 | <opt:options> | ||
861 | 18 | <opt:parse-external-parsed-entity opt:skip-root-nodes="1" /> | ||
862 | 19 | </opt:options>); | ||
863 | 20 | |||
864 | 21 | (# ext:no-materialization #) | ||
865 | 22 | { | ||
866 | 23 | for $w at $pos in $contents | ||
867 | 24 | return | ||
868 | 25 | { | ||
869 | 26 | local:test-sequential(); | ||
870 | 27 | $w | ||
871 | 28 | } | ||
872 | 29 | } | ||
873 | 0 | \ No newline at end of file | 30 | \ No newline at end of file |
874 | 1 | 31 | ||
875 | === added file 'test/rbkt/Queries/zorba/flwor/flwor26.spec' | |||
876 | --- test/rbkt/Queries/zorba/flwor/flwor26.spec 1970-01-01 00:00:00 +0000 | |||
877 | +++ test/rbkt/Queries/zorba/flwor/flwor26.spec 2013-08-16 07:08:59 +0000 | |||
878 | @@ -0,0 +1,1 @@ | |||
879 | 1 | Error: http://zorba.io/errors:ZDDY0041 | ||
880 | 0 | \ No newline at end of file | 2 | \ No newline at end of file |
881 | 1 | 3 | ||
882 | === added file 'test/rbkt/Queries/zorba/flwor/flwor26.xq' | |||
883 | --- test/rbkt/Queries/zorba/flwor/flwor26.xq 1970-01-01 00:00:00 +0000 | |||
884 | +++ test/rbkt/Queries/zorba/flwor/flwor26.xq 2013-08-16 07:08:59 +0000 | |||
885 | @@ -0,0 +1,30 @@ | |||
886 | 1 | import module namespace parse-xml = "http://zorba.io/modules/xml"; | ||
887 | 2 | import schema namespace opt = "http://zorba.io/modules/xml-options"; | ||
888 | 3 | import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch"; | ||
889 | 4 | import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl"; | ||
890 | 5 | import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml"; | ||
891 | 6 | |||
892 | 7 | declare namespace an = "http://zorba.io/annotations"; | ||
893 | 8 | declare namespace ext = "http://zorba.io/extensions"; | ||
894 | 9 | |||
895 | 10 | declare variable $coll := xs:QName("ddl:coll1"); | ||
896 | 11 | |||
897 | 12 | declare %an:sequential function local:test-sequential($pos) | ||
898 | 13 | { | ||
899 | 14 | if ($pos eq 1) | ||
900 | 15 | then dml:insert-nodes-last($coll, <d>{$pos}</d>); | ||
901 | 16 | else (); | ||
902 | 17 | }; | ||
903 | 18 | |||
904 | 19 | ddl:create($coll); | ||
905 | 20 | dml:insert-nodes-last($coll, (<a/>,<c/>,<b/>)); | ||
906 | 21 | |||
907 | 22 | (# ext:no-materialization #) | ||
908 | 23 | { | ||
909 | 24 | for $w at $pos in dml:collection($coll) | ||
910 | 25 | return | ||
911 | 26 | { | ||
912 | 27 | local:test-sequential($pos); | ||
913 | 28 | $w | ||
914 | 29 | } | ||
915 | 30 | } | ||
916 | 0 | \ No newline at end of file | 31 | \ No newline at end of file |
917 | 1 | 32 | ||
918 | === added file 'test/rbkt/Queries/zorba/flwor/flwor27.xq' | |||
919 | --- test/rbkt/Queries/zorba/flwor/flwor27.xq 1970-01-01 00:00:00 +0000 | |||
920 | +++ test/rbkt/Queries/zorba/flwor/flwor27.xq 2013-08-16 07:08:59 +0000 | |||
921 | @@ -0,0 +1,30 @@ | |||
922 | 1 | import module namespace parse-xml = "http://zorba.io/modules/xml"; | ||
923 | 2 | import schema namespace opt = "http://zorba.io/modules/xml-options"; | ||
924 | 3 | import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch"; | ||
925 | 4 | |||
926 | 5 | declare namespace an = "http://zorba.io/annotations"; | ||
927 | 6 | declare namespace ext = "http://zorba.io/extensions"; | ||
928 | 7 | |||
929 | 8 | declare %an:sequential function local:test-sequential($pos) | ||
930 | 9 | { | ||
931 | 10 | |||
932 | 11 | }; | ||
933 | 12 | |||
934 | 13 | variable $xmlcontents := fetch:content("$RBKT_SRC_DIR/Queries/zorba/flwor/flwor24.xml"); | ||
935 | 14 | |||
936 | 15 | variable $contents := parse-xml:parse( | ||
937 | 16 | $xmlcontents, | ||
938 | 17 | <opt:options> | ||
939 | 18 | <opt:parse-external-parsed-entity opt:skip-root-nodes="1" /> | ||
940 | 19 | </opt:options>); | ||
941 | 20 | |||
942 | 21 | (# ext:no-materialization #) | ||
943 | 22 | { | ||
944 | 23 | for $w at $pos in $contents | ||
945 | 24 | order by local-name($w) descending | ||
946 | 25 | return | ||
947 | 26 | { | ||
948 | 27 | local:test-sequential($pos); | ||
949 | 28 | $w | ||
950 | 29 | } | ||
951 | 30 | } | ||
952 | 0 | \ No newline at end of file | 31 | \ No newline at end of file |
953 | 1 | 32 | ||
954 | === added file 'test/rbkt/Queries/zorba/flwor/flwor28.xq' | |||
955 | --- test/rbkt/Queries/zorba/flwor/flwor28.xq 1970-01-01 00:00:00 +0000 | |||
956 | +++ test/rbkt/Queries/zorba/flwor/flwor28.xq 2013-08-16 07:08:59 +0000 | |||
957 | @@ -0,0 +1,29 @@ | |||
958 | 1 | import module namespace parse-xml = "http://zorba.io/modules/xml"; | ||
959 | 2 | import schema namespace opt = "http://zorba.io/modules/xml-options"; | ||
960 | 3 | import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch"; | ||
961 | 4 | import module namespace ddl = "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl"; | ||
962 | 5 | import module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml"; | ||
963 | 6 | |||
964 | 7 | declare namespace an = "http://zorba.io/annotations"; | ||
965 | 8 | declare namespace ext = "http://zorba.io/extensions"; | ||
966 | 9 | |||
967 | 10 | declare variable $coll := xs:QName("ddl:coll1"); | ||
968 | 11 | |||
969 | 12 | declare %an:sequential function local:test-sequential($pos) | ||
970 | 13 | { | ||
971 | 14 | |||
972 | 15 | }; | ||
973 | 16 | |||
974 | 17 | ddl:create($coll); | ||
975 | 18 | dml:insert-nodes-last($coll, (<a/>,<c/>,<b/>)); | ||
976 | 19 | |||
977 | 20 | (# ext:no-materialization #) | ||
978 | 21 | { | ||
979 | 22 | for $w at $pos in dml:collection($coll) | ||
980 | 23 | order by local-name($w) descending | ||
981 | 24 | return | ||
982 | 25 | { | ||
983 | 26 | local:test-sequential($pos); | ||
984 | 27 | $w | ||
985 | 28 | } | ||
986 | 29 | } | ||
987 | 0 | \ No newline at end of file | 30 | \ No newline at end of file |
988 | 1 | 31 | ||
989 | === added file 'test/rbkt/Queries/zorba/scripting/flwor2.spec' | |||
990 | --- test/rbkt/Queries/zorba/scripting/flwor2.spec 1970-01-01 00:00:00 +0000 | |||
991 | +++ test/rbkt/Queries/zorba/scripting/flwor2.spec 2013-08-16 07:08:59 +0000 | |||
992 | @@ -0,0 +1,1 @@ | |||
993 | 1 | Error: http://www.zorba-xquery.com/errors:ZDDY0037 |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ bug-1026250- 2012-12- 05T01-32- 06.304Z/ log.html
Log at: http://