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

Proposed by Matthias Brantner
Status: Merged
Approved by: Matthias Brantner
Approved revision: 10727
Merged at revision: 10752
Proposed branch: lp:~zorba-coders/zorba/bug-955135
Merge into: lp:zorba
Diff against target: 197 lines (+60/-26)
8 files modified
ChangeLog (+9/-5)
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)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-955135
Reviewer Review Type Date Requested Status
Till Westmann Approve
Ghislain Fourny Approve
Matthias Brantner Approve
Review via email: mp+99354@code.launchpad.net

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

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) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Ghislain Fourny (gislenius) :
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 bug-955135-2012-04-10T16-09-12.965Z 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: 2 Approve, 1 Pending.

Revision history for this message
Till Westmann (tillw) :
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 bug-955135-2012-04-11T06-30-00.884Z 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
=== modified file 'ChangeLog'
--- ChangeLog 2012-04-04 15:59:01 +0000
+++ ChangeLog 2012-04-10 15:46:22 +0000
@@ -5,7 +5,11 @@
5New Features:5New Features:
6 * Extended API for Python, Java, PHP and Ruby.6 * Extended API for Python, Java, PHP and Ruby.
77
8Optimization:
9
8Bug Fixes/Other Changes:10Bug Fixes/Other Changes:
11 * Fixed bug 955170 (Catch clause with URILiteral-based wilcard NameTest)
12 * Fixed bug 955135 (err:XQDY0044 not caught by try-catch expressions)
9 * Fixed bug #967864 (var substitution did not update theFreeVars property)13 * Fixed bug #967864 (var substitution did not update theFreeVars property)
10 * Fixed bug in window iterator (binding the end vars in the output tuple stream)14 * Fixed bug in window iterator (binding the end vars in the output tuple stream)
11 * Fixed bug #866547 (protect index-join rule from general flwor)15 * Fixed bug #866547 (protect index-join rule from general flwor)
@@ -57,11 +61,11 @@
57 of the annotations map in expressions.61 of the annotations map in expressions.
5862
59Bug Fixes/Other Changes:63Bug Fixes/Other Changes:
60 * Fixed bug #923015 (clone() not implemented for full-text expressions)64 * Fixed bug 923015 (clone() not implemented for full-text expressions)
61 * Fixed bug #917923 (bug in copying outer var values into the eval dynamic context)65 * Fixed bug 917923 (bug in copying outer var values into the eval dynamic context)
62 * Fixed bug #867509 (Can not handle largest xs:unsignedLong values)66 * Fixed bug 867509 (Can not handle largest xs:unsignedLong values)
63 * Fixed bug #924063 (sentence is incorrectly incremented when token characters end without sentence terminator)67 * Fixed bug 924063 (sentence is incorrectly incremented when token characters end without sentence terminator)
64 * Fixed bug #909126 (bug in cloning of var_expr)68 * Fixed bug 909126 (bug in cloning of var_expr)
65 * Fixed bug in destruction of exit_catcher_expr69 * Fixed bug in destruction of exit_catcher_expr
66 * Fixed bug #867024 (error messages)70 * Fixed bug #867024 (error messages)
67 * Fixed bug #957580 (stream read failure in StringToCodepointsIteartor)71 * Fixed bug #957580 (stream read failure in StringToCodepointsIteartor)
6872
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp 2012-03-28 05:19:57 +0000
+++ src/compiler/translator/translator.cpp 2012-04-10 15:46:22 +0000
@@ -9044,16 +9044,25 @@
9044 case ParseConstants::wild_all:9044 case ParseConstants::wild_all:
9045 cc->add_nametest_h(new NodeNameTest(zstring(), zstring()));9045 cc->add_nametest_h(new NodeNameTest(zstring(), zstring()));
9046 break;9046 break;
9047 case ParseConstants::wild_elem: {9047 case ParseConstants::wild_elem:
9048 {
9048 // bugfix #3138633; expand the qname and use the namespace instead of the prefix9049 // bugfix #3138633; expand the qname and use the namespace instead of the prefix
9049 zstring localname(":wildcard");9050 zstring localname(":wildcard");
9050 store::Item_t qnItem;9051
9051 theSctx->expand_qname(qnItem,9052 if (wildcard->isEQnameMatch())
9052 theSctx->default_elem_type_ns(),9053 {
9053 wildcard->getNsOrPrefix(),9054 cc->add_nametest_h(new NodeNameTest(wildcard->getNsOrPrefix(), zstring()));
9054 localname,9055 }
9055 wildcard->get_location());9056 else
9056 cc->add_nametest_h(new NodeNameTest(qnItem->getNamespace(), zstring()));9057 {
9058 store::Item_t qnItem;
9059 theSctx->expand_qname(qnItem,
9060 theSctx->default_elem_type_ns(),
9061 wildcard->getNsOrPrefix(),
9062 localname,
9063 wildcard->get_location());
9064 cc->add_nametest_h(new NodeNameTest(qnItem->getNamespace(), zstring()));
9065 }
9057 break;9066 break;
9058 }9067 }
9059 case ParseConstants::wild_prefix:9068 case ParseConstants::wild_prefix:
90609069
=== modified file 'src/runtime/core/constructors.cpp'
--- src/runtime/core/constructors.cpp 2012-04-08 21:39:25 +0000
+++ src/runtime/core/constructors.cpp 2012-04-10 15:46:22 +0000
@@ -535,22 +535,22 @@
535 BinaryBaseIterator<AttributeIterator, PlanIteratorState>(sctx, loc, qnameIte, valueIte),535 BinaryBaseIterator<AttributeIterator, PlanIteratorState>(sctx, loc, qnameIte, valueIte),
536 theQName(qname),536 theQName(qname),
537 theIsId(false),537 theIsId(false),
538 theIsRoot(isRoot)538 theIsRoot(isRoot),
539 theRaiseXQDY0074(false),
540 theRaiseXQDY0044(false)
539{541{
540 if (theQName != NULL)542 if (theQName)
541 {543 {
542 if (theQName->getLocalName().empty())544 if (theQName->getLocalName().empty())
543 {545 {
544 RAISE_ERROR(err::XQDY0074, loc,546 theRaiseXQDY0074 = true;
545 ERROR_PARAMS("", ZED(NoEmptyLocalname)));
546 }547 }
547548
548 if (ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/") ||549 if (ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/") ||
549 (theQName->getNamespace().empty() &&550 (theQName->getNamespace().empty() &&
550 ZSTREQ(theQName->getLocalName(), "xmlns")))551 ZSTREQ(theQName->getLocalName(), "xmlns")))
551 {552 {
552 RAISE_ERROR(err::XQDY0044, loc,553 theRaiseXQDY0044 = true;
553 ERROR_PARAMS(theQName->getStringValue()));
554 }554 }
555555
556 if ((ZSTREQ(theQName->getNamespace(), "http://www.w3.org/XML/1998/namespace") &&556 if ((ZSTREQ(theQName->getNamespace(), "http://www.w3.org/XML/1998/namespace") &&
@@ -559,8 +559,7 @@
559 (ZSTREQ(theQName->getPrefix(), "xml") &&559 (ZSTREQ(theQName->getPrefix(), "xml") &&
560 !ZSTREQ(theQName->getNamespace(), "http://www.w3.org/XML/1998/namespace")))560 !ZSTREQ(theQName->getNamespace(), "http://www.w3.org/XML/1998/namespace")))
561 {561 {
562 RAISE_ERROR(err::XQDY0044, loc,562 theRaiseXQDY0044 = true;
563 ERROR_PARAMS(theQName->getStringValue()));
564 }563 }
565564
566 if ((ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/") &&565 if ((ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/") &&
@@ -569,11 +568,7 @@
569 (ZSTREQ(theQName->getPrefix(), "xmlns") &&568 (ZSTREQ(theQName->getPrefix(), "xmlns") &&
570 !ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/")))569 !ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/")))
571 {570 {
572 throw XQUERY_EXCEPTION(571 theRaiseXQDY0044 = true;
573 err::XQDY0044,
574 ERROR_PARAMS( theQName->getStringValue() ),
575 ERROR_LOC( loc )
576 );
577 }572 }
578573
579 if (ZSTREQ(theQName->getPrefix(), "xml") &&574 if (ZSTREQ(theQName->getPrefix(), "xml") &&
@@ -591,6 +586,8 @@
591 ar & theQName;586 ar & theQName;
592 ar & theIsId;587 ar & theIsId;
593 ar & theIsRoot;588 ar & theIsRoot;
589 ar & theRaiseXQDY0074;
590 ar & theRaiseXQDY0044;
594}591}
595592
596593
@@ -608,6 +605,24 @@
608 PlanIteratorState* state;605 PlanIteratorState* state;
609 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);606 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
610607
608 if (theQName != NULL)
609 {
610 // need to raise those errors here and not in the constructor
611 // because they are dynamic errors and might be caught by try-catch
612 // (bug 955135)
613 if (theRaiseXQDY0074)
614 {
615 RAISE_ERROR(err::XQDY0074, loc,
616 ERROR_PARAMS("", ZED(NoEmptyLocalname)));
617 }
618
619 if (theRaiseXQDY0044)
620 {
621 RAISE_ERROR(err::XQDY0044, loc,
622 ERROR_PARAMS(theQName->getStringValue()));
623 }
624 }
625
611 if (theChild0 != NULL)626 if (theChild0 != NULL)
612 {627 {
613 // Compute the attribute name. Note: we don't have to check that itemQName628 // Compute the attribute name. Note: we don't have to check that itemQName
614629
=== modified file 'src/runtime/core/constructors.h'
--- src/runtime/core/constructors.h 2012-03-28 05:19:57 +0000
+++ src/runtime/core/constructors.h 2012-04-10 15:46:22 +0000
@@ -170,6 +170,8 @@
170 store::Item_t theQName;170 store::Item_t theQName;
171 bool theIsId;171 bool theIsId;
172 bool theIsRoot;172 bool theIsRoot;
173 bool theRaiseXQDY0074;
174 bool theRaiseXQDY0044;
173175
174public:176public:
175 SERIALIZABLE_CLASS(AttributeIterator);177 SERIALIZABLE_CLASS(AttributeIterator);
176178
=== added file 'test/rbkt/ExpQueryResults/zorba/trycatch/trycatch12.xml.res'
--- test/rbkt/ExpQueryResults/zorba/trycatch/trycatch12.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/trycatch/trycatch12.xml.res 2012-04-10 15:46:22 +0000
@@ -0,0 +1,1 @@
1Invalid attribute.
02
=== added file 'test/rbkt/ExpQueryResults/zorba/trycatch/trycatch13.xml.res'
--- test/rbkt/ExpQueryResults/zorba/trycatch/trycatch13.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/trycatch/trycatch13.xml.res 2012-04-10 15:46:22 +0000
@@ -0,0 +1,1 @@
1Message
02
=== added file 'test/rbkt/Queries/zorba/trycatch/trycatch12.xq'
--- test/rbkt/Queries/zorba/trycatch/trycatch12.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/trycatch/trycatch12.xq 2012-04-10 15:46:22 +0000
@@ -0,0 +1,1 @@
1try { attribute xmlns {} } catch *:XQDY0044 { "Invalid attribute." }
02
=== added file 'test/rbkt/Queries/zorba/trycatch/trycatch13.xq'
--- test/rbkt/Queries/zorba/trycatch/trycatch13.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/trycatch/trycatch13.xq 2012-04-10 15:46:22 +0000
@@ -0,0 +1,1 @@
1try { 1 div 0 } catch "http://www.w3.org/2005/xqt-errors":* { "Message"}

Subscribers

People subscribed via source and target branches