*** txn/txn.c.orig Sun Oct 25 21:14:49 1998 --- txn/txn.c Fri Jan 15 10:34:24 1999 *************** *** 674,680 **** u_int32_t kbytes, minutes; { DB_LOG *dblp; ! DB_LSN ckp_lsn, last_ckp; TXN_DETAIL *txnp; time_t last_ckp_time, now; u_int32_t kbytes_written; --- 674,680 ---- u_int32_t kbytes, minutes; { DB_LOG *dblp; ! DB_LSN ckp_lsn, sync_lsn, last_ckp; TXN_DETAIL *txnp; time_t last_ckp_time, now; u_int32_t kbytes_written; *************** *** 750,757 **** mgr->region->pending_ckp = ckp_lsn; UNLOCK_TXNREGION(mgr); if (mgr->dbenv->mp_info != NULL && ! (ret = memp_sync(mgr->dbenv->mp_info, &ckp_lsn)) != 0) { /* * ret == DB_INCOMPLETE means that there are still buffers to * flush, the checkpoint is not complete. Wait and try again. --- 750,762 ---- mgr->region->pending_ckp = ckp_lsn; UNLOCK_TXNREGION(mgr); + /* + * memp_sync may change the lsn you pass it, so don't pass it + * the actual ckp_lsn, pass it a temp instead. + */ + sync_lsn = ckp_lsn; if (mgr->dbenv->mp_info != NULL && ! (ret = memp_sync(mgr->dbenv->mp_info, &sync_lsn)) != 0) { /* * ret == DB_INCOMPLETE means that there are still buffers to * flush, the checkpoint is not complete. Wait and try again.