Diff for /servers/slapd/back-bdb/cache.c between versions 1.38.2.17 and 1.38.2.18

version 1.38.2.17, 2005/04/16 18:56:05 version 1.38.2.18, 2005/06/23 21:00:19
Line 1 Line 1
 /* cache.c - routines to maintain an in-core cache of entries */  /* cache.c - routines to maintain an in-core cache of entries */
 /* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/cache.c,v 1.38.2.16 2005/01/20 18:56:58 hyc Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/cache.c,v 1.38.2.17 2005/04/16 18:56:05 hyc Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
  * Copyright 2000-2005 The OpenLDAP Foundation.   * Copyright 2000-2005 The OpenLDAP Foundation.
Line 37  static void bdb_lru_print(Cache *cache); Line 37  static void bdb_lru_print(Cache *cache);
   
 static int bdb_txn_get( Operation *op, DB_ENV *env, DB_TXN **txn, int reset );  static int bdb_txn_get( Operation *op, DB_ENV *env, DB_TXN **txn, int reset );
   
   /* 4.2.52 */
   #if DB_VERSION_FULL == 0x04020034
   #define READ_TXN_FLAG   ReadFlag
   static int ReadFlag = DB_TXN_NOT_DURABLE;
   #else
   #define READ_TXN_FLAG   0
   #endif
   
 static EntryInfo *  static EntryInfo *
 bdb_cache_entryinfo_new( Cache *cache )  bdb_cache_entryinfo_new( Cache *cache )
 {  {
Line 1211  bdb_txn_get( Operation *op, DB_ENV *env, Line 1219  bdb_txn_get( Operation *op, DB_ENV *env,
         if ( ldap_pvt_thread_pool_getkey( ctx, ((char *)env)+1, &data, NULL ) ||          if ( ldap_pvt_thread_pool_getkey( ctx, ((char *)env)+1, &data, NULL ) ||
                 data == NULL ) {                  data == NULL ) {
                 for ( i=0, rc=1; rc != 0 && i<4; i++ ) {                  for ( i=0, rc=1; rc != 0 && i<4; i++ ) {
                         rc = TXN_BEGIN( env, NULL, txn, 0 );                          rc = TXN_BEGIN( env, NULL, txn, READ_TXN_FLAG );
   #if DB_VERSION_FULL == 0x04020034
                           if ( rc == EINVAL && READ_TXN_FLAG ) {
                                   READ_TXN_FLAG = 0;
                                   Debug( LDAP_DEBUG_ANY,
                                           "bdb_txn_get: BerkeleyDB 4.2.52 library needs TXN patch!\n",
                                           0, 0, 0 );
                                   i--;
                                   continue;
                           }
   #endif
                         if (rc) ldap_pvt_thread_yield();                          if (rc) ldap_pvt_thread_yield();
                 }                  }
                 if ( rc != 0) {                  if ( rc != 0) {

Removed from v.1.38.2.17  
changed lines
  Added in v.1.38.2.18


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org