[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Approved => Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue job bug-945241-2012-03-09T19-21-07.293Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-945241-2012-03-09T19-21-07.293Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending. -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue job bug-945241-2012-03-07T02-56-08.435Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-945241-2012-03-07T02-56-08.435Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The attempt to merge lp:~zorba-coders/zorba/bug-945241 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-945241-2012-03-07T01-40-12.143Z 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 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-945241-2012-03-07T01-40-12.143Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Commit Message changed to: StaticCollectionManager::declaredIndexes() doesn't return temporary indexes anymore. Also isDeclaredIndex also doesn't return true if asked whether a temporary index is declared. For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-945241 into lp:zorba. Requested reviews: Matthias Brantner (matthias-brantner) Till Westmann (tillw) Related bugs: Bug #945241 in Zorba: "StaticCollectionManager::declaredIndexes() and temporary indexes" https://bugs.launchpad.net/zorba/+bug/945241 For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 StaticCollectionManager::declaredIndexes() doesn't return temporary indexes anymore. Also isDeclaredIndex also doesn't return true if asked whether a temporary index is declared. -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2012-03-06 22:43:17 + +++ ChangeLog 2012-03-07 01:39:21 + @@ -26,6 +26,7 @@ case of early-out) * More efficient implementation for base64Binary items * Added index management function to the C++ api's StaticCollectionManager. + * Fixed bug #945241 (StaticCollectionManager::declaredIndexes() and temporary indexes) * Fixed bug #872288 (reset recursive flag during node rename) * Fixed bug #905041 (allow for the default element and function namespaces to be set multiple times via the c++ api). === modified file 'src/runtime/collections/collections_impl.cpp' --- src/runtime/collections/collections_impl.cpp 2012-02-16 12:48:17 + +++ src/runtime/collections/collections_impl.cpp 2012-03-07 01:39:21 + @@ -30,6 +30,7 @@ #include "context/uri_resolver.h" #include "context/static_context_consts.h" +#include "compiler/xqddf/value_index.h" #include "compiler/xqddf/value_ic.h" #include "runtime/collections/collections.h" @@ -2331,20 +2332,21 @@ PlanState& aPlanState) const { store::Item_t lName; + zorba::IndexDecl* lDecl; PlanIteratorState* lState; DEFAULT_STACK_INIT(PlanIteratorState, lState, aPlanState); consumeNext(lName, theChildren[0].getp(), aPlanState); - if (theSctx->lookup_index(lName.getp()) == 0) + if ((lDecl = theSctx->lookup_index(lName.getp())) && !lDecl->isTemp()) + { +STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, true), lState); + } + else { STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, false), lState); } - else - { -STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, true), lState); - } STACK_END(lState); } @@ -2386,6 +2388,10 @@ for ((lState->nameItState = theSctx->index_names())->open(); lState->nameItState->next(lName); ) { +if (theSctx->lookup_index(lName.getp())->isTemp()) +{ + continue; +} aResult = lName; STACK_PUSH(true, lState); } === modified file 'test/unit/module1.xq' --- test/unit/module1.xq 2011-08-05 02:21:55 + +++ test/unit/module1.xq 2012-03-07 01:39:21 + @@ -18,4 +18,4 @@ import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";; -1+1 +mod2:foo() === modified file 'test/unit/module2.xq' --- test/unit/module2.xq 2011-12-21 14:40:33 + +++ test/unit/module2.xq 2012-03-07 01:39:21 + @@ -27,3 +27,14 @@ declare index mod2:index on nodes ddl:collection(xs:QName("mod2:coll")) by data(@id) as xs:string; + + +(: test that a temp index doesn't have impact on the indexes + returned by the static collection mgr :) +declare function mod2:foo() +{ + for $i in 1 to 10 + for $j in 1 to 10 + where $i eq $j + return $i +}; === modified file 'test/unit/staticcollectionmanager.cpp' --- test/unit/staticcollectionmanager.cpp 2012-03-05 23:44:54 + +++ test/unit/staticcollectionmanager.cpp 2012-03-07 01:39:21 + @@ -206,23 +206,25 @@ Item lCollName2 = lFac->createQName("http://www.mod2.com/";, "coll"); lColMgr->createCollection(lCollName2); - Collection_t lColl = lColMgr->getCollection(lCollName2); - - std::vector lAnnotations; - lColl->getAnnotations(lAnnotations); - size_t num_annotations = 0; - for (std::vector::const_iterator lIter = lAnnotations.begin(); - lIter != lAnnotations.end(); ++lIter) - { -std::cout << "Annotation QName " << (*lIter)->getQName().getStringValue() << std::endl; -++num_annotations; - } - - if (num_annotations != 3) - { -return false; - } - + { +Collection_t lColl = lColMgr->getCollection(lCollName2); + +std::vector lAnnotations; +lColl->getAnnotations(lAnnotations); +size_t num_annotations = 0; +for (std::vector::const_iterator lIter = lAnnotations.begin(); + lIter != lAnnotations.end(); ++lIter) +{ + std::cout << "Annotation QName " << (*lIter)->getQName().getStringValue() << std::endl; + ++num_annotations; +} + +if (num_annotations != 3) +{ + return false; +} + } + lColMgr->deleteCollection(lCollName2); return true; } @@ -418,6 +420,46 @@ return true; } +/** + * test that declaredIndexes doesn't return temporary indexes and crashes + * if one tries to cre
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Attempt to merge into lp:zorba failed due to conflicts: text conflict in test/unit/staticcollectionmanager.cpp -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The attempt to merge lp:~zorba-coders/zorba/bug-945241 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-945241-2012-03-02T23-59-02.503Z is finished. The final status was: No tests were run - build or configure step must have failed. Not commiting changes. Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-945241-2012-03-02T23-59-02.503Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Commit Message changed to: fix bug #945241 (StaticCollectionManager::declaredIndexes() and temporary indexes) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-945241 into lp:zorba. Requested reviews: Matthias Brantner (matthias-brantner) Till Westmann (tillw) Related bugs: Bug #945241 in Zorba: "StaticCollectionManager::declaredIndexes() and temporary indexes" https://bugs.launchpad.net/zorba/+bug/945241 For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 StaticCollectionManager::declaredIndexes() doesn't return temporary indexes anymore. Also isDeclaredIndex also doesn't return true if asked whether a temporary index is declared. -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2012-03-01 21:22:16 + +++ ChangeLog 2012-03-02 23:58:19 + @@ -24,6 +24,7 @@ case of early-out) * More efficient implementation for base64Binary items * Added index management function to the C++ api's StaticCollectionManager. + * Fixed bug #945241 (StaticCollectionManager::declaredIndexes() and temporary indexes) * Fixed bug #872288 (reset recursive flag during node rename) * Fixed bug #905041 (allow for the default element and function namespaces to be set multiple times via the c++ api). === modified file 'src/runtime/collections/collections_impl.cpp' --- src/runtime/collections/collections_impl.cpp 2012-02-16 12:48:17 + +++ src/runtime/collections/collections_impl.cpp 2012-03-02 23:58:19 + @@ -30,6 +30,7 @@ #include "context/uri_resolver.h" #include "context/static_context_consts.h" +#include "compiler/xqddf/value_index.h" #include "compiler/xqddf/value_ic.h" #include "runtime/collections/collections.h" @@ -2331,20 +2332,21 @@ PlanState& aPlanState) const { store::Item_t lName; + zorba::IndexDecl* lDecl; PlanIteratorState* lState; DEFAULT_STACK_INIT(PlanIteratorState, lState, aPlanState); consumeNext(lName, theChildren[0].getp(), aPlanState); - if (theSctx->lookup_index(lName.getp()) == 0) + if ((lDecl = theSctx->lookup_index(lName.getp())) && !lDecl->isTemp()) + { +STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, true), lState); + } + else { STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, false), lState); } - else - { -STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, true), lState); - } STACK_END(lState); } @@ -2386,6 +2388,10 @@ for ((lState->nameItState = theSctx->index_names())->open(); lState->nameItState->next(lName); ) { +if (theSctx->lookup_index(lName.getp())->isTemp()) +{ + continue; +} aResult = lName; STACK_PUSH(true, lState); } === modified file 'test/unit/module1.xq' --- test/unit/module1.xq 2011-08-05 02:21:55 + +++ test/unit/module1.xq 2012-03-02 23:58:19 + @@ -18,4 +18,4 @@ import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";; -1+1 +mod2:foo() === modified file 'test/unit/module2.xq' --- test/unit/module2.xq 2011-12-21 14:40:33 + +++ test/unit/module2.xq 2012-03-02 23:58:19 + @@ -27,3 +27,14 @@ declare index mod2:index on nodes ddl:collection(xs:QName("mod2:coll")) by data(@id) as xs:string; + + +(: test that a temp index doesn't have impact on the indexes + returned by the static collection mgr :) +declare function mod2:foo() +{ + for $i in 1 to 10 + for $j in 1 to 10 + where $i eq $j + return $i +}; === modified file 'test/unit/staticcollectionmanager.cpp' --- test/unit/staticcollectionmanager.cpp 2012-01-11 17:30:25 + +++ test/unit/staticcollectionmanager.cpp 2012-03-02 23:58:19 + @@ -206,23 +206,26 @@ Item lCollName2 = lFac->createQName("http://www.mod2.com/";, "coll"); lColMgr->createCollection(lCollName2); - Collection_t lColl = lColMgr->getCollection(lCollName2); - - std::vector lAnnotations; - lColl->getAnnotations(lAnnotations); - size_t num_annotations = 0; - for (std::vector::const_iterator lIter = lAnnotations.begin(); - lIter != lAnnotations.end(); ++lIter) - { -std::cout << "Annotation QName " << (*lIter)->getQName().getStringValue() << std::endl; -++num_annotations; - } - - if (num_annotations != 3) - { -return false; - } - + + { +Collection_t lColl = lColMgr->getCollection(lCollName2); +std::vector lAnnotations; +lColl->getAnnotations(lAnnotations); +size_t num_annotations = 0; +for (std::vector::const_iterator lIter = lAnnotations.begin(); + lIter != lAnnotations.end(); ++lIter) +{ + std::cout << "Annotation QName " << (*lIter)->getQName().getStringValue() << std::endl; + ++num_annotations; +} + +if (num_annotations != 3) +{ + return false; +} + } + + lColMgr->deleteCollection(lCollName2); return true; } @@ -259,6 +262,44 @@ return i == 1; } +(: test that declaredIndexes doesn't return temporary indexes and crashes + : if one tries to crea
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95702 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95702 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The attempt to merge lp:~zorba-coders/zorba/bug-945241 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-945241-2012-03-02T23-52-06.271Z is finished. The final status was: No tests were run - build or configure step must have failed. Not commiting changes. Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95702 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-945241-2012-03-02T23-52-06.271Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95702 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95702 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95702 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Commit Message changed to: fix bug #945241 (StaticCollectionManager::declaredIndexes() and temporary indexes) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95702 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95702 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-945241 into lp:zorba. Requested reviews: Till Westmann (tillw) Matthias Brantner (matthias-brantner) Related bugs: Bug #945241 in Zorba: "StaticCollectionManager::declaredIndexes() and temporary indexes" https://bugs.launchpad.net/zorba/+bug/945241 For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95702 StaticCollectionManager::declaredIndexes() doesn't return temporary indexes anymore. Also isDeclaredIndex also doesn't return true if asked whether a temporary index is declared. -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95702 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2012-03-01 21:22:16 + +++ ChangeLog 2012-03-02 23:51:19 + @@ -24,6 +24,7 @@ case of early-out) * More efficient implementation for base64Binary items * Added index management function to the C++ api's StaticCollectionManager. + * Fixed bug #945241 (StaticCollectionManager::declaredIndexes() and temporary indexes) * Fixed bug #872288 (reset recursive flag during node rename) * Fixed bug #905041 (allow for the default element and function namespaces to be set multiple times via the c++ api). === modified file 'src/runtime/collections/collections_impl.cpp' --- src/runtime/collections/collections_impl.cpp 2012-02-16 12:48:17 + +++ src/runtime/collections/collections_impl.cpp 2012-03-02 23:51:19 + @@ -30,6 +30,7 @@ #include "context/uri_resolver.h" #include "context/static_context_consts.h" +#include "compiler/xqddf/value_index.h" #include "compiler/xqddf/value_ic.h" #include "runtime/collections/collections.h" @@ -2331,20 +2332,21 @@ PlanState& aPlanState) const { store::Item_t lName; + zorba::IndexDecl* lDecl; PlanIteratorState* lState; DEFAULT_STACK_INIT(PlanIteratorState, lState, aPlanState); consumeNext(lName, theChildren[0].getp(), aPlanState); - if (theSctx->lookup_index(lName.getp()) == 0) + if ((lDecl = theSctx->lookup_index(lName.getp())) && !lDecl->isTemp()) + { +STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, true), lState); + } + else { STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, false), lState); } - else - { -STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, true), lState); - } STACK_END(lState); } @@ -2386,6 +2388,10 @@ for ((lState->nameItState = theSctx->index_names())->open(); lState->nameItState->next(lName); ) { +if (theSctx->lookup_index(lName.getp())->isTemp()) +{ + continue; +} aResult = lName; STACK_PUSH(true, lState); } === modified file 'test/unit/module1.xq' --- test/unit/module1.xq 2011-08-05 02:21:55 + +++ test/unit/module1.xq 2012-03-02 23:51:19 + @@ -18,4 +18,4 @@ import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";; -1+1 +mod2:foo() === modified file 'test/unit/module2.xq' --- test/unit/module2.xq 2011-12-21 14:40:33 + +++ test/unit/module2.xq 2012-03-02 23:51:19 + @@ -27,3 +27,14 @@ declare index mod2:index on nodes ddl:collection(xs:QName("mod2:coll")) by data(@id) as xs:string; + + +(: test that a temp index doesn't have impact on the indexes + returned by the static collection mgr :) +declare function mod2:foo() +{ + for $i in 1 to 10 + for $j in 1 to 10 + where $i eq $j + return $i +}; === modified file 'test/unit/staticcollectionmanager.cpp' --- test/unit/staticcollectionmanager.cpp 2012-01-11 17:30:25 + +++ test/unit/staticcollectionmanager.cpp 2012-03-02 23:51:19 + @@ -206,23 +206,26 @@ Item lCollName2 = lFac->createQName("http://www.mod2.com/";, "coll"); lColMgr->createCollection(lCollName2); - Collection_t lColl = lColMgr->getCollection(lCollName2); - - std::vector lAnnotations; - lColl->getAnnotations(lAnnotations); - size_t num_annotations = 0; - for (std::vector::const_iterator lIter = lAnnotations.begin(); - lIter != lAnnotations.end(); ++lIter) - { -std::cout << "Annotation QName " << (*lIter)->getQName().getStringValue() << std::endl; -++num_annotations; - } - - if (num_annotations != 3) - { -return false; - } - + + { +Collection_t lColl = lColMgr->getCollection(lCollName2); +std::vector lAnnotations; +lColl->getAnnotations(lAnnotations); +size_t num_annotations = 0; +for (std::vector::const_iterator lIter = lAnnotations.begin(); + lIter != lAnnotations.end(); ++lIter) +{ + std::cout << "Annotation QName " << (*lIter)->getQName().getStringValue() << std::endl; + ++num_annotations; +} + +if (num_annotations != 3) +{ + return false; +} + } + + lColMgr->deleteCollection(lCollName2); return true; } @@ -259,6 +262,44 @@ return i == 1; } +(: test that declaredIndexes doesn't return temporary indexes and crashes + : if one tries to crea
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95699 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95699 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The attempt to merge lp:~zorba-coders/zorba/bug-945241 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-945241-2012-03-02T23-40-07.785Z is finished. The final status was: No tests were run - build or configure step must have failed. Not commiting changes. Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95699 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-945241-2012-03-02T23-40-07.785Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95699 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95699 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95699 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95699 Your team Zorba Coders is subscribed to branch lp:zorba. -- 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-945241 into lp:zorba. Requested reviews: Matthias Brantner (matthias-brantner) Till Westmann (tillw) Related bugs: Bug #945241 in Zorba: "StaticCollectionManager::declaredIndexes() and temporary indexes" https://bugs.launchpad.net/zorba/+bug/945241 For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95699 StaticCollectionManager::declaredIndexes() doesn't return temporary indexes anymore. Also isDeclaredIndex also doesn't return true if asked whether a temporary index is declared. -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95699 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2012-03-01 21:22:16 + +++ ChangeLog 2012-03-02 23:39:22 + @@ -24,6 +24,7 @@ case of early-out) * More efficient implementation for base64Binary items * Added index management function to the C++ api's StaticCollectionManager. + * Fixed bug #945241 (StaticCollectionManager::declaredIndexes() and temporary indexes) * Fixed bug #872288 (reset recursive flag during node rename) * Fixed bug #905041 (allow for the default element and function namespaces to be set multiple times via the c++ api). === modified file 'src/runtime/collections/collections_impl.cpp' --- src/runtime/collections/collections_impl.cpp 2012-02-16 12:48:17 + +++ src/runtime/collections/collections_impl.cpp 2012-03-02 23:39:22 + @@ -30,6 +30,7 @@ #include "context/uri_resolver.h" #include "context/static_context_consts.h" +#include "compiler/xqddf/value_index.h" #include "compiler/xqddf/value_ic.h" #include "runtime/collections/collections.h" @@ -2331,20 +2332,21 @@ PlanState& aPlanState) const { store::Item_t lName; + zorba::IndexDecl* lDecl; PlanIteratorState* lState; DEFAULT_STACK_INIT(PlanIteratorState, lState, aPlanState); consumeNext(lName, theChildren[0].getp(), aPlanState); - if (theSctx->lookup_index(lName.getp()) == 0) + if ((lDecl = theSctx->lookup_index(lName.getp())) && !lDecl->isTemp()) + { +STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, true), lState); + } + else { STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, false), lState); } - else - { -STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, true), lState); - } STACK_END(lState); } @@ -2386,6 +2388,10 @@ for ((lState->nameItState = theSctx->index_names())->open(); lState->nameItState->next(lName); ) { +if (theSctx->lookup_index(lName.getp())->isTemp()) +{ + continue; +} aResult = lName; STACK_PUSH(true, lState); } === modified file 'test/unit/module1.xq' --- test/unit/module1.xq 2011-08-05 02:21:55 + +++ test/unit/module1.xq 2012-03-02 23:39:22 + @@ -18,4 +18,4 @@ import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";; -1+1 +mod2:foo() === modified file 'test/unit/module2.xq' --- test/unit/module2.xq 2011-12-21 14:40:33 + +++ test/unit/module2.xq 2012-03-02 23:39:22 + @@ -27,3 +27,14 @@ declare index mod2:index on nodes ddl:collection(xs:QName("mod2:coll")) by data(@id) as xs:string; + + +(: test that a temp index doesn't have impact on the indexes + returned by the static collection mgr :) +declare function mod2:foo() +{ + for $i in 1 to 10 + for $j in 1 to 10 + where $i eq $j + return $i +}; === modified file 'test/unit/staticcollectionmanager.cpp' --- test/unit/staticcollectionmanager.cpp 2012-01-11 17:30:25 + +++ test/unit/staticcollectionmanager.cpp 2012-03-02 23:39:22 + @@ -206,23 +206,26 @@ Item lCollName2 = lFac->createQName("http://www.mod2.com/";, "coll"); lColMgr->createCollection(lCollName2); - Collection_t lColl = lColMgr->getCollection(lCollName2); - - std::vector lAnnotations; - lColl->getAnnotations(lAnnotations); - size_t num_annotations = 0; - for (std::vector::const_iterator lIter = lAnnotations.begin(); - lIter != lAnnotations.end(); ++lIter) - { -std::cout << "Annotation QName " << (*lIter)->getQName().getStringValue() << std::endl; -++num_annotations; - } - - if (num_annotations != 3) - { -return false; - } - + + { +Collection_t lColl = lColMgr->getCollection(lCollName2); +std::vector lAnnotations; +lColl->getAnnotations(lAnnotations); +size_t num_annotations = 0; +for (std::vector::const_iterator lIter = lAnnotations.begin(); + lIter != lAnnotations.end(); ++lIter) +{ + std::cout << "Annotation QName " << (*lIter)->getQName().getStringValue() << std::endl; + ++num_annotations; +} + +if (num_annotations != 3) +{ + return false; +} + } + + lColMgr->deleteCollection(lCollName2); return true; } @@ -259,6 +262,44 @@ return i == 1; } +(: test that declaredIndexes doesn't return temporary indexes and crashes + : if one tries to crea