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

Proposed by Matthias Brantner
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 10858
Merged at revision: 10858
Proposed branch: lp:~zorba-coders/zorba/bug-1001463
Merge into: lp:zorba
Diff against target: 63 lines (+26/-1)
5 files modified
ChangeLog (+1/-0)
src/functions/udf.cpp (+1/-1)
test/rbkt/ExpQueryResults/zorba/udf/udf-recursive-2.xml.res (+1/-0)
test/rbkt/Queries/zorba/udf/schema.xsd (+13/-0)
test/rbkt/Queries/zorba/udf/udf-recursive-2.xq (+10/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1001463
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Matthias Brantner Approve
Review via email: mp+106686@code.launchpad.net

This proposal supersedes a proposal from 2012-05-18.

Commit message

fix for bug #1001463 (type not available during computation of function caching).

Description of the change

fix for bug #1001463 (type not available during computation of function caching).

The problem is that the wrong TypeManager is used for checking the subtype-relationship during the computation of the function-caching property.

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

Validation queue job bug-1001463-2012-05-18T22-01-45.997Z 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, 2 Pending.

Revision history for this message
Markos Zaharioudakis (markos-za) wrote : Posted in a previous version of this proposal

I ran into this problem myself in the plan serializer branch. The correct fix is to get the sctx from theBodyExpr:

TypeManager* tm = theBodyExpr->get_sctx()->get_typemanager();

review: Needs Fixing
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-1001463-2012-05-21T18-35-03.122Z 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, 2 Pending.

Revision history for this message
Markos Zaharioudakis (markos-za) :
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-1001463-2012-05-21T19-19-50.63Z 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
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-05-18 22:01:56 +0000
3+++ ChangeLog 2012-05-21 18:33:24 +0000
4@@ -4,6 +4,7 @@
5 version 2.x
6
7 * Fixed bug #867170 (Variables declared in Prolog are Overwritten inside the query)
8+ * Fixed bug #1001463 (type not available during computation of function caching)
9
10
11 version 2.5
12
13=== modified file 'src/functions/udf.cpp'
14--- src/functions/udf.cpp 2012-05-03 12:31:51 +0000
15+++ src/functions/udf.cpp 2012-05-21 18:33:24 +0000
16@@ -492,7 +492,7 @@
17
18 // parameter and return types are subtype of xs:anyAtomicType?
19 const xqtref_t& lRes = theSignature.returnType();
20- TypeManager* tm = lRes->get_manager();
21+ TypeManager* tm = theBodyExpr->get_sctx()->get_typemanager();
22
23 if (!TypeOps::is_subtype(tm,
24 *lRes,
25
26=== added file 'test/rbkt/ExpQueryResults/zorba/udf/udf-recursive-2.xml.res'
27--- test/rbkt/ExpQueryResults/zorba/udf/udf-recursive-2.xml.res 1970-01-01 00:00:00 +0000
28+++ test/rbkt/ExpQueryResults/zorba/udf/udf-recursive-2.xml.res 2012-05-21 18:33:24 +0000
29@@ -0,0 +1,1 @@
30+false
31
32=== added file 'test/rbkt/Queries/zorba/udf/schema.xsd'
33--- test/rbkt/Queries/zorba/udf/schema.xsd 1970-01-01 00:00:00 +0000
34+++ test/rbkt/Queries/zorba/udf/schema.xsd 2012-05-21 18:33:24 +0000
35@@ -0,0 +1,13 @@
36+<?xml version="1.0" encoding="utf-8"?>
37+<xs:schema targetNamespace="http://foo.com/schemas/schema"
38+ xmlns = "http://foo.com/schemas/schema"
39+ xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
40+
41+
42+ <xs:element name="Content" type="Content"/>
43+
44+ <xs:complexType name="Content">
45+ <xs:attribute name="id" type="xs:string"></xs:attribute>
46+ </xs:complexType>
47+
48+</xs:schema>
49
50=== added file 'test/rbkt/Queries/zorba/udf/udf-recursive-2.xq'
51--- test/rbkt/Queries/zorba/udf/udf-recursive-2.xq 1970-01-01 00:00:00 +0000
52+++ test/rbkt/Queries/zorba/udf/udf-recursive-2.xq 2012-05-21 18:33:24 +0000
53@@ -0,0 +1,10 @@
54+import schema namespace d = "http://foo.com/schemas/schema" at "schema.xsd";
55+
56+declare function local:recursion($param as element(*, d:Content)?) as xs:boolean
57+{
58+ if ($param)
59+ then local:recursion(())
60+ else false()
61+};
62+
63+local:recursion(validate { <d:Content id="foo"/> })

Subscribers

People subscribed via source and target branches