Merge lp:~nbrinza/zorba/bugs into lp:zorba

Proposed by Nicolae Brinza
Status: Superseded
Proposed branch: lp:~nbrinza/zorba/bugs
Merge into: lp:zorba
Diff against target: 66 lines (+20/-5)
2 files modified
ChangeLog (+2/-1)
src/types/typeimpl.cpp (+18/-4)
To merge this branch: bzr merge lp:~nbrinza/zorba/bugs
Reviewer Review Type Date Requested Status
Matthias Brantner Needs Fixing
Review via email: mp+81095@code.launchpad.net

This proposal has been superseded by a proposal from 2011-11-06.

Commit message

Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing

Description of the change

Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing

To post a comment you must log in.
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

Nicolae, could you please also update the ChangeLog?

review: Needs Fixing
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:~nbrinza/zorba/bugs into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:272 (message):
  Validation queue job bugs-2011-11-03T02-45-02.853Z is finished. The final
  status was:

  1 tests did not succeed - changes not commited.

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

lp:~nbrinza/zorba/bugs updated
10536. By Nicolae Brinza

Updated Changelog to reflect the fix for the bug #867256

10537. By Nicolae Brinza

Fixed a regression for the document-node(schema-element(X)) element test

10538. By Nicolae Brinza

Merged changes from Zorba trunk

10539. By Nicolae Brinza

Related to the Steps-leading-lone-slash-8a test: removed an unecessary condition from typeimpl.cpp. Removed the expected failure for the said test.

10540. By Nicolae Brinza

Merged with Zorba trunk

10541. By Nicolae Brinza

Added tests for the document-node(schema-element()) node test, used as variable types and in 'instance of' expressions

10542. By Nicolae Brinza

Added test results files for the previous commit (tests for document-node(schema-element()) node test)

10543. By Nicolae Brinza

Added spec files for tests with the document-node(schema-element()) node tests

10544. By Nicolae Brinza

Merged with Zorba trunk

10545. By Nicolae Brinza

Merged with Zorba trunk

10546. By Nicolae Brinza

Merged with Zorba trunk

10547. By Nicolae Brinza

Merged with Zorba trunk

10548. By Nicolae Brinza

Merged with Zorba trunk

10549. By Nicolae Brinza

Fixed the 6 failing doc-node-schema-elem-test- tests

10550. By Nicolae Brinza

Merged with Zorba trunk

Unmerged revisions

10550. By Nicolae Brinza

Merged with Zorba trunk

10549. By Nicolae Brinza

Fixed the 6 failing doc-node-schema-elem-test- tests

10548. By Nicolae Brinza

Merged with Zorba trunk

10547. By Nicolae Brinza

Merged with Zorba trunk

10546. By Nicolae Brinza

Merged with Zorba trunk

10545. By Nicolae Brinza

Merged with Zorba trunk

10544. By Nicolae Brinza

Merged with Zorba trunk

10543. By Nicolae Brinza

Added spec files for tests with the document-node(schema-element()) node tests

10542. By Nicolae Brinza

Added test results files for the previous commit (tests for document-node(schema-element()) node test)

10541. By Nicolae Brinza

Added tests for the document-node(schema-element()) node test, used as variable types and in 'instance of' expressions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2011-11-04 11:40:20 +0000
3+++ ChangeLog 2011-11-06 18:45:28 +0000
4@@ -1,7 +1,8 @@
5 Zorba - The XQuery Processor
6
7 version 2.x
8-
9+
10+ * Fixed bug #867256 (document-node(element(x)) types and tests were not working correctly)
11 * Custom Full-text thesaurus.
12 * Fixed bug #3401971 (node-by-reference on dynamic collections)
13 * Optimization for positioned sequence access (e.g. $x[$x[1]] where $x is a
14
15=== modified file 'src/types/typeimpl.cpp' (properties changed: -x to +x)
16--- src/types/typeimpl.cpp 2011-07-01 05:22:12 +0000
17+++ src/types/typeimpl.cpp 2011-11-06 18:45:28 +0000
18@@ -361,7 +361,7 @@
19
20
21 bool NodeXQType::is_subtype(
22- const TypeManager* tm,
23+ const TypeManager* tm,
24 const NodeXQType& supertype,
25 const QueryLoc& loc) const
26 {
27@@ -443,7 +443,7 @@
28
29
30 bool NodeXQType::is_supertype(
31- const TypeManager* tm,
32+ const TypeManager* tm,
33 const store::Item* subitem,
34 const QueryLoc& loc) const
35 {
36@@ -488,14 +488,28 @@
37 }
38 }
39
40- if (m_node_kind != store::StoreConsts::elementNode &&
41- m_node_kind != store::StoreConsts::attributeNode)
42+ if (m_node_kind != store::StoreConsts::elementNode &&
43+ m_node_kind != store::StoreConsts::attributeNode &&
44+ (m_content_type == NULL
45+ ||
46+ m_node_kind != store::StoreConsts::documentNode))
47 return true;
48
49 if (m_content_type == NULL ||
50 m_content_type->type_kind() == XQType::ANY_TYPE_KIND)
51 return true;
52
53+ // document-node( E ) matches any document node that contains exactly one element
54+ // node, optionally accompanied by one or more comment and processing instruction
55+ // nodes, if E is an ElementTest or SchemaElementTest that matches the element node.
56+ if (m_node_kind == store::StoreConsts::documentNode &&
57+ m_content_type != NULL &&
58+ m_content_type->type_kind() == XQType::NODE_TYPE_KIND)
59+ {
60+ xqtref_t documentNodeType = tm->create_value_type(subitem, loc);
61+ return TypeOps::is_subtype(tm, *documentNodeType, *this);
62+ }
63+
64 xqtref_t subContentType = tm->create_named_type(subitem->getType(),
65 TypeConstants::QUANT_ONE,
66 loc,

Subscribers

People subscribed via source and target branches