Clear query executions if not in explicit transaction (#70)
This commit is contained in:
parent
647388792a
commit
7bff678cd9
@ -1175,9 +1175,6 @@ Interpreter::PrepareResult Interpreter::Prepare(
|
||||
const std::string &query_string,
|
||||
const std::map<std::string, storage::PropertyValue> ¶ms) {
|
||||
if (!in_explicit_transaction_) {
|
||||
// TODO(antonio2368): Should this throw?
|
||||
CHECK(!ActiveQueryExecutions()) << "Only one active execution allowed "
|
||||
"while not in explicit transaction!";
|
||||
query_executions_.clear();
|
||||
}
|
||||
|
||||
|
@ -416,6 +416,9 @@ std::map<std::string, TypedValue> Interpreter::Pull(TStream *result_stream,
|
||||
break;
|
||||
}
|
||||
// As the transaction is done we can clear all the executions
|
||||
// NOTE: we cannot clear query_execution inside the Abort and Commit
|
||||
// methods as we will delete summary contained in them which we need
|
||||
// after our query finished executing.
|
||||
query_executions_.clear();
|
||||
} else {
|
||||
// We can only clear this execution as some of the queries
|
||||
|
Loading…
Reference in New Issue
Block a user