r23161: Add TDB_VOLATILE as open_flag to activate the per-hashchain dead record
[sfrench/samba-autobuild/.git] / source / lib / tdb / common / open.c
index c7fd3f66564795b05a410563e300cc224e4f9e2d..798395cba22704fb617f4dc0e239d92589813d5f 100644 (file)
@@ -165,6 +165,10 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
                tdb->page_size = 0x2000;
        }
 
+       if (open_flags & TDB_VOLATILE) {
+               tdb->max_dead_records = 5;
+       }
+
        if ((open_flags & O_ACCMODE) == O_WRONLY) {
                TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n",
                         name));