]> git.sur5r.net Git - openldap/commitdiff
Don't set db_cachesize of memory pool is in use.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 24 May 1999 19:12:26 +0000 (19:12 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 24 May 1999 19:12:26 +0000 (19:12 +0000)
libraries/libldbm/ldbm.c

index 743e9b4cd864950d91fa06ee61b5ff6a6c9fd340..2dd71f683113e99c8d6537959be5fe89792d196a 100644 (file)
@@ -138,10 +138,15 @@ ldbm_open( char *name, int rw, int mode, int dbcachesize )
        DB_INFO dbinfo;
 
        memset( &dbinfo, 0, sizeof( dbinfo ));
-       dbinfo.db_cachesize = dbcachesize;
+
        dbinfo.db_pagesize  = DEFAULT_DB_PAGE_SIZE;
        dbinfo.db_malloc    = ldbm_malloc;
 
+       if( ldbm_Env.mp_info == NULL ) {
+               /* set a cachesize if we aren't using a memory pool */
+               dbinfo.db_cachesize = dbcachesize;
+       }
+
        LDBM_LOCK;
     (void) db_open( name, DB_TYPE, rw, mode, &ldbm_Env, &dbinfo, &ret );
        LDBM_UNLOCK;