Merge lp:~matthias-brantner/zorba/bug-fixing into lp:zorba

Proposed by Matthias Brantner
Status: Superseded
Proposed branch: lp:~matthias-brantner/zorba/bug-fixing
Merge into: lp:zorba
Diff against target: 159 lines (+58/-11)
5 files modified
src/compiler/translator/translator.cpp (+16/-2)
src/diagnostics/diagnostic_en.xml (+1/-1)
src/diagnostics/pregenerated/dict_en.cpp (+1/-1)
src/runtime/indexing/index_ddl.cpp (+24/-4)
src/runtime/store/maps_impl.cpp (+16/-3)
To merge this branch: bzr merge lp:~matthias-brantner/zorba/bug-fixing
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Markos Zaharioudakis Pending
Review via email: mp+80114@code.launchpad.net

This proposal has been superseded by a proposal from 2011-10-26.

Commit message

improved error message for index and map related probe operations

Description of the change

improved error message

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

Validation queue job bug-fixing-2011-10-21T23-03-13.511Z 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. Got: 1 Approve, 1 Pending.

10523. By Markos Zaharioudakis

Groupby optimization: If possible, use directly the store Item::equals method to compare groupby tuples. Approved: Markos Zaharioudakis, Matthias Brantner

10524. By Sorin Marian Nasoi

Fixed the bug #872732 according to the:
- W3C spec: http://www.w3.org/TR/xpath-functions-30/#func-namespace-uri-for-prefix
- W3C decision from : http://www.w3.org/Bugs/Public/show_bug.cgi?id=11590

Marked the test
test/rbkt/w3c_testsuite/XQuery/Functions/QNameFunc/NamespaceURIForPrefixFunc/K2-NamespaceURIForPrefixFunc-2
as expected failure in the:
- test/rbkt/Queries/CMakeLists.txt
- test/rbkt/Queries/w3c_known_failures.txt
because the RQ uses XQTS_1_0_3, where the expected result for this test is wrong. Approved: Matthias Brantner, Markos Zaharioudakis

10525. By Chris Hillery

Work around CMake limitation to ensure that Ruby .so has correct RPATH. Approved: Matthias Brantner, Chris Hillery

10526. By Federico Cavalieri

Fixed creation of Zorba type GMONTH from type definition Approved: Federico Cavalieri, Markos Zaharioudakis

10527. By Matthias Brantner

improved error message if the index/map function is invoked with the wrong number of parameters Approved: Matthias Brantner, Till Westmann

10528. By Rodolfo Ochoa

Item Factory class added for SWIG API, many methods included. Approved: Cezar Andrei, Rodolfo Ochoa

10529. By Markos Zaharioudakis

moved base uri and doc uri from the XmlTree to the DocumentNode Approved: Matthias Brantner, Markos Zaharioudakis

10530. By Markos Zaharioudakis

simplified and optimized the implementation for annotations Approved: Matthias Brantner, Markos Zaharioudakis

10531. By Markos Zaharioudakis

1. Big reorg of the code for general indexes:
1.1 Unified code for creating hash- and tree-based index
1.2 Unified code among different kinds of probe functions
1.3 Improved performance by taking advantage of the fact the general indexes cannot have more than one key expression.
2. Updated/fixed the documentation in the xqddf spec and the indexes/dml.xq file.
3. Put a restriction on the use of the uniqueness property: a general, untyped index cannot be unique. Approved: Matthias Brantner, Markos Zaharioudakis

10532. By Sorin Marian Nasoi

Added testdriver_mt as a option for generating the w3c_testsuite results for W3C.
Also the tests are sorted by name in the XML conformance results in order to make the diffs more readable. Approved: Sorin Marian Nasoi, Chris Hillery

10533. By Sorin Marian Nasoi

Fix for bug lp:872502:
- in the case where library modules were using external C++ library dependencies (like it was the case with the reported Json module) the XQDoc XML generated by Zorba was not valid according to the XQDoc schema: this was fixed.
- also the XQDoc2XHTML generator was updated to reflect this change
- added 2 tests but I used a module part of the Zorba core (http://www.zorba-xquery.com/modules/http-client) that has an external C++ library dependency on Curl Approved: Matthias Brantner, Sorin Marian Nasoi

10534. By Cezar Andrei <email address hidden>

Add zperf query scripts to be compile-checked. Reproposal. Approved: Cezar Andrei, Chris Hillery

10535. By Federico Cavalieri

New module node-structural-information.
This module allows to retrieve an xs:anyURI representation of a
node position. This module also defines function that determine:
(1) the relationship between two nodes (e.g. if one is the ancestor
of another) and (2) properties of a node (e.g. its level in the tree)
given the corresponding nodes positions. Approved: Markos Zaharioudakis, Matthias Brantner

10536. By Chris Hillery

Replace ZORBA_MODULES_INSTALL_DIR with four different paths: core and non-core versions of URI and Library paths. URI path is used for resolving URIs; Library path is used for loading platform-dependent code such as shared libraries. Added --uri-path and --lib-path args to zorbacmd. --module-path is vaguely deprecated and is implemented to set both URI and lib paths. Approved: Matthias Brantner, Chris Hillery

10537. By Paul J. Lucas

Added hack fix is to make it move(T const&) and insert a const_cast. This is ugly because it shouldn't move a const T, but since this is a fake move() anyway, it probably doesn't matter. Approved: Matthias Brantner, Paul J. Lucas

10538. By Markos Zaharioudakis

trying to fix Windows compilation problem Approved: Markos Zaharioudakis

10539. By Markos Zaharioudakis

fixed a wrong assertion in annotations.cpp Approved: Markos Zaharioudakis

10540. By Sorin Marian Nasoi

Fix for bug lp:882002:
- changed the error thrown for W3C test fn-collection-2 according to the decision took by the W3C in http://www.w3.org/Bugs/Public/show_bug.cgi?id=12542 that is reflected in the latest XQuery 3.0 F&O spec for fn:collection: "An error is raised [err:FODC0002] if available collections provides no mapping for the absolutized URI."
- added a new expected result for the RQ because it uses XQTS_1_0_3 where the expected error for this test is [err:FODC0004].
- removed the exception added for fn-collection-2 in the script that generates the conformance results for W3C Approved: Sorin Marian Nasoi, Daniel Turcanu

10541. By Paul J. Lucas

Support for user-provided Thesauri using standard Zorba URI Resolver mechanism. Approved: Paul J. Lucas, Matthias Brantner

10542. By Sorin Marian Nasoi

Fixed bug #867107. Approved: David Graf, Sorin Marian Nasoi

10543. By Markos Zaharioudakis

optimizer optimization:avoid double traversal of the expr tree during MarkProducerNodeProps rule Approved: Markos Zaharioudakis

10544. By Markos Zaharioudakis

modified serializer so that it does not have to go up the tree to get the namespaces of a node. This is needed for the no-node-copy optimization. It is also an optimization for the serializer itself. Approved: Markos Zaharioudakis

10545. By Markos Zaharioudakis

Fixed bug when parsing a document with a base-uri attribute Approved: Markos Zaharioudakis

10546. By Markos Zaharioudakis

C++ API changes:

Implementation of getExternalVariables function

Implementation of isSequential function Approved: Markos Zaharioudakis

10547. By Matthias Brantner

- cleanup
- ChangeLog preparations for 2.1 release
- fix for bug #867133 (SWIG PHP build failure on Mac OSX ). With this fix, the PHP binding for Mac is re-enabled. Approved: William Candillon, Markos Zaharioudakis

10548. By Markos Zaharioudakis

Restored changes made in r10538 and overwritten in r10541. Approved: Markos Zaharioudakis

10549. By Matthias Brantner

Following redirects when resolving URLs. Mostly used when importing modules or schemas. Approved: Chris Hillery, Matthias Brantner

10550. By Daniel Turcanu

Fixed bug #872850 about plan serializer crash Approved: David Graf, Matthias Brantner

10551. By Carlos Manuel Lopez

Optimization of the fn:substring function in the case when its $start and $length arguments are integers. Approved: Matthias Brantner, Markos Zaharioudakis

10552. By Paul J. Lucas

Removed warnings. Approved: Matthias Brantner, Paul J. Lucas

10553. By Markos Zaharioudakis

converted variable assignment to a full-blown expression instead of a function + fixed a bug with the cloning of var_decl_expr Approved: Markos Zaharioudakis

10554. By Matthias Brantner

- fixed DynamicLoader memory leak
- StaticContext::getAuditEvent const
- added iterator.h include to zorba.h
- fn:trace should not be constant folded and propagate the return type of its first argument Approved: Markos Zaharioudakis, Matthias Brantner

10555. By Matthias Brantner

- Reorganization of ChangeLog for 2.1 release
- added the xqxq-module to the modules that are downloaded automatically Approved: Chris Hillery, Matthias Brantner

10556. By Matthias Brantner

Allow external functions to be updating. Approved: Markos Zaharioudakis, Juan Zacarias

10557. By Markos Zaharioudakis

fixed a performance bug in the implementation of groupby: no node copying for non-groupby vars Approved: Matthias Brantner, Markos Zaharioudakis

10558. By Sorin Marian Nasoi

Fix for bug #897619. Approved: Markos Zaharioudakis, Sorin Marian Nasoi

10559. By Sorin Marian Nasoi

Fix for bug #897616. Approved: Nicolae Brinza, Sorin Marian Nasoi

10560. By Matthias Brantner

Do not raise warnings for unknown annotations in unknown namespaces Approved: Nicolae Brinza, William Candillon, Matthias Brantner

10561. By Juan Zacarias

API changes
Removed isBoundExternalVariable from xquery.h
Added 2 functions to dynamic_context.h
isBoundContextItem and isBoundExternalVariable Approved: Matthias Brantner, Markos Zaharioudakis

10562. By Daniel Turcanu

fn:analyze-string fix
also, adding config.h include to ensure correct error messages Approved: Chris Hillery, Matthias Brantner

10563. By Matthias Brantner

fix for building modules outside of Zorba Approved: Chris Hillery, Matthias Brantner

10564. By William Candillon

Fix bug #897825 Approved: Rodolfo Ochoa, Matthias Brantner

10565. By Matthias Brantner

Unmarked XQueryX fn-put-005-fail as expected to fail in CMake. Approved: Chris Hillery, Matthias Brantner

10566. By Chris Hillery

Update ExternalModules.conf to download modules tagged 'zorba-2.1'. Approved: Matthias Brantner, Chris Hillery

10567. By Chris Hillery

fix for installing and using modules on windows Approved: Chris Hillery, Matthias Brantner

10568. By Chris Hillery

Separate check_uris into check_core_uris and check_uris. zorbacmd depends on check_core_uris, so non-core modules may depend on zorbacmd and be assured that the Zorba executable is fully functional. Approved: Matthias Brantner, Chris Hillery

10569. By Chris Hillery

Fix reversed URI installation directories. Approved: Matthias Brantner, Chris Hillery

10570. By Matthias Brantner

fix for bug #898064 Approved: Nicolae Brinza, William Candillon

10571. By Markos Zaharioudakis

small optimization of the group by Approved: Markos Zaharioudakis

10572. By Matthias Brantner

made destructors of Item subclasses virtual Approved: Markos Zaharioudakis, Matthias Brantner

10573. By Matthias Brantner

optimization: only have exactly two instances of boolean items in the simple store Approved: Markos Zaharioudakis, Matthias Brantner

10574. By Chris Hillery

Only create check_core_uris and associated dependencies if there are any core URIs (to prevent creating this target in standalone module projects).
 Approved: Juan Zacarias, Chris Hillery

10575. By Paul J. Lucas

undo previous changes and mark bug as expected to fail. Approved: Paul J. Lucas, Matthias Brantner

10576. By Paul J. Lucas

Things should be reverted now. Approved: Matthias Brantner, Paul J. Lucas

10577. By Matthias Brantner

fix build on windows Approved: Juan Zacarias, Matthias Brantner

10578. By Paul J. Lucas

Fixed build. Approved: Matthias Brantner, Paul J. Lucas

10579. By Matthias Brantner

exclude .bzr dir from source packages Approved: Cezar Andrei, Matthias Brantner

10580. By Markos Zaharioudakis

Cleaned up unused stuff in debugger_expr Approved: Gabriel Petrovay, Markos Zaharioudakis

10581. By Matthias Brantner

removed obsolete code guarded by the USE_POS macro Approved: Markos Zaharioudakis, Matthias Brantner

10582. By Matthias Brantner

- automatic caching of recursive, non-sequential, and deterministic functions with atomic parameter and return types
- %ann:cache and %ann:no-cache for controlling function result caching Approved: Markos Zaharioudakis, Matthias Brantner

10583. By Markos Zaharioudakis

Optimized and cleaned up SimpleTempSeq implementation and its usage. Approved: Markos Zaharioudakis

10584. By Paul J. Lucas

Applied William's patch; patched William's patch to handle UTF-8 properly. Approved: William Candillon, Paul J. Lucas

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/compiler/translator/translator.cpp'
2--- src/compiler/translator/translator.cpp 2011-10-18 21:29:50 +0000
3+++ src/compiler/translator/translator.cpp 2011-10-26 21:19:05 +0000
4@@ -1305,11 +1305,25 @@
5 if (qname != NULL)
6 {
7 RAISE_ERROR(zerr::ZDDY0025_INDEX_WRONG_NUMBER_OF_PROBE_ARGS, loc,
8- ERROR_PARAMS(qname->getStringValue()));
9+ ERROR_PARAMS(
10+ qname->getStringValue(),
11+ "index",
12+ n-1,
13+ "multiple of 6"
14+ )
15+ );
16 }
17 else
18 {
19- RAISE_ERROR_NO_PARAMS(zerr::ZDDY0025_INDEX_WRONG_NUMBER_OF_PROBE_ARGS, loc);
20+ RAISE_ERROR(
21+ zerr::ZDDY0025_INDEX_WRONG_NUMBER_OF_PROBE_ARGS, loc,
22+ ERROR_PARAMS(
23+ "anonymous",
24+ "index",
25+ n-1,
26+ "multiple of 6"
27+ )
28+ );
29 }
30 }
31
32
33=== modified file 'src/diagnostics/diagnostic_en.xml'
34--- src/diagnostics/diagnostic_en.xml 2011-10-17 21:17:05 +0000
35+++ src/diagnostics/diagnostic_en.xml 2011-10-26 21:19:05 +0000
36@@ -1966,7 +1966,7 @@
37 </diagnostic>
38
39 <diagnostic code="ZDDY0025" name="INDEX_WRONG_NUMBER_OF_PROBE_ARGS">
40- <value>${"1": }invalid number of arguments in probe</value>
41+ <value>$1: invalid number of arguments to $2 operation; given $3 expected $4</value>
42 </diagnostic>
43
44 <diagnostic code="ZDDY0026" name="INDEX_RANGE_PROBE_NOT_ALLOWED">
45
46=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
47--- src/diagnostics/pregenerated/dict_en.cpp 2011-10-20 23:05:55 +0000
48+++ src/diagnostics/pregenerated/dict_en.cpp 2011-10-26 21:19:05 +0000
49@@ -286,7 +286,7 @@
50 { "ZDDY0022", "\"$1\": index already exists" },
51 { "ZDDY0023", "\"$1\": index does not exist" },
52 { "ZDDY0024", "\"$1\": index uniqueness violation" },
53- { "ZDDY0025", "${\"1\": }invalid number of arguments in probe" },
54+ { "ZDDY0025", "$1: invalid number of arguments to $2 operation; given $3 expected $4" },
55 { "ZDDY0026", "\"$1\": index range probe not allowed" },
56 { "ZDDY0027", "\"$1\": index multiple creates" },
57 { "ZDDY0028", "\"$1\": index domain has duplicate nodes" },
58
59=== modified file 'src/runtime/indexing/index_ddl.cpp'
60--- src/runtime/indexing/index_ddl.cpp 2011-10-05 17:49:48 +0000
61+++ src/runtime/indexing/index_ddl.cpp 2011-10-26 21:19:05 +0000
62@@ -634,7 +634,12 @@
63 if (state->theIndexDecl->getKeyExpressions().size() != numChildren-1)
64 {
65 RAISE_ERROR(zerr::ZDDY0025_INDEX_WRONG_NUMBER_OF_PROBE_ARGS, loc,
66- ERROR_PARAMS(qnameItem->getStringValue()));
67+ ERROR_PARAMS(
68+ qnameItem->getStringValue(),
69+ "index",
70+ numChildren-1,
71+ state->theIndexDecl->getKeyExpressions().size())
72+ );
73 }
74
75 state->theIndex = (state->theIndexDecl->isTemp() ?
76@@ -800,7 +805,12 @@
77 numChildren != 2)
78 {
79 RAISE_ERROR(zerr::ZDDY0025_INDEX_WRONG_NUMBER_OF_PROBE_ARGS, loc,
80- ERROR_PARAMS(qnameItem->getStringValue()));
81+ ERROR_PARAMS(
82+ qnameItem->getStringValue(),
83+ "index",
84+ numChildren-1,
85+ state->theIndexDecl->getKeyExpressions().size())
86+ );
87 }
88
89 state->theIndex = (state->theIndexDecl->isTemp() ?
90@@ -973,13 +983,23 @@
91 if ((numChildren-1) % 6 != 0)
92 {
93 RAISE_ERROR(zerr::ZDDY0025_INDEX_WRONG_NUMBER_OF_PROBE_ARGS, loc,
94- ERROR_PARAMS(qname->getStringValue()));
95+ ERROR_PARAMS(
96+ qname->getStringValue(),
97+ "index",
98+ numChildren-1,
99+ "multiple of 6"
100+ ));
101 }
102
103 if (indexDecl->getKeyExpressions().size() * 6 > numChildren-1)
104 {
105 RAISE_ERROR(zerr::ZDDY0025_INDEX_WRONG_NUMBER_OF_PROBE_ARGS, loc,
106- ERROR_PARAMS(qname->getStringValue()));
107+ ERROR_PARAMS(
108+ qname->getStringValue(),
109+ "index",
110+ numChildren-1,
111+ indexDecl->getKeyExpressions().size() * 6
112+ ));
113 }
114
115 state->theIndex = (indexDecl->isTemp() ?
116
117=== modified file 'src/runtime/store/maps_impl.cpp'
118--- src/runtime/store/maps_impl.cpp 2011-08-17 23:04:48 +0000
119+++ src/runtime/store/maps_impl.cpp 2011-10-26 21:19:05 +0000
120@@ -241,7 +241,11 @@
121 {
122 throw XQUERY_EXCEPTION(
123 zerr::ZDDY0025_INDEX_WRONG_NUMBER_OF_PROBE_ARGS,
124- ERROR_PARAMS( lQName->getStringValue() ),
125+ ERROR_PARAMS(
126+ lQName->getStringValue(),
127+ "map",
128+ theChildren.size() - 1,
129+ lSpec.getNumColumns() ),
130 ERROR_LOC( loc )
131 );
132 }
133@@ -316,7 +320,11 @@
134 {
135 throw XQUERY_EXCEPTION(
136 zerr::ZDDY0025_INDEX_WRONG_NUMBER_OF_PROBE_ARGS,
137- ERROR_PARAMS( lQName->getStringValue() ),
138+ ERROR_PARAMS(
139+ lQName->getStringValue(),
140+ "map",
141+ theChildren.size() - 2,
142+ lSpec.getNumColumns() ),
143 ERROR_LOC( loc )
144 );
145 }
146@@ -386,7 +394,12 @@
147 {
148 throw XQUERY_EXCEPTION(
149 zerr::ZDDY0025_INDEX_WRONG_NUMBER_OF_PROBE_ARGS,
150- ERROR_PARAMS( lQName->getStringValue() ),
151+ ERROR_PARAMS(
152+ lQName->getStringValue(),
153+ "map",
154+ theChildren.size() - 1,
155+ lSpec.getNumColumns()
156+ ),
157 ERROR_LOC( loc )
158 );
159 }

Subscribers

People subscribed via source and target branches