1
0
Fork 0

fixed invalid read

This commit is contained in:
jsteemann 2016-09-06 15:41:31 +02:00
parent 0970715708
commit aa64e86d72
1 changed files with 4 additions and 5 deletions

View File

@ -207,12 +207,11 @@ size_t State::removeConflicts(query_t const& transactions) {
<< _log.at(pos).term; << _log.at(pos).term;
// persisted logs // persisted logs
std::stringstream aql; std::string const aql(std::string("FOR l IN log FILTER l._key >= '") +
aql << "FOR l IN log FILTER l._key >= '" << stringify(idx) stringify(idx) + "' REMOVE l IN log");
<< "' REMOVE l IN log";
arangodb::aql::Query query(false, _vocbase, aql.str().c_str(), arangodb::aql::Query query(false, _vocbase, aql.c_str(),
aql.str().size(), bindVars, nullptr, aql.size(), bindVars, nullptr,
arangodb::aql::PART_MAIN); arangodb::aql::PART_MAIN);
auto queryResult = query.execute(_queryRegistry); auto queryResult = query.execute(_queryRegistry);