Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-1001463 into lp:zorba.
Requested reviews: Matthias Brantner (matthias-brantner) Markos Zaharioudakis (markos-za) Related bugs: Bug #1001463 in Zorba: "type not available during computation of function caching" https://bugs.launchpad.net/zorba/+bug/1001463 For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-1001463/+merge/106475 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. I'm not 100% sure whether the suggested fix is the right one. Essentially, the problem is that the udf doesn't have a static_context at the time computeResultCaching is called (I'm not even sure if it will ever have it set). -- https://code.launchpad.net/~zorba-coders/zorba/bug-1001463/+merge/106475 Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog' --- ChangeLog 2012-05-16 06:45:13 +0000 +++ ChangeLog 2012-05-18 21:59:20 +0000 @@ -4,6 +4,7 @@ version 2.x * Fixed bug #867170 (Variables declared in Prolog are Overwritten inside the query) + * Fixed bug #1001463 (type not available during computation of function caching) version 2.5 === modified file 'src/compiler/codegen/plan_visitor.cpp' --- src/compiler/codegen/plan_visitor.cpp 2012-05-03 12:31:51 +0000 +++ src/compiler/codegen/plan_visitor.cpp 2012-05-18 21:59:20 +0000 @@ -2335,6 +2335,7 @@ { // need to computeResultCaching here for iterprint to work user_function* udf = static_cast<user_function*>(func); + udf->setStaticContext(v.get_sctx()); udf->computeResultCaching(theCCB->theXQueryDiagnostics); } } === modified file 'src/functions/udf.cpp' --- src/functions/udf.cpp 2012-05-03 12:31:51 +0000 +++ src/functions/udf.cpp 2012-05-18 21:59:20 +0000 @@ -492,7 +492,7 @@ // parameter and return types are subtype of xs:anyAtomicType? const xqtref_t& lRes = theSignature.returnType(); - TypeManager* tm = lRes->get_manager(); + TypeManager* tm = getStaticContext()->get_typemanager(); if (!TypeOps::is_subtype(tm, *lRes,
-- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp