diff options
author | jbj <devnull@localhost> | 2001-07-23 20:15:24 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-07-23 20:15:24 +0000 |
commit | 3a17cb851b4e65d4c6b5f1ad1b59afdccfabc743 (patch) | |
tree | 2ae8d9691885019a4e70a0161b4610f107f2b383 /db | |
parent | d91a331d0c88bef042117c4a20b597aede61cb77 (diff) | |
download | rpm-3a17cb851b4e65d4c6b5f1ad1b59afdccfabc743.tar.gz rpm-3a17cb851b4e65d4c6b5f1ad1b59afdccfabc743.tar.bz2 rpm-3a17cb851b4e65d4c6b5f1ad1b59afdccfabc743.zip |
Orphans.
CVS patchset: 4977
CVS date: 2001/07/23 20:15:24
Diffstat (limited to 'db')
-rw-r--r-- | db/include/log.h | 3 | ||||
-rw-r--r-- | db/log/log.c | 22 | ||||
-rw-r--r-- | db/log/log_rec.c | 5 |
3 files changed, 15 insertions, 15 deletions
diff --git a/db/include/log.h b/db/include/log.h index 7c8dd03e7..a19a65665 100644 --- a/db/include/log.h +++ b/db/include/log.h @@ -4,7 +4,7 @@ * Copyright (c) 1996-2001 * Sleepycat Software. All rights reserved. * - * Id: log.h,v 11.25 2001/04/25 19:06:39 margo Exp + * Id: log.h,v 11.26 2001/07/05 18:41:03 bostic Exp */ #ifndef _LOG_H_ @@ -65,7 +65,6 @@ struct __db_log { DB_LSN c_lsn; /* Cursor: current LSN. */ DBT c_dbt; /* Cursor: return DBT structure. */ DB_FH c_fh; /* Cursor: file handle. */ - FILE *c_fp; /* Cursor: file pointer. */ u_int32_t c_off; /* Cursor: previous record offset. */ u_int32_t c_len; /* Cursor: current record length. */ u_int32_t r_file; /* Cursor: current read file */ diff --git a/db/log/log.c b/db/log/log.c index 35783c10d..024cf5b2a 100644 --- a/db/log/log.c +++ b/db/log/log.c @@ -7,7 +7,7 @@ #include "db_config.h" #ifndef lint -static const char revid[] = "Id: log.c,v 11.52 2001/04/20 17:35:47 bostic Exp "; +static const char revid[] = "Id: log.c,v 11.56 2001/07/05 14:24:45 bostic Exp "; #endif /* not lint */ #ifndef NO_SYSTEM_INCLUDES @@ -373,8 +373,8 @@ __log_find(dblp, find_first, valp, statusp) * Names of the form log\.[0-9]* are reserved for DB. Other * names sharing LFPREFIX, such as "log.db", are legal. */ - for (c = names[cnt] + sizeof(LFPREFIX); *c != '\0'; c++) - if (!isdigit(*c)) + for (c = names[cnt] + sizeof(LFPREFIX) - 1; *c != '\0'; c++) + if (!isdigit((int)*c)) break; if (*c != '\0') continue; @@ -395,8 +395,11 @@ __log_find(dblp, find_first, valp, statusp) * Take note of whether the log file logval is * an old version or incompletely initialized. */ - if ((ret = __log_valid(dblp, clv, 1, &status)) != 0) + if ((ret = __log_valid(dblp, clv, 1, &status)) != 0) { + __db_err(dblp->dbenv, "Invalid log file: %s: %s", + names[cnt], db_strerror(ret)); goto err; + } switch (status) { case DB_LV_INCOMPLETE: /* @@ -652,6 +655,8 @@ log_stat(dbenv, statp) stats->st_cur_file = region->lsn.file; stats->st_cur_offset = region->lsn.offset; + stats->st_disk_file = region->s_lsn.file; + stats->st_disk_offset = region->s_lsn.offset; R_UNLOCK(dbenv, &dblp->reginfo); @@ -713,12 +718,9 @@ __log_region_destroy(dbenv, infop) DB_ENV *dbenv; REGINFO *infop; { - LOG *region; + __db_shlocks_destroy(infop, (REGMAINT *)R_ADDR(infop, + ((LOG *)R_ADDR(infop, infop->rp->primary))->maint_off)); COMPQUIET(dbenv, NULL); - region = R_ADDR(infop, infop->rp->primary); - - __db_shlocks_destroy(infop, - (REGMAINT *)R_ADDR(infop, region->maint_off)); - return; + COMPQUIET(infop, NULL); } diff --git a/db/log/log_rec.c b/db/log/log_rec.c index 83e3de241..ab178a1f0 100644 --- a/db/log/log_rec.c +++ b/db/log/log_rec.c @@ -36,7 +36,7 @@ #include "db_config.h" #ifndef lint -static const char revid[] = "Id: log_rec.c,v 11.59 2001/05/08 19:00:54 bostic Exp "; +static const char revid[] = "Id: log_rec.c,v 11.60 2001/06/12 01:49:05 bostic Exp "; #endif /* not lint */ #ifndef NO_SYSTEM_INCLUDES @@ -489,7 +489,6 @@ __db_fileid_to_db(dbenv, dbpp, ndx, inc) int inc; { DB_LOG *logp; - DB *dbp; FNAME *fname; int ret; char *name; @@ -507,7 +506,7 @@ __db_fileid_to_db(dbenv, dbpp, ndx, inc) */ if (ndx >= logp->dbentry_cnt || (!logp->dbentry[ndx].deleted && - (dbp = TAILQ_FIRST(&logp->dbentry[ndx].dblist)) == NULL)) { + TAILQ_FIRST(&logp->dbentry[ndx].dblist) == NULL)) { if (F_ISSET(logp, DBLOG_RECOVER)) { ret = ENOENT; goto err; |