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;
// persisted logs
std::stringstream aql;
aql << "FOR l IN log FILTER l._key >= '" << stringify(idx)
<< "' REMOVE l IN log";
std::string const aql(std::string("FOR l IN log FILTER l._key >= '") +
stringify(idx) + "' REMOVE l IN log");
arangodb::aql::Query query(false, _vocbase, aql.str().c_str(),
aql.str().size(), bindVars, nullptr,
arangodb::aql::Query query(false, _vocbase, aql.c_str(),
aql.size(), bindVars, nullptr,
arangodb::aql::PART_MAIN);
auto queryResult = query.execute(_queryRegistry);