Create new Validations columns properly:

* Thread-safe preparation of Validations cleanup query
* Followup to RIPD-870
This commit is contained in:
Edward Hennis
2016-03-04 14:15:15 -05:00
parent 64d9f7c23e
commit a327cecee6
3 changed files with 38 additions and 9 deletions

View File

@@ -664,10 +664,10 @@ SHAMapStoreImp::clearPrior (LedgerIndex lastRotated)
<< deleteBatch << " rows.";
long long totalRowsAffected = 0;
long long rowsAffected;
soci::statement st = [&]
auto st = [&]
{
auto db = ledgerDb_->checkoutDb();
return (db->prepare << deleteQuery);
return soci::statement(db->prepare << deleteQuery);
}();
if (health())
return;