Skip to content

Commit

Permalink
Merge pull request #872 from MonsieurNicolas/sociFix
Browse files Browse the repository at this point in the history
prepare statement soci fix

Reviewed-by: jedmccaleb
  • Loading branch information
latobarita committed Oct 21, 2015
2 parents f105538 + 54c018b commit 0a50758
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/soci/src/backends/sqlite3/statement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ sqlite3_statement_backend::bind_and_execute(int number)
statement_backend::exec_fetch_result retVal = ef_no_data;

long long rowsAffectedBulkTemp = 0;
rowsAffectedBulk_ = -1;

int const rows = static_cast<int>(useData_.size());
for (int row = 0; row < rows; ++row)
Expand Down
2 changes: 1 addition & 1 deletion src/database/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ Database::upgradeToCurrentSchema()
CLOG(INFO, "Database") << "Applying DB schema upgrade to version "
<< vers;
applySchemaUpgrade(*this, vers);
putSchemaVersion(vers);
}
assert(vers == SCHEMA_VERSION);
putSchemaVersion(SCHEMA_VERSION);
}

void
Expand Down
9 changes: 9 additions & 0 deletions src/main/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,15 @@ Config::load(std::string const& filename)
}
ARTIFICIALLY_SET_CLOSE_TIME_FOR_TESTING = (uint32_t)f;
}
else if (item.first == "ALLOW_LOCALHOST_FOR_TESTING")
{
if (!item.second->as<bool>())
{
throw std::invalid_argument(
"invalid ALLOW_LOCALHOST_FOR_TESTING");
}
ALLOW_LOCALHOST_FOR_TESTING = item.second->as<bool>()->value();
}
else if (item.first == "MANUAL_CLOSE")
{
if (!item.second->as<bool>())
Expand Down

0 comments on commit 0a50758

Please sign in to comment.