diff options
author | Daniƫl de Kok <me@danieldk.eu> | 2018-07-24 08:21:57 +0200 |
---|---|---|
committer | Ryan Mulligan <ryan@ryantm.com> | 2018-07-24 20:27:51 -0700 |
commit | 52e7494186d336c4d413c6a7081a387740a02b3d (patch) | |
tree | cd68fca2a2c4190b0e2ea5a98daac8eb0d74bff5 /pkgs/development/libraries/dbxml/incorrect-optimization.patch | |
parent | fec22d4ff41628b2cb2e7480dfcb1c390abaf2d0 (diff) | |
download | nixpkgs-52e7494186d336c4d413c6a7081a387740a02b3d.tar nixpkgs-52e7494186d336c4d413c6a7081a387740a02b3d.tar.gz nixpkgs-52e7494186d336c4d413c6a7081a387740a02b3d.tar.bz2 nixpkgs-52e7494186d336c4d413c6a7081a387740a02b3d.tar.lz nixpkgs-52e7494186d336c4d413c6a7081a387740a02b3d.tar.xz nixpkgs-52e7494186d336c4d413c6a7081a387740a02b3d.tar.zst nixpkgs-52e7494186d336c4d413c6a7081a387740a02b3d.zip |
dbxml: init at 6.1.4
Website: https://www.oracle.com/database/berkeley-db/xml.html Changelog: http://download.oracle.com/otndocs/products/berkeleydb/html/dbxml614.html
Diffstat (limited to 'pkgs/development/libraries/dbxml/incorrect-optimization.patch')
-rw-r--r-- | pkgs/development/libraries/dbxml/incorrect-optimization.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/development/libraries/dbxml/incorrect-optimization.patch b/pkgs/development/libraries/dbxml/incorrect-optimization.patch new file mode 100644 index 00000000000..630dc972e18 --- /dev/null +++ b/pkgs/development/libraries/dbxml/incorrect-optimization.patch @@ -0,0 +1,34 @@ +Patch provided by Lauren Foutz. See: +https://community.oracle.com/thread/4093422 + +--- dbxml-6.1.4-orig/dbxml/src/dbxml/query/ParentOfChildJoinQP.cpp ++++ dbxml-6.1.4/dbxml/src/dbxml/query/ParentOfChildJoinQP.cpp +@@ -139,28 +139,16 @@ bool ParentOfChildIterator::doJoin(Dynam + + // Invarient 4: When ancestorStack_ is empty we can output the + // buffered results_, since any more results will come after them in + // document order. + + while(true) { + context->testInterrupt(); + +- /* +- * If current parent's node level already be larger than +- * childen's, abandon current parent and move to next one. +- */ +- if (parents_ != NULL && +- parents_->getNodeLevel() > children_->getNodeLevel()) { +- if(!parents_->next(context)) { +- delete parents_; +- parents_ = 0; +- } +- } +- + int cmp = parents_ == 0 ? -1 : isDescendantOf(children_, parents_, /*orSelf*/false); + if(cmp < 0) { + if(!ancestorStack_.empty()) { + // We've found the closest ancestor - is it a parent? + if(ancestorStack_.back()->getNodeLevel() == (children_->getNodeLevel() - 1)) { + // Maintain invarient 3 + if(results_.empty() || NodeInfo::compare(results_.back(), ancestorStack_.back()) < 0) + results_.push_back(ancestorStack_.back()); |