From bbac0b673facbbb30b0d7733c86a332a4174d9b9 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Fri, 15 Apr 2016 18:10:16 +0200 Subject: [PATCH] don't pull filters beyond modification nodes --- arangod/Aql/OptimizerRules.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arangod/Aql/OptimizerRules.cpp b/arangod/Aql/OptimizerRules.cpp index 5633cf0996..bf4724c582 100644 --- a/arangod/Aql/OptimizerRules.cpp +++ b/arangod/Aql/OptimizerRules.cpp @@ -1268,6 +1268,11 @@ void arangodb::aql::moveFiltersUpRule(Optimizer* opt, ExecutionPlan* plan, // must not move a filter beyond a node that can throw break; } + + if (current->isModificationNode()) { + // must not move a filter beyond a modification node + break; + } if (current->getType() == EN::CALCULATION) { // must not move a filter beyond a node with a non-deterministic result