diff --git a/CHANGELOG b/CHANGELOG index 20dedd0bad..98ab59d15f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -138,6 +138,8 @@ devel v3.0.11 (2016-XX-XX) -------------------- +* fixed issue #2081 + * fixed issue #2038 diff --git a/arangod/Aql/Condition.cpp b/arangod/Aql/Condition.cpp index 29efd29492..f319457698 100644 --- a/arangod/Aql/Condition.cpp +++ b/arangod/Aql/Condition.cpp @@ -414,13 +414,13 @@ std::vector> Condition::getConstAtt if (lhs->isAttributeAccessForVariable(parts) && parts.first == reference) { - if (includeNull || (rhs->isConstant() && !rhs->isNullValue())) { + if (includeNull || ((rhs->isConstant() || rhs->type == NODE_TYPE_REFERENCE) && !rhs->isNullValue())) { result.emplace_back(std::move(parts.second)); } } else if (rhs->isAttributeAccessForVariable(parts) && parts.first == reference) { - if (includeNull || (lhs->isConstant() && !lhs->isNullValue())) { + if (includeNull || ((lhs->isConstant() || lhs->type == NODE_TYPE_REFERENCE) && !lhs->isNullValue())) { result.emplace_back(std::move(parts.second)); } } diff --git a/js/server/modules/@arangodb/aql-helper.js b/js/server/modules/@arangodb/aql-helper.js index f80e9f217b..509d6ec08f 100644 --- a/js/server/modules/@arangodb/aql-helper.js +++ b/js/server/modules/@arangodb/aql-helper.js @@ -350,8 +350,8 @@ function findExecutionNodes (plan, nodetype) { if (plan.hasOwnProperty('plan')) { what = plan.plan; } - what.nodes.forEach(function (node) { - if (node.type === nodetype) { + what.nodes.forEach(function(node) { + if (nodetype === undefined || node.type === nodetype) { matches.push(node); } else if (node.type === 'SubqueryNode') { var subPlan = {'plan': node.subquery};