fd01cdc
Fix a bug that could cause a trap during recovery if multiple 
fd01cdc
operations that could remove the same extent were recovered. [#14061]
fd01cdc
fd01cdc
fd01cdc
*** qam/qam_files.c.orig	2005-10-20 11:57:12.000000000 -0700
fd01cdc
--- qam/qam_files.c	2006-01-27 13:38:38.000000000 -0800
fd01cdc
***************
fd01cdc
*** 411,416 ****
fd01cdc
--- 411,422 ----
fd01cdc
  	    DB_APP_DATA, buf, 0, NULL, &real_name)) != 0)
fd01cdc
  		goto err;
fd01cdc
  #endif
fd01cdc
+ 
fd01cdc
+ 	mpf = array->mpfarray[offset].mpf;
fd01cdc
+ 	/* This extent my already be marked for delete and closed. */
fd01cdc
+ 	if (mpf == NULL)
fd01cdc
+ 		goto err;
fd01cdc
+ 
fd01cdc
  	/*
fd01cdc
  	 * The log must be flushed before the file is deleted.  We depend on
fd01cdc
  	 * the log record of the last delete to recreate the file if we crash.
fd01cdc
***************
fd01cdc
*** 418,424 ****
fd01cdc
  	if (LOGGING_ON(dbenv) && (ret = __log_flush(dbenv, NULL)) != 0)
fd01cdc
  		goto err;
fd01cdc
  
fd01cdc
- 	mpf = array->mpfarray[offset].mpf;
fd01cdc
  	(void)__memp_set_flags(mpf, DB_MPOOL_UNLINK, 1);
fd01cdc
  	/* Someone could be real slow, let them close it down. */
fd01cdc
  	if (array->mpfarray[offset].pinref != 0)
fd01cdc
--- 424,429 ----