Merge lp:~zorba-coders/zorba/bug-955135 into lp:zorba

Proposed by Matthias Brantner
Status: Superseded
Proposed branch: lp:~zorba-coders/zorba/bug-955135
Merge into: lp:zorba
Diff against target: 233 lines (+73/-26) (has conflicts)
10 files modified
ChangeLog (+16/-5)
bin/debugger/main.cpp (+2/-0)
bin/debugger/process_listener.cpp (+4/-0)
src/compiler/translator/translator.cpp (+17/-8)
src/runtime/core/constructors.cpp (+28/-13)
src/runtime/core/constructors.h (+2/-0)
test/rbkt/ExpQueryResults/zorba/trycatch/trycatch12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/trycatch/trycatch13.xml.res (+1/-0)
test/rbkt/Queries/zorba/trycatch/trycatch12.xq (+1/-0)
test/rbkt/Queries/zorba/trycatch/trycatch13.xq (+1/-0)
Text conflict in ChangeLog
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-955135
Reviewer Review Type Date Requested Status
Ghislain Fourny Approve
Matthias Brantner Approve
Review via email: mp+97476@code.launchpad.net

This proposal supersedes a proposal from 2012-03-14.

This proposal has been superseded by a proposal from 2012-03-26.

Commit message

fixed bug 955135 (err:XQDY0044 not caught by try-catch expressions)
fixed bug 955170 (Catch clause with URILiteral-based wilcard NameTest)

Description of the change

fixed bug 955135 (err:XQDY0044 not caught by try-catch expressions)
fixed bug 955170 (Catch clause with URILiteral-based wilcard NameTest)

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 :

The attempt to merge lp:~zorba-coders/zorba/bug-955135 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug-955135-2012-03-14T18-00-12.523Z is finished. The
  final status was:

  455 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

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

The attempt to merge lp:~zorba-coders/zorba/bug-955135 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug-955135-2012-03-14T18-58-04.285Z is finished. The
  final status was:

  447 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

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 bug-955135-2012-03-14T20-36-07.983Z 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
Ghislain Fourny (gislenius) :
review: Approve
lp:~zorba-coders/zorba/bug-955135 updated
10725. By Matthias Brantner

merge with trunk

10726. By Ghislain Fourny

Merged trunk back.

10727. By Ghislain Fourny

Extraneous merge line.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-03-26 02:37:23 +0000
3+++ ChangeLog 2012-03-26 15:31:22 +0000
4@@ -1,8 +1,19 @@
5 Zorba - The XQuery Processor
6
7 version 2.5
8+
9+New Features:
10+
11+Optimization:
12+
13+Bug Fixes/Other Changes
14 * Fixed bug in window iterator
15+<<<<<<< TREE
16 * Fixed bug #872234 (prevent a rewritting to take place in case of sequential expr)
17+=======
18+ * Fixed bug 955170 (Catch clause with URILiteral-based wilcard NameTest)
19+ * Fixed bug 955135 (err:XQDY0044 not caught by try-catch expressions)
20+>>>>>>> MERGE-SOURCE
21
22
23 version 2.2
24@@ -46,11 +57,11 @@
25 of the annotations map in expressions.
26
27 Bug Fixes/Other Changes:
28- * Fixed bug #923015 (clone() not implemented for full-text expressions)
29- * Fixed bug #917923 (bug in copying outer var values into the eval dynamic context)
30- * Fixed bug #867509 (Can not handle largest xs:unsignedLong values)
31- * Fixed bug #924063 (sentence is incorrectly incremented when token characters end without sentence terminator)
32- * Fixed bug #909126 (bug in cloning of var_expr)
33+ * Fixed bug 923015 (clone() not implemented for full-text expressions)
34+ * Fixed bug 917923 (bug in copying outer var values into the eval dynamic context)
35+ * Fixed bug 867509 (Can not handle largest xs:unsignedLong values)
36+ * Fixed bug 924063 (sentence is incorrectly incremented when token characters end without sentence terminator)
37+ * Fixed bug 909126 (bug in cloning of var_expr)
38 * Fixed bug in destruction of exit_catcher_expr
39 * Fixed bug #867024 (error messages)
40 * Fixed bug #957580 (stream read failure in StringToCodepointsIteartor)
41
42=== modified file 'bin/debugger/main.cpp'
43--- bin/debugger/main.cpp 2012-03-23 17:32:07 +0000
44+++ bin/debugger/main.cpp 2012-03-26 15:31:22 +0000
45@@ -18,6 +18,8 @@
46 # include <windows.h>
47 # include <string.h>
48 # include <strsafe.h>
49+#else
50+#include <unistd.h>
51 #endif
52
53 #include <vector>
54
55=== modified file 'bin/debugger/process_listener.cpp'
56--- bin/debugger/process_listener.cpp 2012-03-23 17:32:07 +0000
57+++ bin/debugger/process_listener.cpp 2012-03-26 15:31:22 +0000
58@@ -18,6 +18,10 @@
59
60 #include <iostream>
61
62+#ifndef WIN32
63+#include <unistd.h>
64+#endif
65+
66 #ifdef ZORBA_HAVE_PTHREAD_H
67 # include <cassert>
68 #endif
69
70=== modified file 'src/compiler/translator/translator.cpp'
71--- src/compiler/translator/translator.cpp 2012-03-23 17:32:07 +0000
72+++ src/compiler/translator/translator.cpp 2012-03-26 15:31:22 +0000
73@@ -9044,16 +9044,25 @@
74 case ParseConstants::wild_all:
75 cc->add_nametest_h(new NodeNameTest(zstring(), zstring()));
76 break;
77- case ParseConstants::wild_elem: {
78+ case ParseConstants::wild_elem:
79+ {
80 // bugfix #3138633; expand the qname and use the namespace instead of the prefix
81 zstring localname(":wildcard");
82- store::Item_t qnItem;
83- theSctx->expand_qname(qnItem,
84- theSctx->default_elem_type_ns(),
85- wildcard->getNsOrPrefix(),
86- localname,
87- wildcard->get_location());
88- cc->add_nametest_h(new NodeNameTest(qnItem->getNamespace(), zstring()));
89+
90+ if (wildcard->isEQnameMatch())
91+ {
92+ cc->add_nametest_h(new NodeNameTest(wildcard->getNsOrPrefix(), zstring()));
93+ }
94+ else
95+ {
96+ store::Item_t qnItem;
97+ theSctx->expand_qname(qnItem,
98+ theSctx->default_elem_type_ns(),
99+ wildcard->getNsOrPrefix(),
100+ localname,
101+ wildcard->get_location());
102+ cc->add_nametest_h(new NodeNameTest(qnItem->getNamespace(), zstring()));
103+ }
104 break;
105 }
106 case ParseConstants::wild_prefix:
107
108=== modified file 'src/runtime/core/constructors.cpp'
109--- src/runtime/core/constructors.cpp 2012-03-23 17:32:07 +0000
110+++ src/runtime/core/constructors.cpp 2012-03-26 15:31:22 +0000
111@@ -543,22 +543,22 @@
112 BinaryBaseIterator<AttributeIterator, PlanIteratorState>(sctx, loc, qnameIte, valueIte),
113 theQName(qname),
114 theIsId(false),
115- theIsRoot(isRoot)
116+ theIsRoot(isRoot),
117+ theRaiseXQDY0074(false),
118+ theRaiseXQDY0044(false)
119 {
120- if (theQName != NULL)
121+ if (theQName)
122 {
123 if (theQName->getLocalName().empty())
124 {
125- RAISE_ERROR(err::XQDY0074, loc,
126- ERROR_PARAMS("", ZED(NoEmptyLocalname)));
127+ theRaiseXQDY0074 = true;
128 }
129
130 if (ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/") ||
131 (theQName->getNamespace().empty() &&
132 ZSTREQ(theQName->getLocalName(), "xmlns")))
133 {
134- RAISE_ERROR(err::XQDY0044, loc,
135- ERROR_PARAMS(theQName->getStringValue()));
136+ theRaiseXQDY0044 = true;
137 }
138
139 if ((ZSTREQ(theQName->getNamespace(), "http://www.w3.org/XML/1998/namespace") &&
140@@ -567,8 +567,7 @@
141 (ZSTREQ(theQName->getPrefix(), "xml") &&
142 !ZSTREQ(theQName->getNamespace(), "http://www.w3.org/XML/1998/namespace")))
143 {
144- RAISE_ERROR(err::XQDY0044, loc,
145- ERROR_PARAMS(theQName->getStringValue()));
146+ theRaiseXQDY0044 = true;
147 }
148
149 if ((ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/") &&
150@@ -577,11 +576,7 @@
151 (ZSTREQ(theQName->getPrefix(), "xmlns") &&
152 !ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/")))
153 {
154- throw XQUERY_EXCEPTION(
155- err::XQDY0044,
156- ERROR_PARAMS( theQName->getStringValue() ),
157- ERROR_LOC( loc )
158- );
159+ theRaiseXQDY0044 = true;
160 }
161
162 if (ZSTREQ(theQName->getPrefix(), "xml") &&
163@@ -599,6 +594,8 @@
164 ar & theQName;
165 ar & theIsId;
166 ar & theIsRoot;
167+ ar & theRaiseXQDY0074;
168+ ar & theRaiseXQDY0044;
169 }
170
171
172@@ -616,6 +613,24 @@
173 PlanIteratorState* state;
174 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
175
176+ if (theQName != NULL)
177+ {
178+ // need to raise those errors here and not in the constructor
179+ // because they are dynamic errors and might be caught by try-catch
180+ // (bug 955135)
181+ if (theRaiseXQDY0074)
182+ {
183+ RAISE_ERROR(err::XQDY0074, loc,
184+ ERROR_PARAMS("", ZED(NoEmptyLocalname)));
185+ }
186+
187+ if (theRaiseXQDY0044)
188+ {
189+ RAISE_ERROR(err::XQDY0044, loc,
190+ ERROR_PARAMS(theQName->getStringValue()));
191+ }
192+ }
193+
194 if (theChild0 != NULL)
195 {
196 // Compute the attribute name. Note: we don't have to check that itemQName
197
198=== modified file 'src/runtime/core/constructors.h'
199--- src/runtime/core/constructors.h 2012-03-23 17:32:07 +0000
200+++ src/runtime/core/constructors.h 2012-03-26 15:31:22 +0000
201@@ -170,6 +170,8 @@
202 store::Item_t theQName;
203 bool theIsId;
204 bool theIsRoot;
205+ bool theRaiseXQDY0074;
206+ bool theRaiseXQDY0044;
207
208 public:
209 SERIALIZABLE_CLASS(AttributeIterator);
210
211=== added file 'test/rbkt/ExpQueryResults/zorba/trycatch/trycatch12.xml.res'
212--- test/rbkt/ExpQueryResults/zorba/trycatch/trycatch12.xml.res 1970-01-01 00:00:00 +0000
213+++ test/rbkt/ExpQueryResults/zorba/trycatch/trycatch12.xml.res 2012-03-26 15:31:22 +0000
214@@ -0,0 +1,1 @@
215+Invalid attribute.
216
217=== added file 'test/rbkt/ExpQueryResults/zorba/trycatch/trycatch13.xml.res'
218--- test/rbkt/ExpQueryResults/zorba/trycatch/trycatch13.xml.res 1970-01-01 00:00:00 +0000
219+++ test/rbkt/ExpQueryResults/zorba/trycatch/trycatch13.xml.res 2012-03-26 15:31:22 +0000
220@@ -0,0 +1,1 @@
221+Message
222
223=== added file 'test/rbkt/Queries/zorba/trycatch/trycatch12.xq'
224--- test/rbkt/Queries/zorba/trycatch/trycatch12.xq 1970-01-01 00:00:00 +0000
225+++ test/rbkt/Queries/zorba/trycatch/trycatch12.xq 2012-03-26 15:31:22 +0000
226@@ -0,0 +1,1 @@
227+try { attribute xmlns {} } catch *:XQDY0044 { "Invalid attribute." }
228
229=== added file 'test/rbkt/Queries/zorba/trycatch/trycatch13.xq'
230--- test/rbkt/Queries/zorba/trycatch/trycatch13.xq 1970-01-01 00:00:00 +0000
231+++ test/rbkt/Queries/zorba/trycatch/trycatch13.xq 2012-03-26 15:31:22 +0000
232@@ -0,0 +1,1 @@
233+try { 1 div 0 } catch "http://www.w3.org/2005/xqt-errors":* { "Message"}

Subscribers

People subscribed via source and target branches