void *data),
void *log_data)
{
- union tdb_attribute cif, log, *attr = NULL;
+ union tdb_attribute cif, log, hash, *attr = NULL;
if (log_fn) {
log.log.base.attr = TDB_ATTRIBUTE_LOG;
tdb_flags &= ~TDB_CLEAR_IF_FIRST;
}
+ if (tdb_flags & TDB_INCOMPATIBLE_HASH) {
+ if (tdb_flags & TDB_VERSION1) {
+ hash.hash.base.attr = TDB_ATTRIBUTE_HASH;
+ hash.hash.base.next = attr;
+ hash.hash.fn = tdb1_incompatible_hash;
+ attr = &hash;
+ }
+ tdb_flags &= ~TDB_INCOMPATIBLE_HASH;
+ }
+
/* Testsuite uses this to speed things up. */
if (getenv("TDB_NO_FSYNC")) {
tdb_flags |= TDB_NOSYNC;
/* These no longer exist in tdb2. */
#define TDB_CLEAR_IF_FIRST 1048576
-#define TDB_INCOMPATIBLE_HASH 0
+#define TDB_INCOMPATIBLE_HASH 2097152
#define TDB_VOLATILE 0
/* tdb2 does nonblocking functions via attibutes. */