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
=== modified file 'ChangeLog'
--- ChangeLog 2012-03-26 02:37:23 +0000
+++ ChangeLog 2012-03-26 15:31:22 +0000
@@ -1,8 +1,19 @@
1Zorba - The XQuery Processor1Zorba - The XQuery Processor
22
3version 2.53version 2.5
4
5New Features:
6
7Optimization:
8
9Bug Fixes/Other Changes
4 * Fixed bug in window iterator10 * Fixed bug in window iterator
11<<<<<<< TREE
5 * Fixed bug #872234 (prevent a rewritting to take place in case of sequential expr)12 * Fixed bug #872234 (prevent a rewritting to take place in case of sequential expr)
13=======
14 * Fixed bug 955170 (Catch clause with URILiteral-based wilcard NameTest)
15 * Fixed bug 955135 (err:XQDY0044 not caught by try-catch expressions)
16>>>>>>> MERGE-SOURCE
617
7 18
8version 2.219version 2.2
@@ -46,11 +57,11 @@
46 of the annotations map in expressions.57 of the annotations map in expressions.
4758
48Bug Fixes/Other Changes:59Bug Fixes/Other Changes:
49 * Fixed bug #923015 (clone() not implemented for full-text expressions)60 * Fixed bug 923015 (clone() not implemented for full-text expressions)
50 * Fixed bug #917923 (bug in copying outer var values into the eval dynamic context)61 * Fixed bug 917923 (bug in copying outer var values into the eval dynamic context)
51 * Fixed bug #867509 (Can not handle largest xs:unsignedLong values)62 * Fixed bug 867509 (Can not handle largest xs:unsignedLong values)
52 * Fixed bug #924063 (sentence is incorrectly incremented when token characters end without sentence terminator)63 * Fixed bug 924063 (sentence is incorrectly incremented when token characters end without sentence terminator)
53 * Fixed bug #909126 (bug in cloning of var_expr)64 * Fixed bug 909126 (bug in cloning of var_expr)
54 * Fixed bug in destruction of exit_catcher_expr65 * Fixed bug in destruction of exit_catcher_expr
55 * Fixed bug #867024 (error messages)66 * Fixed bug #867024 (error messages)
56 * Fixed bug #957580 (stream read failure in StringToCodepointsIteartor)67 * Fixed bug #957580 (stream read failure in StringToCodepointsIteartor)
5768
=== modified file 'bin/debugger/main.cpp'
--- bin/debugger/main.cpp 2012-03-23 17:32:07 +0000
+++ bin/debugger/main.cpp 2012-03-26 15:31:22 +0000
@@ -18,6 +18,8 @@
18# include <windows.h>18# include <windows.h>
19# include <string.h>19# include <string.h>
20# include <strsafe.h>20# include <strsafe.h>
21#else
22#include <unistd.h>
21#endif23#endif
2224
23#include <vector>25#include <vector>
2426
=== modified file 'bin/debugger/process_listener.cpp'
--- bin/debugger/process_listener.cpp 2012-03-23 17:32:07 +0000
+++ bin/debugger/process_listener.cpp 2012-03-26 15:31:22 +0000
@@ -18,6 +18,10 @@
1818
19#include <iostream>19#include <iostream>
2020
21#ifndef WIN32
22#include <unistd.h>
23#endif
24
21#ifdef ZORBA_HAVE_PTHREAD_H25#ifdef ZORBA_HAVE_PTHREAD_H
22# include <cassert>26# include <cassert>
23#endif27#endif
2428
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp 2012-03-23 17:32:07 +0000
+++ src/compiler/translator/translator.cpp 2012-03-26 15:31: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-03-23 17:32:07 +0000
+++ src/runtime/core/constructors.cpp 2012-03-26 15:31:22 +0000
@@ -543,22 +543,22 @@
543 BinaryBaseIterator<AttributeIterator, PlanIteratorState>(sctx, loc, qnameIte, valueIte),543 BinaryBaseIterator<AttributeIterator, PlanIteratorState>(sctx, loc, qnameIte, valueIte),
544 theQName(qname),544 theQName(qname),
545 theIsId(false),545 theIsId(false),
546 theIsRoot(isRoot)546 theIsRoot(isRoot),
547 theRaiseXQDY0074(false),
548 theRaiseXQDY0044(false)
547{549{
548 if (theQName != NULL)550 if (theQName)
549 {551 {
550 if (theQName->getLocalName().empty())552 if (theQName->getLocalName().empty())
551 {553 {
552 RAISE_ERROR(err::XQDY0074, loc,554 theRaiseXQDY0074 = true;
553 ERROR_PARAMS("", ZED(NoEmptyLocalname)));
554 }555 }
555556
556 if (ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/") ||557 if (ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/") ||
557 (theQName->getNamespace().empty() &&558 (theQName->getNamespace().empty() &&
558 ZSTREQ(theQName->getLocalName(), "xmlns")))559 ZSTREQ(theQName->getLocalName(), "xmlns")))
559 {560 {
560 RAISE_ERROR(err::XQDY0044, loc,561 theRaiseXQDY0044 = true;
561 ERROR_PARAMS(theQName->getStringValue()));
562 }562 }
563563
564 if ((ZSTREQ(theQName->getNamespace(), "http://www.w3.org/XML/1998/namespace") &&564 if ((ZSTREQ(theQName->getNamespace(), "http://www.w3.org/XML/1998/namespace") &&
@@ -567,8 +567,7 @@
567 (ZSTREQ(theQName->getPrefix(), "xml") &&567 (ZSTREQ(theQName->getPrefix(), "xml") &&
568 !ZSTREQ(theQName->getNamespace(), "http://www.w3.org/XML/1998/namespace")))568 !ZSTREQ(theQName->getNamespace(), "http://www.w3.org/XML/1998/namespace")))
569 {569 {
570 RAISE_ERROR(err::XQDY0044, loc,570 theRaiseXQDY0044 = true;
571 ERROR_PARAMS(theQName->getStringValue()));
572 }571 }
573572
574 if ((ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/") &&573 if ((ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/") &&
@@ -577,11 +576,7 @@
577 (ZSTREQ(theQName->getPrefix(), "xmlns") &&576 (ZSTREQ(theQName->getPrefix(), "xmlns") &&
578 !ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/")))577 !ZSTREQ(theQName->getNamespace(), "http://www.w3.org/2000/xmlns/")))
579 {578 {
580 throw XQUERY_EXCEPTION(579 theRaiseXQDY0044 = true;
581 err::XQDY0044,
582 ERROR_PARAMS( theQName->getStringValue() ),
583 ERROR_LOC( loc )
584 );
585 }580 }
586581
587 if (ZSTREQ(theQName->getPrefix(), "xml") &&582 if (ZSTREQ(theQName->getPrefix(), "xml") &&
@@ -599,6 +594,8 @@
599 ar & theQName;594 ar & theQName;
600 ar & theIsId;595 ar & theIsId;
601 ar & theIsRoot;596 ar & theIsRoot;
597 ar & theRaiseXQDY0074;
598 ar & theRaiseXQDY0044;
602}599}
603600
604601
@@ -616,6 +613,24 @@
616 PlanIteratorState* state;613 PlanIteratorState* state;
617 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);614 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
618615
616 if (theQName != NULL)
617 {
618 // need to raise those errors here and not in the constructor
619 // because they are dynamic errors and might be caught by try-catch
620 // (bug 955135)
621 if (theRaiseXQDY0074)
622 {
623 RAISE_ERROR(err::XQDY0074, loc,
624 ERROR_PARAMS("", ZED(NoEmptyLocalname)));
625 }
626
627 if (theRaiseXQDY0044)
628 {
629 RAISE_ERROR(err::XQDY0044, loc,
630 ERROR_PARAMS(theQName->getStringValue()));
631 }
632 }
633
619 if (theChild0 != NULL)634 if (theChild0 != NULL)
620 {635 {
621 // Compute the attribute name. Note: we don't have to check that itemQName636 // Compute the attribute name. Note: we don't have to check that itemQName
622637
=== modified file 'src/runtime/core/constructors.h'
--- src/runtime/core/constructors.h 2012-03-23 17:32:07 +0000
+++ src/runtime/core/constructors.h 2012-03-26 15:31: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-03-26 15:31: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-03-26 15:31: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-03-26 15:31: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-03-26 15:31: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