mirror of https://gitee.com/bigwinds/arangodb
parent
e8d39666fd
commit
078e1d9b9d
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -2386,6 +2386,9 @@ void arangodb::aql::simplifyConditionsRule(Optimizer* opt,
|
|||
nn->expression()->replaceNode(simplified);
|
||||
modified = true;
|
||||
}
|
||||
if (modified) {
|
||||
nn->expression()->invalidateAfterReplacements();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue