mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 15:56:18 +02:00
* Ignore the result of sqlite3_reset().
This commit is contained in:
parent
7d0444e244
commit
e4720b1a79
1 changed files with 4 additions and 3 deletions
|
@ -66,8 +66,9 @@ void SQLiteStmt::create(sqlite3 * db, const string & s)
|
||||||
void SQLiteStmt::reset()
|
void SQLiteStmt::reset()
|
||||||
{
|
{
|
||||||
assert(stmt);
|
assert(stmt);
|
||||||
if (sqlite3_reset(stmt) != SQLITE_OK)
|
/* Note: sqlite3_reset() returns the error code for the most
|
||||||
throwSQLiteError(db, "resetting statement");
|
recent call to sqlite3_step(). So ignore it. */
|
||||||
|
sqlite3_reset(stmt);
|
||||||
curArg = 1;
|
curArg = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,7 +334,7 @@ void LocalStore::openDB(bool create)
|
||||||
/* Increase the auto-checkpoint interval to 8192 pages. This
|
/* Increase the auto-checkpoint interval to 8192 pages. This
|
||||||
seems enough to ensure that instantiating the NixOS system
|
seems enough to ensure that instantiating the NixOS system
|
||||||
derivation is done in a single fsync(). */
|
derivation is done in a single fsync(). */
|
||||||
if (sqlite3_exec(db, "pragma wal_autocheckpoint = 8192;", 0, 0, 0) != SQLITE_OK)
|
if (mode == "wal" && sqlite3_exec(db, "pragma wal_autocheckpoint = 8192;", 0, 0, 0) != SQLITE_OK)
|
||||||
throwSQLiteError(db, "setting autocheckpoint interval");
|
throwSQLiteError(db, "setting autocheckpoint interval");
|
||||||
|
|
||||||
/* Initialise the database schema, if necessary. */
|
/* Initialise the database schema, if necessary. */
|
||||||
|
|
Loading…
Reference in a new issue