diff options
Diffstat (limited to 'db/mp')
-rw-r--r-- | db/mp/mp_bh.c | 9 | ||||
-rw-r--r-- | db/mp/mp_fopen.c | 11 | ||||
-rw-r--r-- | db/mp/mp_sync.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/db/mp/mp_bh.c b/db/mp/mp_bh.c index 24f14ab1d..2c294b054 100644 --- a/db/mp/mp_bh.c +++ b/db/mp/mp_bh.c @@ -7,7 +7,7 @@ #include "db_config.h" #ifndef lint -static const char revid[] = "Id: mp_bh.c,v 11.68 2002/05/03 15:21:16 bostic Exp "; +static const char revid[] = "Id: mp_bh.c,v 11.71 2002/09/04 19:06:45 margo Exp "; #endif /* not lint */ #ifndef NO_SYSTEM_INCLUDES @@ -157,7 +157,7 @@ __memp_bhwrite(dbmp, hp, mfp, bhp, open_extents) } local_open = 1; -found: ret = __memp_pgwrite(dbmp, dbmfp, hp, bhp) == 0 ? 0 : 1; +found: ret = __memp_pgwrite(dbmp, dbmfp, hp, bhp); MUTEX_THREAD_LOCK(dbenv, dbmp->mutexp); if (incremented) @@ -284,13 +284,11 @@ __memp_pgwrite(dbmp, dbmfp, hp, bhp) DB_ENV *dbenv; DB_IO db_io; DB_LSN lsn; - MPOOL *mp; MPOOLFILE *mfp; size_t nw; int callpgin, ret; dbenv = dbmp->dbenv; - mp = dbmp->reginfo[0].primary; mfp = dbmfp == NULL ? NULL : dbmfp->mfp; callpgin = ret = 0; @@ -360,7 +358,8 @@ __memp_pgwrite(dbmp, dbmfp, hp, bhp) dblp = dbenv->lg_handle; lp = dblp->reginfo.primary; - if (log_compare(&lp->s_lsn, &LSN(bhp->buf)) <= 0) { + if (!IS_NOT_LOGGED_LSN(LSN(bhp->buf)) && + log_compare(&lp->s_lsn, &LSN(bhp->buf)) <= 0) { R_LOCK(dbenv, &dblp->reginfo); DB_ASSERT(log_compare(&lp->s_lsn, &LSN(bhp->buf)) > 0); R_UNLOCK(dbenv, &dblp->reginfo); diff --git a/db/mp/mp_fopen.c b/db/mp/mp_fopen.c index 7209bf066..51b816431 100644 --- a/db/mp/mp_fopen.c +++ b/db/mp/mp_fopen.c @@ -7,7 +7,7 @@ #include "db_config.h" #ifndef lint -static const char revid[] = "Id: mp_fopen.c,v 11.88 2002/07/01 15:05:30 bostic Exp "; +static const char revid[] = "Id: mp_fopen.c,v 11.90 2002/08/26 15:22:01 bostic Exp "; #endif /* not lint */ #ifndef NO_SYSTEM_INCLUDES @@ -136,6 +136,11 @@ __memp_set_fileid(dbmfp, fileid) { MPF_ILLEGAL_AFTER_OPEN(dbmfp, "set_fileid"); + /* + * XXX + * This is dangerous -- we're saving the caller's pointer instead + * of allocating memory and copying the contents. + */ dbmfp->fileid = fileid; return (0); } @@ -149,10 +154,6 @@ __memp_set_ftype(dbmfp, ftype) DB_MPOOLFILE *dbmfp; int ftype; { - DB_ENV *dbenv; - - dbenv = dbmfp->dbmp->dbenv; - MPF_ILLEGAL_AFTER_OPEN(dbmfp, "set_ftype"); dbmfp->ftype = ftype; diff --git a/db/mp/mp_sync.c b/db/mp/mp_sync.c index 8c176a385..85d140514 100644 --- a/db/mp/mp_sync.c +++ b/db/mp/mp_sync.c @@ -7,7 +7,7 @@ #include "db_config.h" #ifndef lint -static const char revid[] = "Id: mp_sync.c,v 11.63 2002/08/13 18:30:07 bostic Exp "; +static const char revid[] = "Id: mp_sync.c,v 11.64 2002/08/25 16:00:27 bostic Exp "; #endif /* not lint */ #ifndef NO_SYSTEM_INCLUDES |