rpms/compat-db/devel patch.4.1.25.1, NONE, 1.1 patch.4.1.25.2, NONE, 1.1 patch.4.1.25.3, NONE, 1.1 patch.4.2.52.1, 1.2, 1.3 patch.4.2.52.2, 1.2, 1.3 patch.4.2.52.3, 1.2, 1.3 patch.4.2.52.4, 1.2, 1.3 patch.4.2.52.5, 1.2, 1.3 patch.4.3.29.1, 1.2, 1.3 .cvsignore, 1.14, 1.15 compat-db.spec, 1.36, 1.37 sources, 1.15, 1.16

Jindrich Novy jnovy at fedoraproject.org
Thu Nov 13 16:59:24 UTC 2008


Author: jnovy

Update of /cvs/pkgs/rpms/compat-db/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30230

Modified Files:
	.cvsignore compat-db.spec sources 
Added Files:
	patch.4.1.25.1 patch.4.1.25.2 patch.4.1.25.3 patch.4.2.52.1 
	patch.4.2.52.2 patch.4.2.52.3 patch.4.2.52.4 patch.4.2.52.5 
	patch.4.3.29.1 
Log Message:
* Wed Nov 12 2008 Jindrich Novy <jnovy at redhat.com> 4.6.21-6
- add old BDBs 4.3.29, 4.2.52, 4.1.25 for third party software compatibility



--- NEW FILE patch.4.1.25.1 ---
*** fileops/fop_util.c	8 Jan 2003 05:01:56 -0000	1.57
--- fileops/fop_util.c	12 Jan 2003 19:44:29 -0000	1.58
***************
*** 40,46 ****
  	u_int32_t __lockval;						\
  									\
  	if (LOCKING_ON((ENV))) {					\
! 		__lockval = 0;						\
  		__dbt.data = &__lockval;				\
  		__dbt.size = sizeof(__lockval);				\
  		if ((ret = (ENV)->lock_get((ENV), (ID),			\
--- 40,46 ----
  	u_int32_t __lockval;						\
  									\
  	if (LOCKING_ON((ENV))) {					\
! 		__lockval = 1;						\
  		__dbt.data = &__lockval;				\
  		__dbt.size = sizeof(__lockval);				\
  		if ((ret = (ENV)->lock_get((ENV), (ID),			\



--- NEW FILE patch.4.1.25.2 ---
*** dbinc/mp.h.orig	2004-02-02 10:24:53.000000000 -0800
--- dbinc/mp.h	2004-02-02 10:26:27.000000000 -0800
***************
*** 149,154 ****
--- 149,161 ----
  	 * region lock).
  	 */
  	DB_MPOOL_STAT stat;		/* Per-cache mpool statistics. */
+  
+ 	 /*
+ 	  * We track page puts so that we can decide when allocation is never
+ 	  * going to succeed.  We don't lock the field, all we care about is
+ 	  * if it changes.
+ 	  */
+ 	 u_int32_t  put_counter;                /* Count of page put calls. */
  };
  
  struct __db_mpool_hash {
*** mp/mp_fput.c.orig	2002-08-13 06:26:41.000000000 -0700
--- mp/mp_fput.c	2004-02-02 10:22:35.000000000 -0800
***************
*** 19,24 ****
--- 19,26 ----
  #include "dbinc/db_shash.h"
  #include "dbinc/mp.h"
  
+ static void __memp_reset_lru __P((DB_ENV *, REGINFO *));
+ 
  /*
   * __memp_fput --
   *	Mpool file put function.
***************
*** 198,202 ****
--- 200,255 ----
  
  	MUTEX_UNLOCK(dbenv, &hp->hash_mutex);
  
+ 	/*
+ 	 * On every buffer put we update the buffer generation number and check
+ 	 * for wraparound.
+ 	 */
+ 	if (++c_mp->lru_count == UINT32_T_MAX)
+ 		__memp_reset_lru(dbenv, dbmp->reginfo);
+ 
  	return (0);
  }
+ 
+ /*
+  * __memp_reset_lru --
+  *	Reset the cache LRU counter.
+  */
+ static void
+ __memp_reset_lru(dbenv, memreg)
+ 	DB_ENV *dbenv;
+ 	REGINFO *memreg;
+ {
+ 	BH *bhp;
+ 	DB_MPOOL_HASH *hp;
+ 	MPOOL *c_mp;
+ 	int bucket;
+ 
+ 	c_mp = memreg->primary;
+ 
+ 	/*
+ 	 * Update the counter so all future allocations will start at the
+ 	 * bottom.
+ 	 */
+ 	c_mp->lru_count -= MPOOL_BASE_DECREMENT;
+ 
+ 	/* Adjust the priority of every buffer in the system. */
+ 	for (hp = R_ADDR(memreg, c_mp->htab),
+ 	    bucket = 0; bucket < c_mp->htab_buckets; ++hp, ++bucket) {
+ 		/*
+ 		 * Skip empty buckets.
+ 		 *
+ 		 * We can check for empty buckets before locking as we
+ 		 * only care if the pointer is zero or non-zero.
+ 		 */
+ 		if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) == NULL)
+ 			continue;
+ 
+ 		MUTEX_LOCK(dbenv, &hp->hash_mutex);
+ 		for (bhp = SH_TAILQ_FIRST(&hp->hash_bucket, __bh);
+ 		    bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, hq, __bh))
+ 			if (bhp->priority != UINT32_T_MAX &&
+ 			    bhp->priority > MPOOL_BASE_DECREMENT)
+ 				bhp->priority -= MPOOL_BASE_DECREMENT;
+ 		MUTEX_UNLOCK(dbenv, &hp->hash_mutex);
+ 	}
+ }
*** mp/mp_alloc.c.orig	2002-08-17 07:23:25.000000000 -0700
--- mp/mp_alloc.c	2004-02-02 10:28:15.000000000 -0800
***************
*** 25,31 ****
  } HS;
  
  static void __memp_bad_buffer __P((DB_MPOOL_HASH *));
- static void __memp_reset_lru __P((DB_ENV *, REGINFO *, MPOOL *));
  
  /*
   * __memp_alloc --
--- 25,30 ----
***************
*** 50,57 ****
  	MPOOL *c_mp;
  	MPOOLFILE *bh_mfp;
  	size_t freed_space;
! 	u_int32_t buckets, buffers, high_priority, max_na, priority;
! 	int aggressive, ret;
  	void *p;
  
  	dbenv = dbmp->dbenv;
--- 49,57 ----
  	MPOOL *c_mp;
  	MPOOLFILE *bh_mfp;
  	size_t freed_space;
! 	u_int32_t buckets, buffers, high_priority, priority, put_counter;
! 	u_int32_t total_buckets;
! 	int aggressive, giveup, ret;
  	void *p;
  
  	dbenv = dbmp->dbenv;
***************
*** 59,76 ****
  	dbht = R_ADDR(memreg, c_mp->htab);
  	hp_end = &dbht[c_mp->htab_buckets];
  
! 	buckets = buffers = 0;
! 	aggressive = 0;
  
  	c_mp->stat.st_alloc++;
  
  	/*
- 	 * Get aggressive if we've tried to flush the number of pages as are
- 	 * in the system without finding space.
- 	 */
- 	max_na = 5 * c_mp->htab_buckets;
- 
- 	/*
  	 * If we're allocating a buffer, and the one we're discarding is the
  	 * same size, we don't want to waste the time to re-integrate it into
  	 * the shared memory free list.  If the DB_MPOOLFILE argument isn't
--- 59,71 ----
  	dbht = R_ADDR(memreg, c_mp->htab);
  	hp_end = &dbht[c_mp->htab_buckets];
  
! 	buckets = buffers = put_counter = total_buckets = 0;
! 	aggressive = giveup = 0;
! 	hp_tmp = NULL;
  
  	c_mp->stat.st_alloc++;
  
  	/*
  	 * If we're allocating a buffer, and the one we're discarding is the
  	 * same size, we don't want to waste the time to re-integrate it into
  	 * the shared memory free list.  If the DB_MPOOLFILE argument isn't
***************
*** 81,99 ****
  		len = (sizeof(BH) - sizeof(u_int8_t)) + mfp->stat.st_pagesize;
  
  	R_LOCK(dbenv, memreg);
- 
- 	/*
- 	 * On every buffer allocation we update the buffer generation number
- 	 * and check for wraparound.
- 	 */
- 	if (++c_mp->lru_count == UINT32_T_MAX)
- 		__memp_reset_lru(dbenv, memreg, c_mp);
- 
  	/*
  	 * Anything newer than 1/10th of the buffer pool is ignored during
  	 * allocation (unless allocation starts failing).
  	 */
- 	DB_ASSERT(c_mp->lru_count > c_mp->stat.st_pages / 10);
  	high_priority = c_mp->lru_count - c_mp->stat.st_pages / 10;
  
  	/*
--- 76,85 ----
***************
*** 120,129 ****
  		 * We're not holding the region locked here, these statistics
  		 * can't be trusted.
  		 */
! 		if (buckets != 0) {
! 			if (buckets > c_mp->stat.st_alloc_max_buckets)
! 				c_mp->stat.st_alloc_max_buckets = buckets;
! 			c_mp->stat.st_alloc_buckets += buckets;
  		}
  		if (buffers != 0) {
  			if (buffers > c_mp->stat.st_alloc_max_pages)
--- 106,116 ----
  		 * We're not holding the region locked here, these statistics
  		 * can't be trusted.
  		 */
! 		total_buckets += buckets;
! 		if (total_buckets != 0) {
! 			if (total_buckets > c_mp->stat.st_alloc_max_buckets)
! 				c_mp->stat.st_alloc_max_buckets = total_buckets;
! 			c_mp->stat.st_alloc_buckets += total_buckets;
  		}
  		if (buffers != 0) {
  			if (buffers > c_mp->stat.st_alloc_max_pages)
***************
*** 131,136 ****
--- 118,129 ----
  			c_mp->stat.st_alloc_pages += buffers;
  		}
  		return (0);
+ 	} else if (giveup || c_mp->stat.st_pages == 0) {
+ 		R_UNLOCK(dbenv, memreg);
+ 
+ 		__db_err(dbenv,
+ 		    "unable to allocate space from the buffer cache");
+ 		return (ret);
  	}
  
  	/*
***************
*** 138,163 ****
  	 * we need.  Reset our free-space counter.
  	 */
  	freed_space = 0;
  
  	/*
  	 * Walk the hash buckets and find the next two with potentially useful
  	 * buffers.  Free the buffer with the lowest priority from the buckets'
  	 * chains.
  	 */
! 	for (hp_tmp = NULL;;) {
  		/* Check for wrap around. */
  		hp = &dbht[c_mp->last_checked++];
  		if (hp >= hp_end) {
  			c_mp->last_checked = 0;
! 
! 			/*
! 			 * If we've gone through all of the hash buckets, try
! 			 * an allocation.  If the cache is small, the old page
! 			 * size is small, and the new page size is large, we
! 			 * might have freed enough memory (but not 3 times the
! 			 * memory).
! 			 */
! 			goto alloc;
  		}
  
  		/*
--- 131,154 ----
  	 * we need.  Reset our free-space counter.
  	 */
  	freed_space = 0;
+ 	total_buckets += buckets;
+ 	buckets = 0;
  
  	/*
  	 * Walk the hash buckets and find the next two with potentially useful
  	 * buffers.  Free the buffer with the lowest priority from the buckets'
  	 * chains.
  	 */
! 	for (;;) {
! 		/* All pages have been freed, make one last try */
! 		if (c_mp->stat.st_pages == 0)
! 			goto alloc;
! 
  		/* Check for wrap around. */
  		hp = &dbht[c_mp->last_checked++];
  		if (hp >= hp_end) {
  			c_mp->last_checked = 0;
! 			hp = &dbht[c_mp->last_checked++];
  		}
  
  		/*
***************
*** 172,210 ****
  		/*
  		 * The failure mode is when there are too many buffers we can't
  		 * write or there's not enough memory in the system.  We don't
! 		 * have a metric for deciding if allocation has no possible way
! 		 * to succeed, so we don't ever fail, we assume memory will be
! 		 * available if we wait long enough.
  		 *
! 		 * Get aggressive if we've tried to flush 5 times the number of
! 		 * hash buckets as are in the system -- it's possible we have
! 		 * been repeatedly trying to flush the same buffers, although
! 		 * it's unlikely.  Aggressive means:
  		 *
  		 * a: set a flag to attempt to flush high priority buffers as
  		 *    well as other buffers.
  		 * b: sync the mpool to force out queue extent pages.  While we
  		 *    might not have enough space for what we want and flushing
  		 *    is expensive, why not?
! 		 * c: sleep for a second -- hopefully someone else will run and
! 		 *    free up some memory.  Try to allocate memory too, in case
! 		 *    the other thread returns its memory to the region.
! 		 * d: look at a buffer in every hash bucket rather than choose
  		 *    the more preferable of two.
  		 *
  		 * !!!
  		 * This test ignores pathological cases like no buffers in the
  		 * system -- that shouldn't be possible.
  		 */
! 		if ((++buckets % max_na) == 0) {
! 			aggressive = 1;
! 
  			R_UNLOCK(dbenv, memreg);
  
! 			(void)__memp_sync_int(
! 			    dbenv, NULL, 0, DB_SYNC_ALLOC, NULL);
! 
! 			(void)__os_sleep(dbenv, 1, 0);
  
  			R_LOCK(dbenv, memreg);
  			goto alloc;
--- 163,221 ----
  		/*
  		 * The failure mode is when there are too many buffers we can't
  		 * write or there's not enough memory in the system.  We don't
! 		 * have a way to know that allocation has no way to succeed.
! 		 * We fail if there were no pages returned to the cache after
! 		 * we've been trying for a relatively long time.
  		 *
! 		 * Get aggressive if we've tried to flush the number of hash
! 		 * buckets as are in the system and have not found any more
! 		 * space.  Aggressive means:
  		 *
  		 * a: set a flag to attempt to flush high priority buffers as
  		 *    well as other buffers.
  		 * b: sync the mpool to force out queue extent pages.  While we
  		 *    might not have enough space for what we want and flushing
  		 *    is expensive, why not?
! 		 * c: look at a buffer in every hash bucket rather than choose
  		 *    the more preferable of two.
+ 		 * d: start to think about giving up.
+ 		 *
+ 		 * If we get here twice, sleep for a second, hopefully someone
+ 		 * else will run and free up some memory.
+ 		 *
+ 		 * Always try to allocate memory too, in case some other thread
+ 		 * returns its memory to the region.
  		 *
  		 * !!!
  		 * This test ignores pathological cases like no buffers in the
  		 * system -- that shouldn't be possible.
  		 */
! 		if ((++buckets % c_mp->htab_buckets) == 0) {
! 			if (freed_space > 0)
! 				goto alloc;
  			R_UNLOCK(dbenv, memreg);
  
! 			switch (++aggressive) {
! 			case 1:
! 				break;
! 			case 2:
! 				put_counter = c_mp->put_counter;
! 				/* FALLTHROUGH */
! 			case 3:
! 			case 4:
! 			case 5:
! 			case 6:
! 				(void)__memp_sync_int(
! 				    dbenv, NULL, 0, DB_SYNC_ALLOC, NULL);
! 
! 				(void)__os_sleep(dbenv, 1, 0);
! 				break;
! 			default:
! 				aggressive = 1;
! 				if (put_counter == c_mp->put_counter)
! 					giveup = 1;
! 				break;
! 			}
  
  			R_LOCK(dbenv, memreg);
  			goto alloc;
***************
*** 277,283 ****
  		 * thread may have acquired this buffer and incremented the ref
  		 * count after we wrote it, in which case we can't have it.
  		 *
! 		 * If there's a write error, avoid selecting this buffer again
  		 * by making it the bucket's least-desirable buffer.
  		 */
  		if (ret != 0 || bhp->ref != 0) {
--- 288,295 ----
  		 * thread may have acquired this buffer and incremented the ref
  		 * count after we wrote it, in which case we can't have it.
  		 *
! 		 * If there's a write error and we're having problems finding
! 		 * something to allocate, avoid selecting this buffer again
  		 * by making it the bucket's least-desirable buffer.
  		 */
  		if (ret != 0 || bhp->ref != 0) {
***************
*** 301,306 ****
--- 313,320 ----
  
  		freed_space += __db_shsizeof(bhp);
  		__memp_bhfree(dbmp, hp, bhp, 1);
+ 		if (aggressive > 1)
+ 			aggressive = 1;
  
  		/*
  		 * Unlock this hash bucket and re-acquire the region lock. If
***************
*** 362,415 ****
  	hp->hash_priority = SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
  }
  
- /*
-  * __memp_reset_lru --
-  *	Reset the cache LRU counter.
-  */
- static void
- __memp_reset_lru(dbenv, memreg, c_mp)
- 	DB_ENV *dbenv;
- 	REGINFO *memreg;
- 	MPOOL *c_mp;
- {
- 	BH *bhp;
- 	DB_MPOOL_HASH *hp;
- 	int bucket;
- 
- 	/*
- 	 * Update the counter so all future allocations will start at the
- 	 * bottom.
- 	 */
- 	c_mp->lru_count -= MPOOL_BASE_DECREMENT;
- 
- 	/* Release the region lock. */
- 	R_UNLOCK(dbenv, memreg);
- 
- 	/* Adjust the priority of every buffer in the system. */
- 	for (hp = R_ADDR(memreg, c_mp->htab),
- 	    bucket = 0; bucket < c_mp->htab_buckets; ++hp, ++bucket) {
- 		/*
- 		 * Skip empty buckets.
- 		 *
- 		 * We can check for empty buckets before locking as we
- 		 * only care if the pointer is zero or non-zero.
- 		 */
- 		if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) == NULL)
- 			continue;
- 
- 		MUTEX_LOCK(dbenv, &hp->hash_mutex);
- 		for (bhp = SH_TAILQ_FIRST(&hp->hash_bucket, __bh);
- 		    bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, hq, __bh))
- 			if (bhp->priority != UINT32_T_MAX &&
- 			    bhp->priority > MPOOL_BASE_DECREMENT)
- 				bhp->priority -= MPOOL_BASE_DECREMENT;
- 		MUTEX_UNLOCK(dbenv, &hp->hash_mutex);
- 	}
- 
- 	/* Reacquire the region lock. */
- 	R_LOCK(dbenv, memreg);
- }
- 
  #ifdef DIAGNOSTIC
  /*
   * __memp_check_order --
--- 376,381 ----
*** dbreg/dbreg_rec.c.orig	2002-08-17 07:22:52.000000000 -0700
--- dbreg/dbreg_rec.c	2003-11-08 10:59:19.000000000 -0800
***************
*** 174,192 ****
  			 * Typically, closes should match an open which means
  			 * that if this is a close, there should be a valid
  			 * entry in the dbentry table when we get here,
! 			 * however there is an exception.  If this is an
  			 * OPENFILES pass, then we may have started from
  			 * a log file other than the first, and the
  			 * corresponding open appears in an earlier file.
! 			 * We can ignore that case, but all others are errors.
  			 */
  			dbe = &dblp->dbentry[argp->fileid];
  			if (dbe->dbp == NULL && !dbe->deleted) {
  				/* No valid entry here. */
! 				if ((argp->opcode != LOG_CLOSE &&
! 				    argp->opcode != LOG_RCLOSE) ||
! 				    (op != DB_TXN_OPENFILES &&
! 				    op !=DB_TXN_POPENFILES)) {
  					__db_err(dbenv,
  					    "Improper file close at %lu/%lu",
  					    (u_long)lsnp->file,
--- 174,193 ----
  			 * Typically, closes should match an open which means
  			 * that if this is a close, there should be a valid
  			 * entry in the dbentry table when we get here,
! 			 * however there are exceptions.  1. If this is an
  			 * OPENFILES pass, then we may have started from
  			 * a log file other than the first, and the
  			 * corresponding open appears in an earlier file.
! 			 * 2. If we are undoing an open on an abort or
! 			 * recovery, it's possible that we failed after
! 			 * the log record, but before we actually entered
! 			 * a handle here.
  			 */
  			dbe = &dblp->dbentry[argp->fileid];
  			if (dbe->dbp == NULL && !dbe->deleted) {
  				/* No valid entry here. */
! 				if (DB_REDO(op) ||
! 				    argp->opcode == LOG_CHECKPOINT) {
  					__db_err(dbenv,
  					    "Improper file close at %lu/%lu",
  					    (u_long)lsnp->file,
*** env/env_recover.c.orig.1	2002-08-22 14:52:51.000000000 -0700
--- env/env_recover.c	2003-11-15 08:20:59.000000000 -0800
***************
*** 232,243 ****
  	 * we'll still need to do a vtruncate based on information we haven't
  	 * yet collected.
  	 */
! 	if (ret == DB_NOTFOUND) {
  		ret = 0;
! 		if (max_lsn == NULL)
! 			goto done;
! 	}
! 	if (ret != 0)
  		goto err;
  
  	hi_txn = txnid;
--- 232,240 ----
  	 * we'll still need to do a vtruncate based on information we haven't
  	 * yet collected.
  	 */
! 	if (ret == DB_NOTFOUND) 
  		ret = 0;
! 	else if (ret != 0)
  		goto err;
  
  	hi_txn = txnid;
***************
*** 331,337 ****
  
  	/* Find a low txnid. */
  	ret = 0;
! 	do {
  		/* txnid is after rectype, which is a u_int32. */
  		memcpy(&txnid,
  		    (u_int8_t *)data.data + sizeof(u_int32_t), sizeof(txnid));
--- 328,334 ----
  
  	/* Find a low txnid. */
  	ret = 0;
! 	if (hi_txn != 0) do {
  		/* txnid is after rectype, which is a u_int32. */
  		memcpy(&txnid,
  		    (u_int8_t *)data.data + sizeof(u_int32_t), sizeof(txnid));
***************
*** 344,354 ****
  	 * There are no transactions and we're not recovering to an LSN (see
  	 * above), so there is nothing to do.
  	 */
! 	if (ret == DB_NOTFOUND) {
  		ret = 0;
- 		if (max_lsn == NULL)
- 			goto done;
- 	}
  
  	/* Reset to the first lsn. */
  	if (ret != 0 || (ret = logc->get(logc, &first_lsn, &data, DB_SET)) != 0)
--- 341,348 ----
  	 * There are no transactions and we're not recovering to an LSN (see
  	 * above), so there is nothing to do.
  	 */
! 	if (ret == DB_NOTFOUND) 
  		ret = 0;
  
  	/* Reset to the first lsn. */
  	if (ret != 0 || (ret = logc->get(logc, &first_lsn, &data, DB_SET)) != 0)
***************
*** 367,372 ****
--- 361,370 ----
  	    txninfo, &data, &first_lsn, &last_lsn, nfiles, 1)) != 0)
  		goto err;
  
+ 	/* If there were no transactions, then we can bail out early. */
+ 	if (hi_txn == 0 && max_lsn == NULL)
+ 		goto done;
+ 		
  	/*
  	 * Pass #2.
  	 *
***************
*** 483,488 ****
--- 481,487 ----
  	if ((ret = __dbreg_close_files(dbenv)) != 0)
  		goto err;
  
+ done:
  	if (max_lsn != NULL) {
  		region->last_ckp = ((DB_TXNHEAD *)txninfo)->ckplsn;
  
***************
*** 538,544 ****
  		__db_err(dbenv, "Recovery complete at %.24s", ctime(&now));
  		__db_err(dbenv, "%s %lx %s [%lu][%lu]",
  		    "Maximum transaction ID",
! 		    ((DB_TXNHEAD *)txninfo)->maxid,
  		    "Recovery checkpoint",
  		    (u_long)region->last_ckp.file,
  		    (u_long)region->last_ckp.offset);
--- 537,544 ----
  		__db_err(dbenv, "Recovery complete at %.24s", ctime(&now));
  		__db_err(dbenv, "%s %lx %s [%lu][%lu]",
  		    "Maximum transaction ID",
! 		    txninfo == NULL ? TXN_MINIMUM :
! 			((DB_TXNHEAD *)txninfo)->maxid,
  		    "Recovery checkpoint",
  		    (u_long)region->last_ckp.file,
  		    (u_long)region->last_ckp.offset);
***************
*** 550,556 ****
  		    (u_long)lsn.file, (u_long)lsn.offset, pass);
  	}
  
- done:
  err:	if (lockid != DB_LOCK_INVALIDID) {
  		if ((t_ret = __rep_unlockpages(dbenv, lockid)) != 0 && ret == 0)
  			ret = t_ret;
--- 550,555 ----


--- NEW FILE patch.4.1.25.3 ---
*** mp/mp_fget.c.orig	2002-08-07 08:23:01.000000000 -0700
--- mp/mp_fget.c	2006-05-30 20:32:20.000000000 -0700
***************
*** 506,513 ****
  	 */
  	if (state != SECOND_MISS && bhp->ref == 1) {
  		bhp->priority = UINT32_T_MAX;
! 		SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
! 		SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
  		hp->hash_priority =
  		    SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
  	}
--- 506,517 ----
  	 */
  	if (state != SECOND_MISS && bhp->ref == 1) {
  		bhp->priority = UINT32_T_MAX;
! 		/* Move the buffer if there are others in the bucket. */
! 		if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) != bhp
! 		    || SH_TAILQ_NEXT(bhp, hq, __bh) != NULL) {
! 			SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
! 			SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
! 		}
  		hp->hash_priority =
  		    SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
  	}
*** mp/mp_fput.c.orig	2002-08-13 06:26:41.000000000 -0700
--- mp/mp_fput.c	2006-05-30 20:55:11.000000000 -0700
***************
*** 166,171 ****
--- 166,176 ----
  	 * to the correct position in the list.
  	 */
  	argbhp = bhp;
+ 	/* Move the buffer if there are others in the bucket. */
+ 	if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) == bhp
+ 	    && SH_TAILQ_NEXT(bhp, hq, __bh) != NULL)
+ 	    	goto done;
+ 
  	SH_TAILQ_REMOVE(&hp->hash_bucket, argbhp, hq, __bh);
  
  	prev = NULL;
***************
*** 178,183 ****
--- 183,189 ----
  	else
  		SH_TAILQ_INSERT_AFTER(&hp->hash_bucket, prev, argbhp, hq, __bh);
  
+ done:
  	/* Reset the hash bucket's priority. */
  	hp->hash_priority = SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;


Index: patch.4.2.52.1
===================================================================
RCS file: patch.4.2.52.1
diff -N patch.4.2.52.1
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patch.4.2.52.1	13 Nov 2008 16:58:53 -0000	1.3
@@ -0,0 +1,36 @@
+*** mp/mp_fget.c.orig	25 Sep 2003 02:15:16 -0000	11.81
+--- mp/mp_fget.c	9 Dec 2003 19:06:28 -0000	11.82
+***************
+*** 440,446 ****
+  		c_mp->stat.st_pages--;
+  		alloc_bhp = NULL;
+  		R_UNLOCK(dbenv, &dbmp->reginfo[n_cache]);
+- 		MUTEX_LOCK(dbenv, &hp->hash_mutex);
+  
+  		/*
+  		 * We can't use the page we found in the pool if DB_MPOOL_NEW
+--- 440,445 ----
+***************
+*** 455,460 ****
+--- 454,462 ----
+  			b_incr = 0;
+  			goto alloc;
+  		}
++ 
++ 		/* We can use the page -- get the bucket lock. */
++ 		MUTEX_LOCK(dbenv, &hp->hash_mutex);
+  		break;
+  	case SECOND_MISS:
+  		/*
+*** mp/mp_fput.c.orig	30 Sep 2003 17:12:00 -0000	11.48
+--- mp/mp_fput.c	13 Dec 2003 00:08:29 -0000	11.49
+***************
+*** 285,290 ****
+--- 285,291 ----
+  		    bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, hq, __bh))
+  			if (bhp->priority != UINT32_T_MAX &&
+  			    bhp->priority > MPOOL_BASE_DECREMENT)
++ 				bhp->priority -= MPOOL_BASE_DECREMENT;
+  		MUTEX_UNLOCK(dbenv, &hp->hash_mutex);
+  	}
+  }


Index: patch.4.2.52.2
===================================================================
RCS file: patch.4.2.52.2
diff -N patch.4.2.52.2
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patch.4.2.52.2	13 Nov 2008 16:58:53 -0000	1.3
@@ -0,0 +1,45 @@
+*** lock/lock.c.save	2004-01-30 10:48:33.000000000 -0800
+--- lock/lock.c	2004-01-30 10:55:58.000000000 -0800
+***************
+*** 2216,2226 ****
+  					dp = (u_int8_t *)dp +		\
+  					    sizeof(db_pgno_t);		\
+  				} while (0)
+! #define COPY_OBJ(dp, obj)	do {					   \
+! 					memcpy(dp, obj->data, obj->size);  \
+! 					dp = (u_int8_t *)dp +		   \
+! 					     ALIGN(obj->size,		   \
+! 					     sizeof(u_int32_t)); 	   \
+  				} while (0)
+  
+  #define GET_COUNT(dp, count)	do {					\
+--- 2216,2227 ----
+  					dp = (u_int8_t *)dp +		\
+  					    sizeof(db_pgno_t);		\
+  				} while (0)
+! #define COPY_OBJ(dp, obj)	do {					\
+! 					memcpy(dp,			\
+! 					    (obj)->data, (obj)->size);  \
+! 					dp = (u_int8_t *)dp +		\
+! 					     ALIGN((obj)->size,		\
+! 					    sizeof(u_int32_t)); 	\
+  				} while (0)
+  
+  #define GET_COUNT(dp, count)	do {					\
+***************
+*** 2339,2345 ****
+  		for (i = 0; i < nlocks; i = j) {
+  			PUT_PCOUNT(dp, obj[i].ulen);
+  			PUT_SIZE(dp, obj[i].size);
+! 			COPY_OBJ(dp, obj);
+  			lock = (DB_LOCK_ILOCK *)obj[i].data;
+  			for (j = i + 1; j <= i + obj[i].ulen; j++) {
+  				lock = (DB_LOCK_ILOCK *)obj[j].data;
+--- 2340,2346 ----
+  		for (i = 0; i < nlocks; i = j) {
+  			PUT_PCOUNT(dp, obj[i].ulen);
+  			PUT_SIZE(dp, obj[i].size);
+! 			COPY_OBJ(dp, &obj[i]);
+  			lock = (DB_LOCK_ILOCK *)obj[i].data;
+  			for (j = i + 1; j <= i + obj[i].ulen; j++) {
+  				lock = (DB_LOCK_ILOCK *)obj[j].data;


Index: patch.4.2.52.3
===================================================================
RCS file: patch.4.2.52.3
diff -N patch.4.2.52.3
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patch.4.2.52.3	13 Nov 2008 16:58:53 -0000	1.3
@@ -0,0 +1,247 @@
+--- java/src/com/sleepycat/db/DbEnv.java	2003-12-03 16:26:27.000000000 -0500
++++ java/src/com/sleepycat/db/DbEnv.java	2004-03-18 15:15:42.000000000 -0500
+@@ -61,7 +61,7 @@
+     // Internally, the JNI layer creates a global reference to each DbEnv,
+     // which can potentially be different to this.  We keep a copy here so
+     // we can clean up after destructors.
+-    private Object dbenv_ref;
++    private long dbenv_ref;
+     private DbAppDispatch app_dispatch_handler;
+     private DbEnvFeedbackHandler env_feedback_handler;
+     private DbErrorHandler error_handler;
+@@ -94,7 +94,7 @@
+     void cleanup() {
+         swigCPtr = 0;
+         db_java.deleteRef0(dbenv_ref);
+-        dbenv_ref = null;
++        dbenv_ref = 0L;
+     }
+ 
+ 
+--- java/src/com/sleepycat/db/Db.java	2003-12-03 16:26:25.000000000 -0500
++++ java/src/com/sleepycat/db/Db.java	2004-03-18 15:15:55.000000000 -0500
+@@ -57,7 +57,7 @@
+     // Internally, the JNI layer creates a global reference to each Db,
+     // which can potentially be different to this.  We keep a copy here so
+     // we can clean up after destructors.
+-    private Object db_ref;
++    private long db_ref;
+     private DbEnv dbenv;
+     private boolean private_dbenv;
+     private DbAppendRecno append_recno_handler;
+@@ -84,7 +84,7 @@
+     private void cleanup() {
+         swigCPtr = 0;
+         db_java.deleteRef0(db_ref);
+-        db_ref = null;
++        db_ref = 0L;
+         if (private_dbenv) {
+             dbenv.cleanup();
+         }
+--- java/src/com/sleepycat/db/db_java.java	2003-12-03 16:10:54.000000000 -0500
++++ java/src/com/sleepycat/db/db_java.java	2004-03-18 15:17:24.000000000 -0500
+@@ -14,15 +14,15 @@
+     db_javaJNI.DbEnv_lock_vec(DbEnv.getCPtr(dbenv), locker, flags, list, offset, nlist);
+   }
+ 
+-   static Object initDbEnvRef0(DbEnv self, Object handle) {
++   static long initDbEnvRef0(DbEnv self, Object handle) {
+     return db_javaJNI.initDbEnvRef0(DbEnv.getCPtr(self), handle);
+   }
+ 
+-   static Object initDbRef0(Db self, Object handle) {
++   static long initDbRef0(Db self, Object handle) {
+     return db_javaJNI.initDbRef0(Db.getCPtr(self), handle);
+   }
+ 
+-   static void deleteRef0(Object ref) {
++   static void deleteRef0(long ref) {
+     db_javaJNI.deleteRef0(ref);
+   }
+ 
+--- java/src/com/sleepycat/db/db_javaJNI.java	2003-12-03 16:10:55.000000000 -0500
++++ java/src/com/sleepycat/db/db_javaJNI.java	2004-03-18 15:16:18.000000000 -0500
+@@ -45,9 +45,9 @@
+ 	static native final void initialize();
+ 
+   public final static native void DbEnv_lock_vec(long jarg1, int jarg2, int jarg3, DbLockRequest[] jarg4, int jarg5, int jarg6) throws DbException;
+-   final static native Object initDbEnvRef0(long jarg1, Object jarg2);
+-   final static native Object initDbRef0(long jarg1, Object jarg2);
+-   final static native void deleteRef0(Object jarg1);
++   final static native long initDbEnvRef0(long jarg1, Object jarg2);
++   final static native long initDbRef0(long jarg1, Object jarg2);
++   final static native void deleteRef0(long jarg1);
+    final static native long getDbEnv0(long jarg1);
+   public final static native long new_Db(long jarg1, int jarg2) throws DbException;
+   public final static native void Db_associate(long jarg1, long jarg2, long jarg3, DbSecondaryKeyCreate jarg4, int jarg5) throws DbException;
+--- libdb_java/db_java.i	2003-11-17 15:00:52.000000000 -0500
++++ libdb_java/db_java.i	2004-03-18 09:21:14.000000000 -0500
+@@ -53,7 +53,7 @@
+ 	// Internally, the JNI layer creates a global reference to each DbEnv,
+ 	// which can potentially be different to this.  We keep a copy here so
+ 	// we can clean up after destructors.
+-	private Object dbenv_ref;
++	private long dbenv_ref;
+ 	private DbAppDispatch app_dispatch_handler;
+ 	private DbEnvFeedbackHandler env_feedback_handler;
+ 	private DbErrorHandler error_handler;
+@@ -76,7 +76,7 @@
+ 	void cleanup() {
+ 		swigCPtr = 0;
+ 		db_java.deleteRef0(dbenv_ref);
+-		dbenv_ref = null;
++		dbenv_ref = 0L;
+ 	}
+ 
+ 	public synchronized void close(int flags) throws DbException {
+@@ -220,7 +220,7 @@
+ 	// Internally, the JNI layer creates a global reference to each Db,
+ 	// which can potentially be different to this.  We keep a copy here so
+ 	// we can clean up after destructors.
+-	private Object db_ref;
++	private long db_ref;
+ 	private DbEnv dbenv;
+ 	private boolean private_dbenv;
+ 	private DbAppendRecno append_recno_handler;
+@@ -245,7 +245,7 @@
+ 	private void cleanup() {
+ 		swigCPtr = 0;
+ 		db_java.deleteRef0(db_ref);
+-		db_ref = null;
++		db_ref = 0L;
+ 		if (private_dbenv)
+ 			dbenv.cleanup();
+ 		dbenv = null;
+@@ -503,46 +503,42 @@
+ 	}
+ %}
+ 
+-%native(initDbEnvRef0) jobject initDbEnvRef0(DB_ENV *self, void *handle);
+-%native(initDbRef0) jobject initDbRef0(DB *self, void *handle);
+-%native(deleteRef0) void deleteRef0(jobject ref);
++%native(initDbEnvRef0) jlong initDbEnvRef0(DB_ENV *self, void *handle);
++%native(initDbRef0) jlong initDbRef0(DB *self, void *handle);
++%native(deleteRef0) void deleteRef0(jlong ref);
+ %native(getDbEnv0) DB_ENV *getDbEnv0(DB *self);
+ 
+ %{
+-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbEnvRef0(
++JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbEnvRef0(
+     JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) {
+ 	DB_ENV *self = *(DB_ENV **)&jarg1;
++	jlong ret;
+ 	COMPQUIET(jcls, NULL);
+ 
+ 	DB_ENV_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2);
+ 	self->set_errpfx(self, (const char*)self);
+-	return (jobject)DB_ENV_INTERNAL(self);
++	*(jobject *)&ret = (jobject)DB_ENV_INTERNAL(self);
++	return (ret);
+ }
+ 
+-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbRef0(
++JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbRef0(
+     JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) {
+ 	DB *self = *(DB **)&jarg1;
++	jlong ret;
+ 	COMPQUIET(jcls, NULL);
+ 
+ 	DB_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2);
+-	return (jobject)DB_INTERNAL(self);
++	*(jobject *)&ret = (jobject)DB_INTERNAL(self);
++	return (ret);
+ }
+ 
+ JNIEXPORT void JNICALL Java_com_sleepycat_db_db_1javaJNI_deleteRef0(
+-    JNIEnv *jenv, jclass jcls, jobject jref) {
+-	COMPQUIET(jcls, NULL);
+-
+-	if (jref != NULL)
+-		(*jenv)->DeleteGlobalRef(jenv, jref);
+-}
+-
+-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbRef0(
+     JNIEnv *jenv, jclass jcls, jlong jarg1) {
+-	DB *self = *(DB **)&jarg1;
++	jobject jref = *(jobject *)&jarg1;
+ 	COMPQUIET(jcls, NULL);
+-	COMPQUIET(jenv, NULL);
+ 
+-	return (jobject)DB_INTERNAL(self);
++	if (jref != 0L)
++		(*jenv)->DeleteGlobalRef(jenv, jref);
+ }
+ 
+ JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbEnv0(
+@@ -554,7 +550,7 @@
+ 	COMPQUIET(jcls, NULL);
+ 
+ 	*(DB_ENV **)&env_cptr = self->dbenv;
+-	return env_cptr;
++	return (env_cptr);
+ }
+ 
+ JNIEXPORT jboolean JNICALL
+--- libdb_java/db_java_wrap.c	2003-12-03 16:10:36.000000000 -0500
++++ libdb_java/db_java_wrap.c	2004-03-18 12:18:58.000000000 -0500
+@@ -1192,40 +1192,36 @@
+ }
+ 
+ 
+-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbEnvRef0(
++JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbEnvRef0(
+     JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) {
+ 	DB_ENV *self = *(DB_ENV **)&jarg1;
++	jlong ret;
+ 	COMPQUIET(jcls, NULL);
+ 
+ 	DB_ENV_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2);
+ 	self->set_errpfx(self, (const char*)self);
+-	return (jobject)DB_ENV_INTERNAL(self);
++	*(jobject *)&ret = (jobject)DB_ENV_INTERNAL(self);
++	return (ret);
+ }
+ 
+-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbRef0(
++JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_initDbRef0(
+     JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg2) {
+ 	DB *self = *(DB **)&jarg1;
++	jlong ret;
+ 	COMPQUIET(jcls, NULL);
+ 
+ 	DB_INTERNAL(self) = (void *)(*jenv)->NewGlobalRef(jenv, jarg2);
+-	return (jobject)DB_INTERNAL(self);
++	*(jobject *)&ret = (jobject)DB_INTERNAL(self);
++	return (ret);
+ }
+ 
+ JNIEXPORT void JNICALL Java_com_sleepycat_db_db_1javaJNI_deleteRef0(
+-    JNIEnv *jenv, jclass jcls, jobject jref) {
+-	COMPQUIET(jcls, NULL);
+-
+-	if (jref != NULL)
+-		(*jenv)->DeleteGlobalRef(jenv, jref);
+-}
+-
+-JNIEXPORT jobject JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbRef0(
+     JNIEnv *jenv, jclass jcls, jlong jarg1) {
+-	DB *self = *(DB **)&jarg1;
++	jobject jref = *(jobject *)&jarg1;
+ 	COMPQUIET(jcls, NULL);
+-	COMPQUIET(jenv, NULL);
+ 
+-	return (jobject)DB_INTERNAL(self);
++	if (jref != 0L)
++		(*jenv)->DeleteGlobalRef(jenv, jref);
+ }
+ 
+ JNIEXPORT jlong JNICALL Java_com_sleepycat_db_db_1javaJNI_getDbEnv0(
+@@ -1237,7 +1233,7 @@
+ 	COMPQUIET(jcls, NULL);
+ 
+ 	*(DB_ENV **)&env_cptr = self->dbenv;
+-	return env_cptr;
++	return (env_cptr);
+ }
+ 
+ JNIEXPORT jboolean JNICALL


Index: patch.4.2.52.4
===================================================================
RCS file: patch.4.2.52.4
diff -N patch.4.2.52.4
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patch.4.2.52.4	13 Nov 2008 16:58:53 -0000	1.3
@@ -0,0 +1,36 @@
+*** btree/bt_rec.c.orig	Tue Mar 22 09:41:49 2005
+--- btree/bt_rec.c	Tue Mar 22 09:42:11 2005
+***************
+*** 222,228 ****
+  		 * previous-page pointer updated to our new page.  The next
+  		 * page must exist because we're redoing the operation.
+  		 */
+! 		if (!rootsplit && !IS_ZERO_LSN(argp->nlsn)) {
+  			if ((ret =
+  			    __memp_fget(mpf, &argp->npgno, 0, &np)) != 0) {
+  				ret = __db_pgerr(file_dbp, argp->npgno, ret);
+--- 222,228 ----
+  		 * previous-page pointer updated to our new page.  The next
+  		 * page must exist because we're redoing the operation.
+  		 */
+! 		if (!rootsplit && argp->npgno != PGNO_INVALID) {
+  			if ((ret =
+  			    __memp_fget(mpf, &argp->npgno, 0, &np)) != 0) {
+  				ret = __db_pgerr(file_dbp, argp->npgno, ret);
+***************
+*** 294,300 ****
+  		 * possible that the next-page never existed, we ignore it as
+  		 * if there's nothing to undo.
+  		 */
+! 		if (!rootsplit && !IS_ZERO_LSN(argp->nlsn)) {
+  			if ((ret =
+  			    __memp_fget(mpf, &argp->npgno, 0, &np)) != 0) {
+  				np = NULL;
+--- 294,300 ----
+  		 * possible that the next-page never existed, we ignore it as
+  		 * if there's nothing to undo.
+  		 */
+! 		if (!rootsplit && argp->npgno != PGNO_INVALID) {
+  			if ((ret =
+  			    __memp_fget(mpf, &argp->npgno, 0, &np)) != 0) {
+  				np = NULL;


Index: patch.4.2.52.5
===================================================================
RCS file: patch.4.2.52.5
diff -N patch.4.2.52.5
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patch.4.2.52.5	13 Nov 2008 16:58:53 -0000	1.3
@@ -0,0 +1,24 @@
+*** mp/mp_fget.c.orig	2003-09-25 08:29:02.000000000 -0700
+--- mp/mp_fget.c	2006-05-26 14:58:02.246963204 -0700
+***************
+*** 553,560 ****
+  	 */
+  	if (state != SECOND_MISS && bhp->ref == 1) {
+  		bhp->priority = UINT32_T_MAX;
+! 		SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
+! 		SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
+  		hp->hash_priority =
+  		    SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
+  	}
+--- 553,563 ----
+  	 */
+  	if (state != SECOND_MISS && bhp->ref == 1) {
+  		bhp->priority = UINT32_T_MAX;
+! 		if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) !=
+! 		     SH_TAILQ_LAST(&hp->hash_bucket, hq, __bh)) {
+! 			SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
+! 			SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
+! 		}
+  		hp->hash_priority =
+  		    SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
+  	}


Index: patch.4.3.29.1
===================================================================
RCS file: patch.4.3.29.1
diff -N patch.4.3.29.1
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patch.4.3.29.1	13 Nov 2008 16:58:53 -0000	1.3
@@ -0,0 +1,24 @@
+*** mp/mp_fget.c.orig	2006-05-30 20:44:11.000000000 -0700
+--- mp/mp_fget.c	2006-05-30 20:44:22.000000000 -0700
+***************
+*** 577,584 ****
+  	 */
+  	if (state != SECOND_MISS && bhp->ref == 1) {
+  		bhp->priority = UINT32_MAX;
+! 		SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
+! 		SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
+  		hp->hash_priority =
+  		    SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
+  	}
+--- 577,587 ----
+  	 */
+  	if (state != SECOND_MISS && bhp->ref == 1) {
+  		bhp->priority = UINT32_MAX;
+! 		if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) !=
+! 		     SH_TAILQ_LAST(&hp->hash_bucket, hq, __bh)) {
+! 			SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
+! 			SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
+! 		}
+  		hp->hash_priority =
+  		    SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
+  	}


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/compat-db/devel/.cvsignore,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- .cvsignore	22 Oct 2008 12:54:20 -0000	1.14
+++ .cvsignore	13 Nov 2008 16:58:53 -0000	1.15
@@ -1,2 +1,5 @@
 db-4.5.20.tar.gz
 db-4.6.21.tar.gz
+db-4.1.25.tar.gz
+db-4.2.52.tar.gz
+db-4.3.29.tar.gz


Index: compat-db.spec
===================================================================
RCS file: /cvs/pkgs/rpms/compat-db/devel/compat-db.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- compat-db.spec	24 Oct 2008 13:11:00 -0000	1.36
+++ compat-db.spec	13 Nov 2008 16:58:53 -0000	1.37
@@ -1,6 +1,9 @@
+%define db41_version 4.1.25
+%define db42_version 4.2.52
+%define db43_version 4.3.29
 %define db45_version 4.5.20
 %define db46_version 4.6.21
-%define db4_versions %{db45_version} %{db46_version}
+%define db4_versions %{db41_version} %{db42_version} %{db43_version} %{db45_version} %{db46_version}
 
 %define _libdb_a	libdb-${soversion}.a
 %define _libcxx_a	libdb_cxx-${soversion}.a
@@ -8,14 +11,32 @@
 Summary: The Berkeley DB database compatibility library
 Name: compat-db
 Version: 4.6.21
-Release: 5%{?dist}
-Source0: http://download.oracle.com/berkeley-db/db-%{db45_version}.tar.gz
-Source1: http://download.oracle.com/berkeley-db/db-%{db46_version}.tar.gz
+Release: 6%{?dist}
+Source0: http://download.oracle.com/berkeley-db/db-%{db41_version}.tar.gz
+Source1: http://download.oracle.com/berkeley-db/db-%{db42_version}.tar.gz
+Source2: http://download.oracle.com/berkeley-db/db-%{db43_version}.tar.gz
+Source3: http://download.oracle.com/berkeley-db/db-%{db45_version}.tar.gz
+Source4: http://download.oracle.com/berkeley-db/db-%{db46_version}.tar.gz
 
 Patch3: db-4.5.20-sparc64.patch
 Patch4: db-4.5.20-glibc.patch
 Patch5: db-4.6.21-1.85-compat.patch
 
+# Upstream db-4.1.25 patches
+Patch0: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db41_version}/patch.%{db41_version}.1
+Patch1: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db41_version}/patch.%{db41_version}.2
+Patch2: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db41_version}/patch.%{db41_version}.3
+
+# Upstream db-4.2.52 patches
+Patch10: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db42_version}/patch.%{db42_version}.1
+Patch11: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db42_version}/patch.%{db42_version}.2
+Patch12: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db42_version}/patch.%{db42_version}.3
+Patch13: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db42_version}/patch.%{db42_version}.4
+Patch14: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db42_version}/patch.%{db42_version}.5
+
+# Upstream db-4.3.29 patches
+Patch20: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db43_version}/patch.%{db43_version}.1
+
 # Upstream db-4.5.20 patches
 Patch30: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db45_version}/patch.%{db45_version}.1
 Patch31: http://www.oracle.com/technology/products/berkeley-db/db/update/%{db45_version}/patch.%{db45_version}.2
@@ -38,6 +59,54 @@
 This package contains various versions of Berkeley DB which were included in
 previous releases of Red Hat Linux.
 
+%package -n compat-db41
+Summary: The Berkeley DB database %{db41_version} compatibility library
+Group: System Environment/Libraries
+Version: %{db41_version}
+Obsoletes: db1, db1-devel
+Obsoletes: db2, db2-devel, db2-utils
+Obsoletes: db3, db3-devel, db3-utils
+Obsoletes: db31, db32, db3x
+Obsoletes: db4 < 4.1, db4-devel < 4.1, db4-utils < 4.1, db4-tcl < 4.1, db4-java < 4.1
+Obsoletes: compat-db < 4.6.21-5
+
+%description -n compat-db41
+The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
+embedded database support for both traditional and client/server applications.
+This package contains Berkeley DB library version %{db41_version} used for compatibility.
+
+%package -n compat-db42
+Summary: The Berkeley DB database %{db42_version} compatibility library
+Group: System Environment/Libraries
+Version: %{db42_version}
+Obsoletes: db1, db1-devel
+Obsoletes: db2, db2-devel, db2-utils
+Obsoletes: db3, db3-devel, db3-utils
+Obsoletes: db31, db32, db3x
+Obsoletes: db4 < 4.2, db4-devel < 4.2, db4-utils < 4.2, db4-tcl < 4.2, db4-java < 4.2
+Obsoletes: compat-db < 4.6.21-5
+
+%description -n compat-db42
+The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
+embedded database support for both traditional and client/server applications.
+This package contains Berkeley DB library version %{db42_version} used for compatibility.
+
+%package -n compat-db43
+Summary: The Berkeley DB database %{db43_version} compatibility library
+Group: System Environment/Libraries
+Version: %{db43_version}
+Obsoletes: db1, db1-devel
+Obsoletes: db2, db2-devel, db2-utils
+Obsoletes: db3, db3-devel, db3-utils
+Obsoletes: db31, db32, db3x
+Obsoletes: db4 < 4.3, db4-devel < 4.3, db4-utils < 4.3, db4-tcl < 4.3, db4-java < 4.3
+Obsoletes: compat-db < 4.6.21-5
+
+%description -n compat-db43
+The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides
+embedded database support for both traditional and client/server applications.
+This package contains Berkeley DB library version %{db43_version} used for compatibility.
+
 %package -n compat-db45
 Summary: The Berkeley DB database %{db45_version} compatibility library
 Group: System Environment/Libraries
@@ -71,7 +140,26 @@
 This package contains Berkeley DB library version %{db46_version} used for compatibility.
 
 %prep
-%setup -q -c -a 1
+%setup -q -c -a 1 -a 2 -a 3 -a 4
+
+pushd db-%{db41_version}
+%patch0 -p0
+%patch1 -p0
+%patch2 -p0
+popd
+
+pushd db-%{db42_version}
+%patch10 -p0
+%patch11 -p0
+%patch12 -p0
+%patch13 -p0
+%patch14 -p0
+popd
+
+pushd db-%{db43_version}
+%patch20 -p0
+%patch3 -p1 -b .sparc64
+popd
 
 pushd db-%{db45_version}
 %patch30 -p0
@@ -164,10 +252,15 @@
 ${RPM_BUILD_ROOT}%{_includedir}/db_185.h \
 ${RPM_BUILD_ROOT}%{_includedir}/db_cxx.h
 
+# Nuke useless headers for 4.1.25
+rm -f ${RPM_BUILD_ROOT}%{_includedir}/cxx_common.h ${RPM_BUILD_ROOT}%{_includedir}/cxx_except.h
 
 # Make sure all shared libraries have the execute bit set.
 chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/libdb*.so*
 
+# XXX Avoid Permission denied. strip when building as non-root.
+chmod u+w ${RPM_BUILD_ROOT}%{_bindir} ${RPM_BUILD_ROOT}%{_bindir}/*
+
 # Make %{_libdir}/db<version>/libdb.so symlinks to ease detection for autofoo
 for version in %{db4_versions} ; do
 	mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}/db${version}
@@ -200,6 +293,48 @@
 %files
 %defattr(-,root,root)
 
+%files -n compat-db41
+%doc docs/db-%{db41_version}
+%{_bindir}/db41*
+%{_bindir}/berkeley_db41_svc
+%ifos linux
+/%{_lib}/libdb-4.1.so
+/%{_lib}/libdb_cxx-4.1.so
+%else
+%{_libdir}/libdb-4.1.so
+%{_libdir}/libdb_cxx-4.1.so
+%endif
+%{_libdir}/db%{db41_version}
+%{_includedir}/db%{db41_version}
+
+%files -n compat-db42
+%doc docs/db-%{db42_version}
+%{_bindir}/db42*
+%{_bindir}/berkeley_db42_svc
+%ifos linux
+/%{_lib}/libdb-4.2.so
+/%{_lib}/libdb_cxx-4.2.so
+%else
+%{_libdir}/libdb-4.2.so
+%{_libdir}/libdb_cxx-4.2.so
+%endif
+%{_libdir}/db%{db42_version}
+%{_includedir}/db%{db42_version}
+
+%files -n compat-db43
+%doc docs/db-%{db43_version}
+%{_bindir}/db43*
+%{_bindir}/berkeley_db43_svc
+%ifos linux
+/%{_lib}/libdb-4.3.so
+/%{_lib}/libdb_cxx-4.3.so
+%else
+%{_libdir}/libdb-4.3.so
+%{_libdir}/libdb_cxx-4.3.so
+%endif
+%{_libdir}/db%{db43_version}
+%{_includedir}/db%{db43_version}
+
 %files -n compat-db45
 %doc docs/db-%{db45_version}
 %{_bindir}/db45*
@@ -229,6 +364,9 @@
 %{_includedir}/db%{db46_version}
 
 %changelog
+* Wed Nov 12 2008 Jindrich Novy <jnovy at redhat.com> 4.6.21-6
+- add old BDBs 4.3.29, 4.2.52, 4.1.25 for third party software compatibility
+
 * Fri Oct 24 2008 Jindrich Novy <jnovy at redhat.com> 4.6.21-5
 - drop support for 4.3.29
 - split compat-db to compat-db45 and compat-db46 subpackages


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/compat-db/devel/sources,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- sources	22 Oct 2008 12:54:20 -0000	1.15
+++ sources	13 Nov 2008 16:58:53 -0000	1.16
@@ -1,2 +1,5 @@
+d82ed75cb53b0daba4a7e959e8a6f86c  db-4.1.25.tar.gz
+8b5cff6eb83972afdd8e0b821703c33c  db-4.2.52.tar.gz
+200b9f5d74175875fcb3ee54adbf0007  db-4.3.29.tar.gz
 b0f1c777708cb8e9d37fb47e7ed3312d  db-4.5.20.tar.gz
 718082e7e35fc48478a2334b0bc4cd11  db-4.6.21.tar.gz




More information about the fedora-extras-commits mailing list