1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 20:51:00 +01:00

Merged R9105

This commit is contained in:
Wouter den Breejen 2007-10-08 11:58:34 +00:00
parent 00602dd20c
commit dacf2e0e87
28 changed files with 503 additions and 502 deletions

View file

@ -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); }
}
}