aboutsummaryrefslogtreecommitdiff
path: root/db2/log
diff options
context:
space:
mode:
Diffstat (limited to 'db2/log')
-rw-r--r--db2/log/log.c2
-rw-r--r--db2/log/log_findckp.c4
-rw-r--r--db2/log/log_get.c4
-rw-r--r--db2/log/log_rec.c16
4 files changed, 16 insertions, 10 deletions
diff --git a/db2/log/log.c b/db2/log/log.c
index 1684ce8..d3e5183 100644
--- a/db2/log/log.c
+++ b/db2/log/log.c
@@ -7,7 +7,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)log.c 10.24 (Sleepycat) 8/16/97";
+static const char sccsid[] = "@(#)log.c 10.25 (Sleepycat) 8/27/97";
#endif /* not lint */
#ifndef NO_SYSTEM_INCLUDES
diff --git a/db2/log/log_findckp.c b/db2/log/log_findckp.c
index 67fe9c9..df75e20 100644
--- a/db2/log/log_findckp.c
+++ b/db2/log/log_findckp.c
@@ -8,7 +8,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)log_findckp.c 10.10 (Sleepycat) 7/30/97";
+static const char sccsid[] = "@(#)log_findckp.c 10.11 (Sleepycat) 8/27/97";
#endif /* not lint */
#ifndef NO_SYSTEM_INCLUDES
@@ -119,7 +119,7 @@ __log_findckp(lp, lsnp)
return (ret);
if (F_ISSET(lp, DB_AM_THREAD))
free(data.data);
- }
+ }
*lsnp = last_ckp;
if (verbose)
diff --git a/db2/log/log_get.c b/db2/log/log_get.c
index 37eb5cb..54a58c7 100644
--- a/db2/log/log_get.c
+++ b/db2/log/log_get.c
@@ -7,7 +7,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)log_get.c 10.16 (Sleepycat) 8/19/97";
+static const char sccsid[] = "@(#)log_get.c 10.17 (Sleepycat) 8/27/97";
#endif /* not lint */
#ifndef NO_SYSTEM_INCLUDES
@@ -115,8 +115,8 @@ __log_get(dblp, alsn, dbt, flags, silent)
size_t len;
ssize_t nr;
int cnt, ret;
- const char *fail;
char *np, *tbuf;
+ const char *fail;
void *p, *shortp;
lp = dblp->lp;
diff --git a/db2/log/log_rec.c b/db2/log/log_rec.c
index dbc5960..f49a7f1 100644
--- a/db2/log/log_rec.c
+++ b/db2/log/log_rec.c
@@ -40,7 +40,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)log_rec.c 10.11 (Sleepycat) 8/20/97";
+static const char sccsid[] = "@(#)log_rec.c 10.13 (Sleepycat) 8/27/97";
#endif /* not lint */
#ifndef NO_SYSTEM_INCLUDES
@@ -59,7 +59,7 @@ static const char sccsid[] = "@(#)log_rec.c 10.11 (Sleepycat) 8/20/97";
#include "db_dispatch.h"
#include "common_ext.h"
-static int __log_open_file __P((DB_LOG *,
+static int __log_open_file __P((DB_LOG *,
u_int8_t *, char *, DBTYPE, u_int32_t));
/*
@@ -132,10 +132,16 @@ __log_unregister_recover(logp, dbtp, lsnp, redo, info)
if ((ret = __log_unregister_read(dbtp->data, &argp)) != 0)
goto out;
+ /*
+ * If the file is deleted, then we can just ignore this close.
+ * Otherwise, we'd better have a valid dbp that we should either
+ * close or whose reference count should be decremented.
+ */
LOCK_LOGTHREAD(logp);
- if (logp->dbentry[argp->id].dbp == NULL)
- ret = EINVAL;
- else if (--logp->dbentry[argp->id].refcount == 0) {
+ if (logp->dbentry[argp->id].dbp == NULL) {
+ if (!logp->dbentry[argp->id].deleted)
+ ret = EINVAL;
+ } else if (--logp->dbentry[argp->id].refcount == 0) {
ret = logp->dbentry[argp->id].dbp->close(
logp->dbentry[argp->id].dbp, 0);
logp->dbentry[argp->id].dbp = NULL;