mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
Still need DB_AUTO_COMMIT flag
This commit is contained in:
parent
c37a3b37b8
commit
23d69c1d1f
@ -52,6 +52,7 @@ bdb_db_cache(
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int rc;
|
int rc;
|
||||||
|
int flags;
|
||||||
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
|
||||||
struct bdb_db_info *db;
|
struct bdb_db_info *db;
|
||||||
char *file;
|
char *file;
|
||||||
@ -111,9 +112,11 @@ bdb_db_cache(
|
|||||||
#ifdef HAVE_EBCDIC
|
#ifdef HAVE_EBCDIC
|
||||||
__atoe( file );
|
__atoe( file );
|
||||||
#endif
|
#endif
|
||||||
|
flags = bdb->bi_db_opflags | DB_CREATE | DB_THREAD;
|
||||||
|
if ( !tid ) flags |= DB_AUTO_COMMIT;
|
||||||
rc = DB_OPEN( db->bdi_db, tid,
|
rc = DB_OPEN( db->bdi_db, tid,
|
||||||
file, name,
|
file, name,
|
||||||
DB_HASH, bdb->bi_db_opflags | DB_CREATE | DB_THREAD,
|
DB_HASH, flags,
|
||||||
bdb->bi_dbenv_mode );
|
bdb->bi_dbenv_mode );
|
||||||
|
|
||||||
ch_free( file );
|
ch_free( file );
|
||||||
|
@ -384,14 +384,14 @@ bdb_db_open( BackendDB *be )
|
|||||||
path,
|
path,
|
||||||
/* bdbi_databases[i].name, */ NULL,
|
/* bdbi_databases[i].name, */ NULL,
|
||||||
bdbi_databases[i].type,
|
bdbi_databases[i].type,
|
||||||
bdbi_databases[i].flags | flags,
|
bdbi_databases[i].flags | flags | DB_AUTO_COMMIT,
|
||||||
bdb->bi_dbenv_mode );
|
bdb->bi_dbenv_mode );
|
||||||
#else
|
#else
|
||||||
rc = DB_OPEN( db->bdi_db, NULL,
|
rc = DB_OPEN( db->bdi_db, NULL,
|
||||||
bdbi_databases[i].file,
|
bdbi_databases[i].file,
|
||||||
/* bdbi_databases[i].name, */ NULL,
|
/* bdbi_databases[i].name, */ NULL,
|
||||||
bdbi_databases[i].type,
|
bdbi_databases[i].type,
|
||||||
bdbi_databases[i].flags | flags,
|
bdbi_databases[i].flags | flags | DB_AUTO_COMMIT,
|
||||||
bdb->bi_dbenv_mode );
|
bdb->bi_dbenv_mode );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user