/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2000-2007 The OpenLDAP Foundation.
+ * Copyright 2000-2008 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
int bdb_dn2entry LDAP_P(( Operation *op, DB_TXN *tid,
struct berval *dn, EntryInfo **e, int matched,
- BDB_LOCKER locker, DB_LOCK *lock ));
+ DB_LOCK *lock ));
/*
* dn2id.c
int bdb_dn2id(
Operation *op,
- BDB_LOCKER locker,
struct berval *dn,
- EntryInfo *ei );
+ EntryInfo *ei,
+ DB_TXN *txn,
+ DB_LOCK *lock );
int bdb_dn2id_add(
Operation *op,
int bdb_dn2idl(
Operation *op,
- BDB_LOCKER locker,
+ DB_TXN *txn,
struct berval *ndn,
EntryInfo *ei,
ID *ids,
#ifdef BDB_HIER
#define bdb_dn2id_parent BDB_SYMBOL(dn2id_parent)
+#define bdb_dup_compare BDB_SYMBOL(dup_compare)
#define bdb_fix_dn BDB_SYMBOL(fix_dn)
int bdb_dn2id_parent(
Operation *op,
- BDB_LOCKER locker,
+ DB_TXN *txn,
EntryInfo *ei,
ID *idp );
+int bdb_dup_compare(
+ DB *db,
+ const DBT *usrkey,
+ const DBT *curkey );
+
int bdb_fix_dn( Entry *e, int checkit );
#endif
int bdb_filter_candidates(
Operation *op,
- BDB_LOCKER locker,
+ DB_TXN *txn,
Filter *f,
ID *ids,
ID *tmp,
int bdb_id2entry(
BackendDB *be,
DB_TXN *tid,
- BDB_LOCKER locker,
ID id,
Entry **e);
#endif
int bdb_idl_fetch_key(
BackendDB *be,
DB *db,
- BDB_LOCKER locker,
+ DB_TXN *txn,
DBT *key,
ID *ids,
DBC **saved_cursor,
bdb_key_read(
Backend *be,
DB *db,
- BDB_LOCKER locker,
+ DB_TXN *txn,
struct berval *k,
ID *ids,
DBC **saved_cursor,
#define bdb_next_id BDB_SYMBOL(next_id)
#define bdb_last_id BDB_SYMBOL(last_id)
-int bdb_next_id( BackendDB *be, DB_TXN *tid, ID *id );
+int bdb_next_id( BackendDB *be, ID *id );
int bdb_last_id( BackendDB *be, DB_TXN *tid );
/*
EntryInfo *pei,
Entry *e,
struct berval *nrdn,
- BDB_LOCKER locker,
+ DB_TXN *txn,
DB_LOCK *lock
);
int bdb_cache_modrdn(
struct berval *nrdn,
Entry *new,
EntryInfo *ein,
- BDB_LOCKER locker,
+ DB_TXN *txn,
DB_LOCK *lock
);
int bdb_cache_modify(
struct bdb_info *bdb,
Entry *e,
Attribute *newAttrs,
- BDB_LOCKER locker,
+ DB_TXN *txn,
DB_LOCK *lock
);
int bdb_cache_find_ndn(
Operation *op,
- BDB_LOCKER locker,
+ DB_TXN *txn,
struct berval *ndn,
EntryInfo **res
);
ID id,
EntryInfo **eip,
int flag,
- BDB_LOCKER locker,
DB_LOCK *lock
);
int
bdb_cache_find_parent(
Operation *op,
- BDB_LOCKER locker,
+ DB_TXN *txn,
ID id,
EntryInfo **res
);
int bdb_cache_delete(
struct bdb_info *bdb,
Entry *e,
- BDB_LOCKER locker,
+ DB_TXN *txn,
DB_LOCK *lock
);
void bdb_cache_delete_cleanup(
#define bdb_cache_entry_db_relock BDB_SYMBOL(cache_entry_db_relock)
int bdb_cache_entry_db_relock(
struct bdb_info *bdb,
- BDB_LOCKER locker,
+ DB_TXN *txn,
EntryInfo *ei,
int rw,
int tryOnly,
struct bdb_info *bdb,
DB_LOCK *lock );
-#ifdef BDB_REUSE_LOCKERS
-
-#define bdb_locker_id BDB_SYMBOL(locker_id)
-#define bdb_locker_flush BDB_SYMBOL(locker_flush)
-int bdb_locker_id( Operation *op, DB_ENV *env, BDB_LOCKER *locker );
-void bdb_locker_flush( DB_ENV *env );
-
-#define LOCK_ID_FREE(env, locker) ((void)0)
-#define LOCK_ID(env, locker) bdb_locker_id(op, env, locker)
-
-#else
-
-#define LOCK_ID_FREE(env, locker) XLOCK_ID_FREE(env, locker)
-#define LOCK_ID(env, locker) XLOCK_ID(env, locker)
-
-#endif
+#define bdb_reader_get BDB_SYMBOL(reader_get)
+#define bdb_reader_flush BDB_SYMBOL(reader_flush)
+int bdb_reader_get( Operation *op, DB_ENV *env, DB_TXN **txn );
+void bdb_reader_flush( DB_ENV *env );
/*
* trans.c