1
0
Fork 0
This commit is contained in:
Jan 2019-02-05 15:50:47 +01:00 committed by GitHub
parent e8d39666fd
commit 078e1d9b9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 3 deletions

View File

@ -1,6 +1,8 @@
v3.4.3 (XXXX-XX-XX)
-------------------
* fixed issue #8108: AQL variable - not working query since upgrade to 3.4 release
* fixed possible segfault when using COLLECT with a LIMIT and an offset
* fixed COLLECT forgetting top-level variables after 1000 rows

View File

@ -200,14 +200,14 @@ class Expression {
}
void clearVariable(Variable const* variable) { _variables.erase(variable); }
/// @brief reset internal attributes after variables in the expression were changed
void invalidateAfterReplacements();
private:
/// @brief free the internal data structures
void freeInternals() noexcept;
/// @brief reset internal attributes after variables in the expression were changed
void invalidateAfterReplacements();
/// @brief find a value in an array
bool findInArray(AqlValue const&, AqlValue const&, transaction::Methods*,
AstNode const*) const;

View File

@ -2386,6 +2386,9 @@ void arangodb::aql::simplifyConditionsRule(Optimizer* opt,
nn->expression()->replaceNode(simplified);
modified = true;
}
if (modified) {
nn->expression()->invalidateAfterReplacements();
}
}
}

View File

@ -152,6 +152,14 @@ function optimizerRuleTestSuite () {
});
},
testIssue8108 : function () {
let query = "FOR i IN 1..10 LET x = { y : i } COLLECT z = x.y._id INTO out RETURN 1";
let result = AQL_EXECUTE(query).json;
// the main thing here is that the query can be executed successfully and
// does not throw a runtime error "variable not found"
assertEqual([ 1 ], result);
},
};
}