mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 20:51:00 +01:00
Merged R9105
This commit is contained in:
parent
00602dd20c
commit
dacf2e0e87
28 changed files with 503 additions and 502 deletions
|
|
@ -197,7 +197,8 @@ void Database::open2(const string & path, bool removeOldEnv)
|
|||
|
||||
env->set_errcall(errorPrinter);
|
||||
env->set_msgcall(messagePrinter);
|
||||
//env->set_verbose(DB_VERB_REGISTER, 1);
|
||||
if (getEnv("NIX_DEBUG_DB_REGISTER") == "1")
|
||||
env->set_verbose(DB_VERB_REGISTER, 1);
|
||||
env->set_verbose(DB_VERB_RECOVERY, 1);
|
||||
|
||||
/* Smaller log files. */
|
||||
|
|
@ -458,4 +459,14 @@ void Database::enumTable(const Transaction & txn, TableId table,
|
|||
|
||||
|
||||
|
||||
void Database::clearTable(const Transaction & txn, TableId table)
|
||||
{
|
||||
try {
|
||||
Db * db = getDb(table);
|
||||
u_int32_t count;
|
||||
db->truncate(txn.txn, &count, 0);
|
||||
} catch (DbException e) { rethrow(e); }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue