- /* read only databases don't do locking or clear if first */
- tdb->flags |= TDB1_NOLOCK;
- tdb->flags &= ~TDB1_CLEAR_IF_FIRST;
- }
-
- if ((tdb->flags & TDB1_ALLOW_NESTING) &&
- (tdb->flags & TDB1_DISALLOW_NESTING)) {
- tdb->ecode = TDB1_ERR_NESTING;
- TDB1_LOG((tdb, TDB1_DEBUG_FATAL, "tdb1_open_ex: "
- "allow_nesting and disallow_nesting are not allowed together!"));
- errno = EINVAL;
- goto fail;
- }
-
- if (getenv("TDB_NO_FSYNC")) {
- tdb->flags |= TDB1_NOSYNC;
- }
-
- /*
- * TDB1_ALLOW_NESTING is the default behavior.
- * Note: this may change in future versions!
- */
- if (!(tdb->flags & TDB1_DISALLOW_NESTING)) {
- tdb->flags |= TDB1_ALLOW_NESTING;