Fix typo, add Truncate support

This commit is contained in:
Howard Chu 2005-04-21 19:46:47 +00:00
parent 88cdbab5f4
commit 180d28dab7
2 changed files with 6 additions and 1 deletions

View File

@ -226,7 +226,7 @@ bdb_online_index( void *ctx, void *arg )
continue;
}
if ( rc == DB_NOTFOUND ) {
id++
id++;
getnext = 1;
continue;
}

View File

@ -124,6 +124,11 @@ bdb_db_cache(
if ( !( slapMode & SLAP_TOOL_QUICK ))
flags |= DB_AUTO_COMMIT;
#endif
/* Cannot Truncate when Transactions are in use */
if ( (slapMode & (SLAP_TOOL_QUICK|SLAP_TRUNCATE_MODE)) ==
(SLAP_TOOL_QUICK|SLAP_TRUNCATE_MODE))
flags |= DB_TRUNCATE;
rc = DB_OPEN( db->bdi_db,
file, NULL /* name */,
BDB_INDEXTYPE, bdb->bi_db_opflags | flags, bdb->bi_dbenv_mode );