summaryrefslogtreecommitdiff
path: root/src/log
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /src/log
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-780b92ada9afcf1d58085a83a0b9e6bc982203d1.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'src/log')
-rw-r--r--src/log/log.c201
-rw-r--r--src/log/log_archive.c4
-rw-r--r--src/log/log_compare.c2
-rw-r--r--src/log/log_debug.c2
-rw-r--r--src/log/log_get.c24
-rw-r--r--src/log/log_method.c35
-rw-r--r--src/log/log_print.c11
-rw-r--r--src/log/log_put.c80
-rw-r--r--src/log/log_stat.c2
-rw-r--r--src/log/log_verify.c29
-rw-r--r--src/log/log_verify_auto.c3
-rw-r--r--src/log/log_verify_int.c439
-rw-r--r--src/log/log_verify_stub.c2
-rw-r--r--src/log/log_verify_util.c39
14 files changed, 635 insertions, 238 deletions
diff --git a/src/log/log.c b/src/log/log.c
index 5808145f..9bef8d69 100644
--- a/src/log/log.c
+++ b/src/log/log.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -32,6 +32,7 @@ __log_open(env)
DB_ENV *dbenv;
DB_LOG *dblp;
LOG *lp;
+ u_int32_t log_flags;
u_int8_t *bulk;
int region_locked, ret;
@@ -130,47 +131,59 @@ __log_open(env)
}
} else {
/*
- * A process joining the region may have reset the log file
- * size, too. If so, it only affects the next log file we
- * create. We need to check that the size is reasonable given
- * the buffer size in the region.
+ * The log file size and DB_LOG_AUTO_REMOVE will be ignored
+ * when joining the environment, so print a warning if either
+ * was set.
*/
- LOG_SYSTEM_LOCK(env);
- region_locked = 1;
-
- if (dbenv->lg_size != 0) {
- if ((ret =
- __log_check_sizes(env, dbenv->lg_size, 0)) != 0)
- goto err;
-
- lp->log_nsize = dbenv->lg_size;
- }
-
- LOG_SYSTEM_UNLOCK(env);
- region_locked = 0;
-
- if (dbenv->lg_flags != 0 && (ret =
- __log_set_config_int(dbenv, dbenv->lg_flags, 1, 0)) != 0)
+ if (dbenv->lg_size != 0 && lp->log_nsize != dbenv->lg_size)
+ __db_msg(env, DB_STR("2585",
+"Warning: Ignoring maximum log file size when joining the environment"));
+
+ log_flags = dbenv->lg_flags & ~DB_LOG_AUTO_REMOVE;
+ if ((dbenv->lg_flags & DB_LOG_AUTO_REMOVE) &&
+ lp->db_log_autoremove == 0)
+ __db_msg(env, DB_STR("2586",
+"Warning: Ignoring DB_LOG_AUTO_REMOVE when joining the environment."));
+ if (log_flags != 0 && (ret =
+ __log_set_config_int(dbenv, log_flags, 1, 0)) != 0)
return (ret);
}
dblp->reginfo.mtx_alloc = lp->mtx_region;
return (0);
-err: if (dblp->reginfo.addr != NULL) {
- if (region_locked)
- LOG_SYSTEM_UNLOCK(env);
- (void)__env_region_detach(env, &dblp->reginfo, 0);
- }
- env->lg_handle = NULL;
-
+err: if (region_locked)
+ LOG_SYSTEM_UNLOCK(env);
(void)__mutex_free(env, &dblp->mtx_dbreg);
- __os_free(env, dblp);
+ (void)__log_region_detach(env, dblp);
return (ret);
}
/*
+ * __log_region_detach --
+ *
+ * PUBLIC: int __log_region_detach __P((ENV *, DB_LOG *));
+ */
+int
+__log_region_detach(env, dblp)
+ ENV *env;
+ DB_LOG *dblp;
+{
+ int ret;
+
+ ret = 0;
+ if (dblp != NULL) {
+ if (dblp->reginfo.addr != NULL)
+ ret = __env_region_detach(env, &dblp->reginfo, 0);
+ /* Discard DB_LOG. */
+ __os_free(env, dblp);
+ env->lg_handle = NULL;
+ }
+ return (ret);
+}
+
+/*
* __log_init --
* Initialize a log region in shared memory.
*/
@@ -638,7 +651,6 @@ __log_valid(dblp, number, set_persist, fhpp, flags, statusp, versionp)
recsize = sizeof(LOGP);
if (CRYPTO_ON(env)) {
hdrsize = HDR_CRYPTO_SZ;
- recsize = sizeof(LOGP);
recsize += db_cipher->adj_size(recsize);
is_hmac = 1;
}
@@ -700,7 +712,7 @@ __log_valid(dblp, number, set_persist, fhpp, flags, statusp, versionp)
* we can only detect that by having an unreasonable
* data length for our persistent data.
*/
- if ((hdr->len - hdrsize) != sizeof(LOGP)) {
+ if ((hdr->len - hdrsize) != recsize) {
__db_errx(env, "log record size mismatch");
goto err;
}
@@ -722,10 +734,10 @@ __log_valid(dblp, number, set_persist, fhpp, flags, statusp, versionp)
hdr->len - hdrsize, is_hmac)) != 0)
goto bad_checksum;
/*
- * The checksum verifies without the header. Make note
- * of that, because it is only acceptable when the log
- * version < DB_LOGCHKSUM. Later, when we determine log
- * version, we will confirm this.
+ * The checksum verifies without the header. Make note
+ * of that, because it is only acceptable when the log
+ * version < DB_LOGCHKSUM. Later, when we determine log
+ * version, we will confirm this.
*/
chksum_includes_hdr = 0;
}
@@ -800,7 +812,7 @@ __log_valid(dblp, number, set_persist, fhpp, flags, statusp, versionp)
/*
* We might have to declare a checksum failure here, if:
* - the checksum verified only by ignoring the header, and
- * - the log version indicates that the header should have
+ * - the log version indicates that the header should have
* been included.
*/
if (!chksum_includes_hdr && logversion >= DB_LOGCHKSUM)
@@ -899,66 +911,69 @@ __log_env_refresh(env)
/*
* After we close the files, check for any unlogged closes left in
* the shared memory queue. If we find any, try to log it, otherwise
- * return the error. We cannot say the environment was closed
- * cleanly.
+ * return the error; we cannot say the environment was closed cleanly.
+ * This does not use the typical MUTEX_LOCK(), but MUTEX_LOCK_RET(). The
+ * normal function would immediately return DB_RUNRECOVERY if we are
+ * closing the env down during a panic. By using MUTEX_LOCK_RET(), we
+ * continue with the rest of the cleanup.
*/
- MUTEX_LOCK(env, lp->mtx_filelist);
- SH_TAILQ_FOREACH(fnp, &lp->fq, q, __fname)
- if (F_ISSET(fnp, DB_FNAME_NOTLOGGED) &&
- (t_ret = __dbreg_close_id_int(
- env, fnp, DBREG_CLOSE, 1)) != 0)
- ret = t_ret;
- MUTEX_UNLOCK(env, lp->mtx_filelist);
-
+ if (MUTEX_LOCK_RET(env, lp->mtx_filelist) == 0) {
+ SH_TAILQ_FOREACH(fnp, &lp->fq, q, __fname)
+ if (F_ISSET(fnp, DB_FNAME_NOTLOGGED) &&
+ (t_ret = __dbreg_close_id_int(
+ env, fnp, DBREG_CLOSE, 1)) != 0)
+ ret = t_ret;
+ MUTEX_UNLOCK(env, lp->mtx_filelist);
+ }
/*
- * If a private region, return the memory to the heap. Not needed for
- * filesystem-backed or system shared memory regions, that memory isn't
- * owned by any particular process.
+ * If a private region, return the memory to the heap. Not
+ * needed for filesystem-backed or system shared memory regions,
+ * that memory isn't owned by any particular process.
*/
if (F_ISSET(env, ENV_PRIVATE)) {
- reginfo->mtx_alloc = MUTEX_INVALID;
- /* Discard the flush mutex. */
- if ((t_ret =
- __mutex_free(env, &lp->mtx_flush)) != 0 && ret == 0)
- ret = t_ret;
-
- /* Discard the buffer. */
- __env_alloc_free(reginfo, R_ADDR(reginfo, lp->buffer_off));
-
- /* Discard stack of free file IDs. */
- if (lp->free_fid_stack != INVALID_ROFF)
- __env_alloc_free(reginfo,
- R_ADDR(reginfo, lp->free_fid_stack));
-
- /* Discard the list of in-memory log file markers. */
- while ((filestart = SH_TAILQ_FIRST(&lp->logfiles,
- __db_filestart)) != NULL) {
- SH_TAILQ_REMOVE(&lp->logfiles, filestart, links,
- __db_filestart);
- __env_alloc_free(reginfo, filestart);
- }
-
- while ((filestart = SH_TAILQ_FIRST(&lp->free_logfiles,
- __db_filestart)) != NULL) {
- SH_TAILQ_REMOVE(&lp->free_logfiles, filestart, links,
- __db_filestart);
- __env_alloc_free(reginfo, filestart);
- }
-
- /* Discard commit queue elements. */
- while ((commit = SH_TAILQ_FIRST(&lp->free_commits,
- __db_commit)) != NULL) {
- SH_TAILQ_REMOVE(&lp->free_commits, commit, links,
- __db_commit);
- __env_alloc_free(reginfo, commit);
- }
-
- /* Discard replication bulk buffer. */
- if (lp->bulk_buf != INVALID_ROFF) {
- __env_alloc_free(reginfo,
- R_ADDR(reginfo, lp->bulk_buf));
- lp->bulk_buf = INVALID_ROFF;
- }
+ reginfo->mtx_alloc = MUTEX_INVALID;
+ /* Discard the flush mutex. */
+ if ((t_ret =
+ __mutex_free(env, &lp->mtx_flush)) != 0 && ret == 0)
+ ret = t_ret;
+
+ /* Discard the log buffer. */
+ __env_alloc_free(reginfo, R_ADDR(reginfo, lp->buffer_off));
+
+ /* Discard stack of free file IDs. */
+ if (lp->free_fid_stack != INVALID_ROFF)
+ __env_alloc_free(reginfo,
+ R_ADDR(reginfo, lp->free_fid_stack));
+
+ /* Discard the list of in-memory log file markers. */
+ while ((filestart = SH_TAILQ_FIRST(&lp->logfiles,
+ __db_filestart)) != NULL) {
+ SH_TAILQ_REMOVE(&lp->logfiles, filestart, links,
+ __db_filestart);
+ __env_alloc_free(reginfo, filestart);
+ }
+
+ while ((filestart = SH_TAILQ_FIRST(&lp->free_logfiles,
+ __db_filestart)) != NULL) {
+ SH_TAILQ_REMOVE(&lp->free_logfiles, filestart, links,
+ __db_filestart);
+ __env_alloc_free(reginfo, filestart);
+ }
+
+ /* Discard commit queue elements. */
+ while ((commit = SH_TAILQ_FIRST(&lp->free_commits,
+ __db_commit)) != NULL) {
+ SH_TAILQ_REMOVE(&lp->free_commits, commit, links,
+ __db_commit);
+ __env_alloc_free(reginfo, commit);
+ }
+
+ /* Discard replication bulk buffer. */
+ if (lp->bulk_buf != INVALID_ROFF) {
+ __env_alloc_free(reginfo,
+ R_ADDR(reginfo, lp->bulk_buf));
+ lp->bulk_buf = INVALID_ROFF;
+ }
}
/* Discard the per-thread DBREG mutex. */
@@ -1394,7 +1409,7 @@ __log_inmem_lsnoff(dblp, lsnp, offsetp)
return (0);
}
- return (DB_NOTFOUND);
+ return (USR_ERR(dblp->env, DB_NOTFOUND));
}
/*
diff --git a/src/log/log_archive.c b/src/log/log_archive.c
index 280a2071..fb98e10b 100644
--- a/src/log/log_archive.c
+++ b/src/log/log_archive.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1997, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -304,7 +304,7 @@ __log_get_stable_lsn(env, stable_lsn, group_wide)
* so that the caller knows it may be done.
*/
if (IS_ZERO_LSN(*stable_lsn)) {
- ret = DB_NOTFOUND;
+ ret = USR_ERR(env, DB_NOTFOUND);
goto err;
}
} else if ((ret = __txn_getckp(env, stable_lsn)) != 0)
diff --git a/src/log/log_compare.c b/src/log/log_compare.c
index 97b59338..9bd28854 100644
--- a/src/log/log_compare.c
+++ b/src/log/log_compare.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/src/log/log_debug.c b/src/log/log_debug.c
index 32fb2542..d8f10798 100644
--- a/src/log/log_debug.c
+++ b/src/log/log_debug.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1999, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/src/log/log_get.c b/src/log/log_get.c
index db30c969..332dab8e 100644
--- a/src/log/log_get.c
+++ b/src/log/log_get.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -472,7 +472,7 @@ nextrec:
/* If at start-of-file, move to the previous file. */
if (nlsn.offset == 0) {
if (nlsn.file == 1) {
- ret = DB_NOTFOUND;
+ ret = USR_ERR(env, DB_NOTFOUND);
goto err;
}
if ((!lp->db_log_inmemory &&
@@ -480,7 +480,7 @@ nextrec:
0, &status, NULL) != 0 ||
(status != DB_LV_NORMAL &&
status != DB_LV_OLD_READABLE)))) {
- ret = DB_NOTFOUND;
+ ret = USR_ERR(env, DB_NOTFOUND);
goto err;
}
@@ -607,7 +607,7 @@ nohdr: switch (flags) {
if (eof && logc->bp_lsn.file != nlsn.file)
__db_errx(env, DB_STR_A("2583",
"Log file %d not found, check log directory configuration", "%d"),
- nlsn.file);
+ nlsn.file);
else
__db_errx(env, DB_STR("2576",
"Encountered zero length records while traversing backwards"));
@@ -624,7 +624,7 @@ nohdr: switch (flags) {
/* FALLTHROUGH */
case DB_SET:
default:
- ret = DB_NOTFOUND;
+ ret = USR_ERR(env, DB_NOTFOUND);
goto err;
}
}
@@ -830,7 +830,7 @@ __logc_incursor(logc, lsn, hdr, pp)
if (LOG_SWAPPED(env))
__log_hdrswap(hdr, CRYPTO_ON(env));
if (__logc_hdrchk(logc, lsn, hdr, &eof))
- return (DB_NOTFOUND);
+ return (USR_ERR(env, DB_NOTFOUND));
if (eof || logc->bp_lsn.offset + logc->bp_rlen < lsn->offset + hdr->len)
return (0);
@@ -914,7 +914,7 @@ __logc_inregion(logc, lsn, rlockp, last_lsn, hdr, pp, need_cksump)
if (IS_ZERO_LSN(lp->lsn))
return (0);
if (LOG_COMPARE(lsn, &lp->lsn) >= 0)
- return (DB_NOTFOUND);
+ return (USR_ERR(env, DB_NOTFOUND));
else if (lp->db_log_inmemory) {
if ((ret = __log_inmem_lsnoff(dblp, lsn, &b_region)) != 0)
return (ret);
@@ -949,14 +949,14 @@ __logc_inregion(logc, lsn, rlockp, last_lsn, hdr, pp, need_cksump)
if (LOG_SWAPPED(env))
__log_hdrswap(hdr, CRYPTO_ON(env));
if (__logc_hdrchk(logc, lsn, hdr, &eof) != 0)
- return (DB_NOTFOUND);
+ return (USR_ERR(env, DB_NOTFOUND));
if (eof)
return (0);
if (lp->db_log_inmemory) {
if (RINGBUF_LEN(lp, b_region, lp->b_off) < hdr->len)
- return (DB_NOTFOUND);
+ return (USR_ERR(env, DB_NOTFOUND));
} else if (lsn->offset + hdr->len > lp->w_off + lp->buffer_size)
- return (DB_NOTFOUND);
+ return (USR_ERR(env, DB_NOTFOUND));
if (logc->bp_size <= hdr->len) {
len = (size_t)DB_ALIGN((uintmax_t)hdr->len * 2, 128);
if ((ret =
@@ -1535,6 +1535,10 @@ __log_read_record(env, dbpp, td, recbuf, spec, size, argpp)
LOGCOPY_32(env, ap + sp->offset, bp);
bp += sizeof(uinttmp);
break;
+ case LOGREC_LONGARG:
+ LOGCOPY_64(env, ap + sp->offset, bp);
+ bp += sizeof(u_int64_t);
+ break;
case LOGREC_OP:
LOGCOPY_32(env, &op, bp);
*(u_int32_t *)(ap + sp->offset) = op;
diff --git a/src/log/log_method.c b/src/log/log_method.c
index d5aec116..09fbe863 100644
--- a/src/log/log_method.c
+++ b/src/log/log_method.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1999, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -342,6 +342,10 @@ __log_get_flags(dbenv, flagsp)
LF_SET(DB_LOG_IN_MEMORY);
else
LF_CLR(DB_LOG_IN_MEMORY);
+ if (lp->nosync)
+ LF_SET(DB_LOG_NOSYNC);
+ else
+ LF_CLR(DB_LOG_NOSYNC);
*flagsp = flags;
}
@@ -369,6 +373,8 @@ __log_set_flags(env, flags, on)
lp->db_log_autoremove = on ? 1 : 0;
if (LF_ISSET(DB_LOG_IN_MEMORY))
lp->db_log_inmemory = on ? 1 : 0;
+ if (LF_ISSET(DB_LOG_NOSYNC))
+ lp->nosync = on ? 1 : 0;
}
/*
@@ -377,13 +383,15 @@ __log_set_flags(env, flags, on)
*/
#undef OK_FLAGS
#define OK_FLAGS \
- (DB_LOG_AUTO_REMOVE | DB_LOG_DIRECT | \
- DB_LOG_DSYNC | DB_LOG_IN_MEMORY | DB_LOG_ZERO)
+ (DB_LOG_AUTO_REMOVE | DB_LOG_BLOB | DB_LOG_DIRECT | \
+ DB_LOG_DSYNC | DB_LOG_IN_MEMORY | DB_LOG_NOSYNC | DB_LOG_ZERO)
static const FLAG_MAP LogMap[] = {
{ DB_LOG_AUTO_REMOVE, DBLOG_AUTOREMOVE},
+ { DB_LOG_BLOB, DBLOG_BLOB},
{ DB_LOG_DIRECT, DBLOG_DIRECT},
{ DB_LOG_DSYNC, DBLOG_DSYNC},
{ DB_LOG_IN_MEMORY, DBLOG_INMEMORY},
+ { DB_LOG_NOSYNC, DBLOG_NOSYNC},
{ DB_LOG_ZERO, DBLOG_ZERO}
};
/*
@@ -406,10 +414,14 @@ __log_get_config(dbenv, which, onp)
if (FLD_ISSET(which, ~OK_FLAGS))
return (__db_ferr(env, "DB_ENV->log_get_config", 0));
dblp = env->lg_handle;
- ENV_REQUIRES_CONFIG(env, dblp, "DB_ENV->log_get_config", DB_INIT_LOG);
+ ENV_NOT_CONFIGURED(env, dblp, "DB_ENV->log_get_config", DB_INIT_LOG);
+
+ if (LOGGING_ON(env)) {
+ __env_fetch_flags(LogMap, sizeof(LogMap), &dblp->flags, &flags);
+ __log_get_flags(dbenv, &flags);
+ } else
+ flags = dbenv->lg_flags;
- __env_fetch_flags(LogMap, sizeof(LogMap), &dblp->flags, &flags);
- __log_get_flags(dbenv, &flags);
if (LF_ISSET(which))
*onp = 1;
else
@@ -459,6 +471,17 @@ __log_set_config_int(dbenv, flags, on, in_open)
"DB_ENV->log_set_config: direct I/O either not configured or not supported");
return (EINVAL);
}
+ if (REP_ON(env) && LF_ISSET(DB_LOG_BLOB) && !on) {
+ __db_errx(env,
+"DB_ENV->log_set_config: DB_LOG_BLOB must be enabled with replication.");
+ return (EINVAL);
+ }
+ if (FLD_ISSET(flags, DB_LOG_IN_MEMORY) && on > 0 &&
+ PREFMAS_IS_SET(env)) {
+ __db_errx(env, DB_STR("2587", "DB_LOG_IN_MEMORY is not "
+ "supported in Replication Manager preferred master mode"));
+ return (EINVAL);
+ }
if (LOGGING_ON(env)) {
if (!in_open && LF_ISSET(DB_LOG_IN_MEMORY) &&
diff --git a/src/log/log_print.c b/src/log/log_print.c
index d2cda519..e5c920b6 100644
--- a/src/log/log_print.c
+++ b/src/log/log_print.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -37,6 +37,7 @@ __log_print_record(env, recbuf, lsnp, name, spec, info)
LOG *lp;
PAGE *hdrstart, *hdrtmp;
int32_t inttmp;
+ u_int64_t ulltmp;
u_int32_t hdrsize, op, uinttmp;
u_int32_t type, txnid;
u_int8_t *bp, *datatmp;
@@ -150,6 +151,14 @@ __log_print_record(env, recbuf, lsnp, name, spec, info)
__db_msgadd(env, &msgbuf, "\n");
bp += sizeof(uinttmp);
break;
+ case LOGREC_LONGARG:
+ LOGCOPY_64(env, &ulltmp, bp);
+ __db_msgadd(env, &msgbuf, "\t%s: ", sp->name);
+ __db_msgadd(env,
+ &msgbuf, "%llu", (unsigned long long)ulltmp);
+ __db_msgadd(env, &msgbuf, "\n");
+ bp += sizeof(ulltmp);
+ break;
case LOGREC_TIME:
/* time_t is long but we only store 32 bits. */
LOGCOPY_32(env, &uinttmp, bp);
diff --git a/src/log/log_put.c b/src/log/log_put.c
index 8f7e23d8..4d6c3d2f 100644
--- a/src/log/log_put.c
+++ b/src/log/log_put.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -280,8 +280,7 @@ __log_put(env, lsnp, udbt, flags)
* If the send fails and we're a commit or checkpoint,
* there's nothing we can do; the record's in the log.
* Flush it, even if we're running with TXN_NOSYNC,
- * on the grounds that it should be in durable
- * form somewhere.
+ * on the grounds that it should be in durable form somewhere.
*/
if (ret != 0 && FLD_ISSET(ctlflags, REPCTL_PERM))
LF_SET(DB_FLUSH);
@@ -473,12 +472,12 @@ __log_put_next(env, lsn, dbt, hdr, old_lsnp)
*/
if (adv_file || lp->lsn.offset == 0 ||
lp->lsn.offset + hdr->size + dbt->size > lp->log_size) {
- if (hdr->size + sizeof(LOGP) + dbt->size > lp->log_size) {
+ if (hdr->size + sizeof(LOGP) + dbt->size > lp->log_nsize) {
__db_errx(env, DB_STR_A("2513",
"DB_ENV->log_put: record larger than maximum file size (%lu > %lu)",
"%lu %lu"),
(u_long)hdr->size + sizeof(LOGP) + dbt->size,
- (u_long)lp->log_size);
+ (u_long)lp->log_nsize);
return (EINVAL);
}
@@ -561,7 +560,12 @@ __log_flush_commit(env, lsnp, flags)
"Write failed on MASTER commit."));
return (__env_panic(env, ret));
}
-
+ /*
+ * If this is a panic don't attempt to abort just this transaction;
+ * it may trip over the panic, and the whole env needs to go anyway.
+ */
+ if (ret == DB_RUNRECOVERY)
+ return (__env_panic(env, ret));
/*
* Else, make sure that the commit record does not get out after we
* abort the transaction. Do this by overwriting the commit record
@@ -735,7 +739,7 @@ __log_newfile(dblp, lsnp, logfile, version)
__log_persistswap(tpersist);
if ((ret =
- __log_encrypt_record(env, &t, &hdr, (u_int32_t)tsize)) != 0)
+ __log_encrypt_record(env, &t, &hdr, (u_int32_t)sizeof(LOGP))) != 0)
goto err;
if ((ret = __log_putr(dblp, &lsn,
@@ -1118,12 +1122,15 @@ flush: MUTEX_LOCK(env, lp->mtx_flush);
LOG_SYSTEM_UNLOCK(env);
/* Sync all writes to disk. */
- if ((ret = __os_fsync(env, dblp->lfhp)) != 0) {
- MUTEX_UNLOCK(env, lp->mtx_flush);
- if (release)
- LOG_SYSTEM_LOCK(env);
- lp->in_flush--;
- goto done;
+ if (!lp->nosync) {
+ if ((ret = __os_fsync(env, dblp->lfhp)) != 0) {
+ MUTEX_UNLOCK(env, lp->mtx_flush);
+ if (release)
+ LOG_SYSTEM_LOCK(env);
+ lp->in_flush--;
+ goto done;
+ }
+ STAT(++lp->stat.st_scount);
}
/*
@@ -1143,7 +1150,6 @@ flush: MUTEX_LOCK(env, lp->mtx_flush);
LOG_SYSTEM_LOCK(env);
lp->in_flush--;
- STAT(++lp->stat.st_scount);
/*
* How many flush calls (usually commits) did this call actually sync?
@@ -1440,7 +1446,7 @@ __log_newfh(dblp, create)
"DB_ENV->log_newfh: %lu", (u_long)lp->lsn.file);
else if (status != DB_LV_NORMAL && status != DB_LV_INCOMPLETE &&
status != DB_LV_OLD_READABLE)
- ret = DB_NOTFOUND;
+ ret = USR_ERR(env, DB_NOTFOUND);
return (ret);
}
@@ -1621,6 +1627,37 @@ err:
return (ret);
}
+/*
+ * __log_rep_write --
+ * Way for replication clients to write the log buffer for the
+ * DB_TXN_WRITE_NOSYNC option. This is just a thin PUBLIC wrapper
+ * for __log_write that is similar to __log_flush_commit.
+ *
+ * Note that the REP->mtx_clientdb should be held when this is called.
+ * Note that we acquire the log region mutex while holding mtx_clientdb.
+ *
+ * PUBLIC: int __log_rep_write __P((ENV *));
+ */
+int
+__log_rep_write(env)
+ ENV *env;
+{
+ DB_LOG *dblp;
+ LOG *lp;
+ int ret;
+
+ dblp = env->lg_handle;
+ lp = dblp->reginfo.primary;
+ ret = 0;
+ LOG_SYSTEM_LOCK(env);
+ if (!lp->db_log_inmemory && lp->b_off != 0)
+ if ((ret = __log_write(dblp, dblp->bufp,
+ (u_int32_t)lp->b_off)) == 0)
+ lp->b_off = 0;
+ LOG_SYSTEM_UNLOCK(env);
+ return (ret);
+}
+
static int
__log_encrypt_record(env, dbt, hdr, orig)
ENV *env;
@@ -1773,6 +1810,7 @@ __log_put_record_int(env, dbp, txnp, ret_lsnp,
DB_TXNLOGREC *lr;
LOG *lp;
PAGE *pghdrstart;
+ u_int64_t ulltmp;
u_int32_t hdrsize, op, zero, uinttmp, txn_num;
u_int npad;
u_int8_t *bp;
@@ -1819,7 +1857,7 @@ __log_put_record_int(env, dbp, txnp, ret_lsnp,
return (ret);
/*
* We need to assign begin_lsn while holding region mutex.
- * That assignment is done inside the DbEnv->log_put call,
+ * That assignment is done inside the __log_put call,
* so pass in the appropriate memory location to be filled
* in by the log_put code.
*/
@@ -1842,8 +1880,7 @@ __log_put_record_int(env, dbp, txnp, ret_lsnp,
}
if (is_durable || txnp == NULL) {
- if ((ret =
- __os_malloc(env, logrec.size, &logrec.data)) != 0)
+ if ((ret = __os_malloc(env, logrec.size, &logrec.data)) != 0)
return (ret);
} else {
if ((ret = __os_malloc(env,
@@ -1891,10 +1928,15 @@ __log_put_record_int(env, dbp, txnp, ret_lsnp,
LOGCOPY_32(env, bp, &uinttmp);
bp += sizeof(uinttmp);
break;
+ case LOGREC_LONGARG:
+ ulltmp = va_arg(argp, u_int64_t);
+ LOGCOPY_64(env, bp, &ulltmp);
+ bp += sizeof(ulltmp);
+ break;
case LOGREC_OP:
op = va_arg(argp, u_int32_t);
LOGCOPY_32(env, bp, &op);
- bp += sizeof(uinttmp);
+ bp += sizeof(op);
break;
case LOGREC_DBT:
case LOGREC_PGLIST:
diff --git a/src/log/log_stat.c b/src/log/log_stat.c
index 37b74c74..95fe0e2e 100644
--- a/src/log/log_stat.c
+++ b/src/log/log_stat.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/src/log/log_verify.c b/src/log/log_verify.c
index e7f8f688..2ed2f0f2 100644
--- a/src/log/log_verify.c
+++ b/src/log/log_verify.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -38,6 +38,12 @@ __log_verify_pp(dbenv, lvconfig)
lsnrg = ret = timerg = 0;
phome = NULL;
+ if (lvconfig == NULL) {
+ __db_errx(dbenv->env, DB_STR("2584",
+ "Must provide a configuration structure."));
+ ret = EINVAL;
+ goto err;
+ }
if (!IS_ZERO_LSN(lvconfig->start_lsn) ||
!IS_ZERO_LSN(lvconfig->end_lsn))
lsnrg = 1;
@@ -64,7 +70,8 @@ __log_verify_pp(dbenv, lvconfig)
}
ENV_ENTER(dbenv->env, ip);
- ret = __log_verify(dbenv, lvconfig, ip);
+ REPLICATION_WRAP(dbenv->env,
+ (__log_verify(dbenv, lvconfig, ip)), 0, ret);
ENV_LEAVE(dbenv->env, ip);
err: return (ret);
}
@@ -79,18 +86,16 @@ __log_verify(dbenv, lvconfig, ip)
const DB_LOG_VERIFY_CONFIG *lvconfig;
DB_THREAD_INFO *ip;
{
-
- u_int32_t logcflag, max_fileno;
+ DB_LOG_VRFY_INFO *logvrfy_hdl;
DB_LOGC *logc;
- ENV *env;
- DBT data;
DB_DISTAB dtab;
DB_LSN key, start, start2, stop, stop2, verslsn;
- u_int32_t newversion, version;
+ DBT data;
+ ENV *env;
+ u_int32_t logcflag, max_fileno, newversion, version;
int cmp, fwdscroll, goprev, ret, tret;
time_t starttime, endtime;
const char *okmsg;
- DB_LOG_VRFY_INFO *logvrfy_hdl;
okmsg = NULL;
fwdscroll = 1;
@@ -98,6 +103,7 @@ __log_verify(dbenv, lvconfig, ip)
goprev = 0;
env = dbenv->env;
logc = NULL;
+ logvrfy_hdl = NULL;
memset(&dtab, 0, sizeof(dtab));
memset(&data, 0, sizeof(data));
version = newversion = 0;
@@ -333,11 +339,12 @@ out:
err:
if (logc != NULL)
(void)__logc_close(logc);
- if ((tret = __destroy_log_vrfy_info(logvrfy_hdl)) != 0 && ret == 0)
+ if (logvrfy_hdl != NULL &&
+ (tret = __destroy_log_vrfy_info(logvrfy_hdl)) != 0 && ret == 0)
ret = tret;
- if (dtab.int_dispatch)
+ if (dtab.int_dispatch != NULL)
__os_free(dbenv->env, dtab.int_dispatch);
- if (dtab.ext_dispatch)
+ if (dtab.ext_dispatch != NULL)
__os_free(dbenv->env, dtab.ext_dispatch);
return (ret);
diff --git a/src/log/log_verify_auto.c b/src/log/log_verify_auto.c
index 08bc5d64..de08998d 100644
--- a/src/log/log_verify_auto.c
+++ b/src/log/log_verify_auto.c
@@ -174,6 +174,9 @@ __fop_init_verify(env, dtabp)
__fop_write_verify, DB___fop_write)) != 0)
return (ret);
if ((ret = __db_add_recovery_int(env, dtabp,
+ __fop_write_file_verify, DB___fop_write_file)) != 0)
+ return (ret);
+ if ((ret = __db_add_recovery_int(env, dtabp,
__fop_rename_verify, DB___fop_rename)) != 0)
return (ret);
if ((ret = __db_add_recovery_int(env, dtabp,
diff --git a/src/log/log_verify_int.c b/src/log/log_verify_int.c
index abe564c6..f69f01c0 100644
--- a/src/log/log_verify_int.c
+++ b/src/log/log_verify_int.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -593,7 +593,7 @@ __crdel_metasub_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -628,7 +628,7 @@ __crdel_inmem_create_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __crdel_inmem_create_read(env, dbtp->data, &argp)) != 0)
@@ -661,7 +661,7 @@ __crdel_inmem_rename_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __crdel_inmem_rename_read(env, dbtp->data, &argp)) != 0)
@@ -694,7 +694,7 @@ __crdel_inmem_remove_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __crdel_inmem_remove_read(env, dbtp->data, &argp)) != 0)
@@ -727,7 +727,7 @@ __db_addrem_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -762,7 +762,7 @@ __db_big_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -797,7 +797,7 @@ __db_ovref_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -832,7 +832,7 @@ __db_relink_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -864,7 +864,7 @@ __db_debug_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __db_debug_read(env, dbtp->data, &argp)) != 0)
@@ -897,7 +897,7 @@ __db_noop_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -931,7 +931,7 @@ __db_pg_alloc_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -963,7 +963,7 @@ __db_pg_alloc_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -998,7 +998,7 @@ __db_pg_free_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1030,7 +1030,7 @@ __db_pg_free_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1065,7 +1065,7 @@ __db_cksum_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __db_cksum_read(env, dbtp->data, &argp)) != 0)
@@ -1098,7 +1098,7 @@ __db_pg_freedata_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1130,7 +1130,7 @@ __db_pg_freedata_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1165,7 +1165,7 @@ __db_pg_init_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1200,7 +1200,7 @@ __db_pg_sort_44_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1232,7 +1232,7 @@ __db_pg_trunc_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1264,7 +1264,7 @@ __db_realloc_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1299,7 +1299,7 @@ __db_relink_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1334,7 +1334,7 @@ __db_merge_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1369,7 +1369,7 @@ __db_pgno_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1515,7 +1515,7 @@ __dbreg_register_verify(env, dbtp, lsnp, notused2, lvhp)
opcode = 0;
ret = ret2 = rmv_dblife = 0;
puid = NULL;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
fregp = NULL;
pflife = NULL;
@@ -1749,6 +1749,36 @@ err:
}
/*
+ * PUBLIC: int __dbreg_register_42_verify __P((ENV *, DBT *, DB_LSN *,
+ * PUBLIC: db_recops, void *));
+ */
+int
+__dbreg_register_42_verify(env, dbtp, lsnp, notused2, lvhp)
+ ENV *env;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops notused2;
+ void *lvhp;
+{
+ __dbreg_register_42_args *argp;
+ DB_LOG_VRFY_INFO *lvh;
+ int ret;
+
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
+ lvh = (DB_LOG_VRFY_INFO *)lvhp;
+
+ if ((ret = __dbreg_register_42_read(env, dbtp->data, &argp)) != 0)
+ goto err;
+
+ ON_NOT_SUPPORTED(env, lvh, *lsnp, argp->type);
+ /* LOG_VRFY_PROC(lvh, *lsnp, argp, argp->fileid); */
+
+err:
+ __os_free(env, argp);
+ return (ret);
+}
+
+/*
* PUBLIC: int __bam_split_verify __P((ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
@@ -1764,7 +1794,7 @@ __bam_split_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1804,7 +1834,7 @@ __bam_split_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1836,7 +1866,7 @@ __bam_rsplit_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1873,7 +1903,7 @@ __bam_adj_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1910,7 +1940,7 @@ __bam_irep_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1947,7 +1977,7 @@ __bam_cadjust_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -1984,7 +2014,7 @@ __bam_cdel_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2021,7 +2051,7 @@ __bam_repl_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2058,7 +2088,7 @@ __bam_root_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2093,7 +2123,7 @@ __bam_curadj_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2129,7 +2159,7 @@ __bam_rcuradj_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2165,7 +2195,7 @@ __bam_relink_43_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2197,7 +2227,7 @@ __bam_merge_44_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2229,7 +2259,7 @@ __fop_create_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __fop_create_42_read(env, dbtp->data, &argp)) != 0)
@@ -2245,6 +2275,37 @@ err:
}
/*
+ * PUBLIC: int __fop_create_60_verify __P((ENV *, DBT *, DB_LSN *,
+ * PUBLIC: db_recops, void *));
+ */
+int
+__fop_create_60_verify(env, dbtp, lsnp, notused2, lvhp)
+ ENV *env;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops notused2;
+ void *lvhp;
+{
+ __fop_create_60_args *argp;
+ DB_LOG_VRFY_INFO *lvh;
+ int ret;
+
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
+ lvh = (DB_LOG_VRFY_INFO *)lvhp;
+
+ if ((ret = __fop_create_60_read(env, dbtp->data, &argp)) != 0)
+ return (ret);
+
+ ON_NOT_SUPPORTED(env, lvh, *lsnp, argp->type);
+ /* LOG_VRFY_PROC(lvh, *lsnp, argp, INVAL_DBREGID); */
+err:
+
+ __os_free(env, argp);
+
+ return (ret);
+}
+
+/*
* PUBLIC: int __fop_create_verify __P((ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
@@ -2260,7 +2321,7 @@ __fop_create_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __fop_create_read(env, dbtp->data, &argp)) != 0)
@@ -2278,6 +2339,38 @@ err:
}
/*
+ * PUBLIC: int __fop_remove_60_verify __P((ENV *, DBT *, DB_LSN *,
+ * PUBLIC: db_recops, void *));
+ */
+int
+__fop_remove_60_verify(env, dbtp, lsnp, notused2, lvhp)
+ ENV *env;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops notused2;
+ void *lvhp;
+{
+ __fop_remove_60_args *argp;
+ DB_LOG_VRFY_INFO *lvh;
+ int ret;
+
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
+ lvh = (DB_LOG_VRFY_INFO *)lvhp;
+
+ if ((ret = __fop_remove_60_read(env, dbtp->data, &argp)) != 0)
+ return (ret);
+
+ ON_NOT_SUPPORTED(env, lvh, *lsnp, argp->type);
+ //LOG_VRFY_PROC(lvh, *lsnp, argp, INVAL_DBREGID);
+
+err:
+
+ __os_free(env, argp);
+
+ return (ret);
+}
+
+/*
* PUBLIC: int __fop_remove_verify __P((ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
@@ -2293,7 +2386,7 @@ __fop_remove_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __fop_remove_read(env, dbtp->data, &argp)) != 0)
@@ -2326,7 +2419,7 @@ __fop_write_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __fop_write_42_read(env, dbtp->data, &argp)) != 0)
@@ -2341,6 +2434,36 @@ err:
}
/*
+ * PUBLIC: int __fop_write_60_verify __P((ENV *, DBT *, DB_LSN *,
+ * PUBLIC: db_recops, void *));
+ */
+int
+__fop_write_60_verify(env, dbtp, lsnp, notused2, lvhp)
+ ENV *env;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops notused2;
+ void *lvhp;
+{
+ __fop_write_60_args *argp;
+ DB_LOG_VRFY_INFO *lvh;
+ int ret;
+
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
+ lvh = (DB_LOG_VRFY_INFO *)lvhp;
+
+ if ((ret = __fop_write_60_read(env, dbtp->data, &argp)) != 0)
+ return (ret);
+
+ ON_NOT_SUPPORTED(env, lvh, *lsnp, argp->type);
+ /* LOG_VRFY_PROC(lvh, *lsnp, argp, INVAL_DBREGID); */
+err:
+
+ __os_free(env, argp);
+ return (ret);
+}
+
+/*
* PUBLIC: int __fop_write_verify __P((ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
@@ -2356,7 +2479,7 @@ __fop_write_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __fop_write_read(env, dbtp->data, &argp)) != 0)
@@ -2373,6 +2496,67 @@ err:
}
/*
+ * PUBLIC: int __fop_write_file_60_verify __P((ENV *, DBT *, DB_LSN *,
+ * PUBLIC: db_recops, void *));
+ */
+int
+__fop_write_file_60_verify(env, dbtp, lsnp, notused2, lvhp)
+ ENV *env;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops notused2;
+ void *lvhp;
+{
+ __fop_write_file_60_args *argp;
+ DB_LOG_VRFY_INFO *lvh;
+ int ret;
+
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
+ lvh = (DB_LOG_VRFY_INFO *)lvhp;
+
+ if ((ret = __fop_write_file_60_read(env, dbtp->data, &argp)) != 0)
+ return (ret);
+
+ ON_NOT_SUPPORTED(env, lvh, *lsnp, argp->type);
+ /*LOG_VRFY_PROC(lvh, *lsnp, argp, INVAL_DBREGID);*/
+err:
+ __os_free(env, argp);
+ return (ret);
+}
+
+/*
+ * PUBLIC: int __fop_write_file_verify __P((ENV *, DBT *, DB_LSN *,
+ * PUBLIC: db_recops, void *));
+ */
+int
+__fop_write_file_verify(env, dbtp, lsnp, notused2, lvhp)
+ ENV *env;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops notused2;
+ void *lvhp;
+{
+ __fop_write_file_args *argp;
+ DB_LOG_VRFY_INFO *lvh;
+ int ret;
+
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
+ lvh = (DB_LOG_VRFY_INFO *)lvhp;
+
+ if ((ret = __fop_write_file_read(env, dbtp->data, &argp)) != 0)
+ return (ret);
+
+ LOG_VRFY_PROC(lvh, *lsnp, argp, INVAL_DBREGID);
+ ON_PAGE_UPDATE4 /* No pages are locked by txns. */
+out:
+
+err:
+
+ __os_free(env, argp);
+ return (ret);
+}
+
+/*
* PUBLIC: int __fop_rename_42_verify __P((ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
@@ -2388,7 +2572,7 @@ __fop_rename_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __fop_rename_42_read(env, dbtp->data, &argp)) != 0)
@@ -2404,6 +2588,37 @@ err:
}
/*
+ * PUBLIC: int __fop_rename_60_verify __P((ENV *, DBT *, DB_LSN *,
+ * PUBLIC: db_recops, void *));
+ */
+int
+__fop_rename_60_verify(env, dbtp, lsnp, notused2, lvhp)
+ ENV *env;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops notused2;
+ void *lvhp;
+{
+ __fop_rename_60_args *argp;
+ DB_LOG_VRFY_INFO *lvh;
+ int ret;
+
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
+ lvh = (DB_LOG_VRFY_INFO *)lvhp;
+
+ if ((ret = __fop_rename_60_read(env, dbtp->data, &argp)) != 0)
+ return (ret);
+
+ ON_NOT_SUPPORTED(env, lvh, *lsnp, argp->type);
+ /* LOG_VRFY_PROC(lvh, *lsnp, argp, INVAL_DBREGID); */
+err:
+
+ __os_free(env, argp);
+
+ return (ret);
+}
+
+/*
* PUBLIC: int __fop_rename_verify __P((ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
@@ -2423,7 +2638,7 @@ __fop_rename_verify(env, dbtp, lsnp, notused2, lvhp)
VRFY_FILEREG_INFO freg, *fregp;
memset(&freg, 0, sizeof(freg));
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
buf = NULL;
@@ -2470,6 +2685,38 @@ err:
}
/*
+ * PUBLIC: int __fop_file_remove_60_verify __P((ENV *, DBT *, DB_LSN *,
+ * PUBLIC: db_recops, void *));
+ */
+int
+__fop_file_remove_60_verify(env, dbtp, lsnp, notused2, lvhp)
+ ENV *env;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops notused2;
+ void *lvhp;
+{
+ __fop_file_remove_60_args *argp;
+ DB_LOG_VRFY_INFO *lvh;
+ int ret;
+
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
+ lvh = (DB_LOG_VRFY_INFO *)lvhp;
+
+ if ((ret = __fop_file_remove_60_read(env, dbtp->data, &argp)) != 0)
+ return (ret);
+
+ ON_NOT_SUPPORTED(env, lvh, *lsnp, argp->type);
+ //LOG_VRFY_PROC(lvh, *lsnp, argp, INVAL_DBREGID);
+
+err:
+
+ __os_free(env, argp);
+
+ return (ret);
+}
+
+/*
* PUBLIC: int __fop_file_remove_verify __P((ENV *, DBT *, DB_LSN *,
* PUBLIC: db_recops, void *));
*/
@@ -2485,7 +2732,7 @@ __fop_file_remove_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __fop_file_remove_read(env, dbtp->data, &argp)) != 0)
@@ -2519,7 +2766,7 @@ __ham_insdel_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2555,7 +2802,7 @@ __ham_newpage_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2592,7 +2839,7 @@ __ham_splitdata_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2629,7 +2876,7 @@ __ham_replace_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2667,7 +2914,7 @@ __ham_copypage_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2703,7 +2950,7 @@ __ham_metagroup_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2735,7 +2982,7 @@ __ham_metagroup_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2771,7 +3018,7 @@ __ham_groupalloc_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2807,7 +3054,7 @@ __ham_groupalloc_verify(env, dbtp, lsnp, notused2, lvhp)
ret = 0;
pflife = NULL;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2863,7 +3110,7 @@ __ham_changeslot_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2900,7 +3147,7 @@ __ham_contract_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2936,7 +3183,7 @@ __ham_curadj_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -2973,7 +3220,7 @@ __ham_chgpg_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -3011,7 +3258,7 @@ __heap_addrem_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -3030,6 +3277,40 @@ err:
}
/*
+ * PUBLIC: int __heap_addrem_60_verify
+ * PUBLIC: __P((ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__heap_addrem_60_verify(env, dbtp, lsnp, notused2, lvhp)
+ ENV *env;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops notused2;
+ void *lvhp;
+{
+ __heap_addrem_60_args *argp;
+ DB_LOG_VRFY_INFO *lvh;
+ int ret;
+
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
+ lvh = (DB_LOG_VRFY_INFO *)lvhp;
+
+ if ((ret =
+ __heap_addrem_60_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
+ return (ret);
+
+ LOG_VRFY_PROC(lvh, *lsnp, argp, argp->fileid);
+ ON_PAGE_UPDATE(lvh, *lsnp, argp, argp->pgno);
+ if ((ret = __lv_on_heap_log(lvh, *lsnp, argp->fileid)) != 0)
+ goto err;
+out:
+
+err:
+ __os_free(env, argp);
+ return (ret);
+}
+
+/*
* PUBLIC: int __heap_pg_alloc_verify
* PUBLIC: __P((ENV *, DBT *, DB_LSN *, db_recops, void *));
*/
@@ -3045,7 +3326,7 @@ __heap_pg_alloc_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -3060,7 +3341,7 @@ out:
err:
__os_free(env, argp);
- return (ret);
+ return (ret);
}
/*
@@ -3079,7 +3360,7 @@ __heap_trunc_meta_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -3095,7 +3376,7 @@ out:
err:
__os_free(env, argp);
- return (ret);
+ return (ret);
}
/*
@@ -3114,7 +3395,7 @@ __heap_trunc_page_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -3150,7 +3431,7 @@ __qam_incfirst_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -3186,7 +3467,7 @@ __qam_mvptr_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -3222,7 +3503,7 @@ __qam_del_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -3258,7 +3539,7 @@ __qam_add_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -3294,7 +3575,7 @@ __qam_delext_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret =
@@ -3331,7 +3612,7 @@ __txn_regop_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __txn_regop_42_read(env, dbtp->data, &argp)) != 0)
@@ -3365,7 +3646,7 @@ __txn_regop_verify(env, dbtp, lsnp, notused2, lvhp)
VRFY_TIMESTAMP_INFO tsinfo;
ptvi = pptvi = NULL;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
ret = ret2 = started = 0;
@@ -3480,7 +3761,7 @@ __txn_ckp_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __txn_ckp_42_read(env, dbtp->data, &argp)) != 0)
@@ -3517,7 +3798,7 @@ __txn_ckp_verify(env, dbtp, lsnp, notused2, lvhp)
time_t ckp_time, lastckp_time;
lastckp = NULL;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
memset(&ckpinfo, 0, sizeof(ckpinfo));
memset(&cvp, 0, sizeof(cvp));
@@ -3675,7 +3956,7 @@ __txn_child_verify(env, dbtp, lsnp, notused2, lvhp)
* we never know the T0 has an active child txn T1, all child txns
* we know are committed.
*/
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
ptvi = ptvi2 = NULL;
ret = ret2 = started = 0;
@@ -3811,7 +4092,7 @@ __txn_xa_regop_42_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __txn_xa_regop_42_read(env, dbtp->data, &argp)) != 0)
@@ -3844,7 +4125,7 @@ __txn_prepare_verify(env, dbtp, lsnp, notused2, lvhp)
ret = ret2 = started = 0;
ptvi = NULL;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
if ((ret = __txn_prepare_read(env, dbtp->data, &argp)) != 0)
@@ -3924,7 +4205,7 @@ __txn_recycle_verify(env, dbtp, lsnp, notused2, lvhp)
DB_LOG_VRFY_INFO *lvh;
int ret;
- notused2 = DB_TXN_LOG_VERIFY;
+ COMPQUIET(notused2, DB_TXN_LOG_VERIFY);
lvh = (DB_LOG_VRFY_INFO *)lvhp;
ret = 0;
diff --git a/src/log/log_verify_stub.c b/src/log/log_verify_stub.c
index e6589a50..fdd9a795 100644
--- a/src/log/log_verify_stub.c
+++ b/src/log/log_verify_stub.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
diff --git a/src/log/log_verify_util.c b/src/log/log_verify_util.c
index 88682921..b0cfe0cb 100644
--- a/src/log/log_verify_util.c
+++ b/src/log/log_verify_util.c
@@ -1,7 +1,7 @@
/*-
* See the file LICENSE for redistribution information.
*
- * Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
@@ -53,16 +53,16 @@
} \
} while (0)
-typedef int (*btcmp_funct)(DB *, const DBT *, const DBT *);
-typedef int (*dupcmp_funct)(DB *, const DBT *, const DBT *);
+typedef int (*btcmp_funct)(DB *, const DBT *, const DBT *, size_t *);
+typedef int (*dupcmp_funct)(DB *, const DBT *, const DBT *, size_t *);
static int __lv_add_recycle_handler __P((
DB_LOG_VRFY_INFO *, VRFY_TXN_INFO *, void *));
static int __lv_add_recycle_lsn __P((VRFY_TXN_INFO *, const DB_LSN *));
static size_t __lv_dbt_arrsz __P((const DBT *, u_int32_t));
-static int __lv_fidpgno_cmp __P((DB *, const DBT *, const DBT *));
-static int __lv_i32_cmp __P((DB *, const DBT *, const DBT *));
-static int __lv_lsn_cmp __P((DB *, const DBT *, const DBT *));
+static int __lv_fidpgno_cmp __P((DB *, const DBT *, const DBT *, size_t *));
+static int __lv_i32_cmp __P((DB *, const DBT *, const DBT *, size_t *));
+static int __lv_lsn_cmp __P((DB *, const DBT *, const DBT *, size_t *));
static void __lv_on_bdbop_err __P((int));
static int __lv_open_db __P((DB_ENV *, DB **, DB_THREAD_INFO *,
const char *, int, btcmp_funct, u_int32_t, dupcmp_funct));
@@ -73,8 +73,8 @@ static int __lv_seccbk_fname __P((DB *, const DBT *, const DBT *, DBT *));
static int __lv_seccbk_lsn __P((DB *, const DBT *, const DBT *, DBT *));
static int __lv_seccbk_txnpg __P((DB *, const DBT *, const DBT *, DBT *));
static void __lv_setup_logtype_names __P((DB_LOG_VRFY_INFO *lvinfo));
-static int __lv_txnrgns_lsn_cmp __P((DB *, const DBT *, const DBT *));
-static int __lv_ui32_cmp __P((DB *, const DBT *, const DBT *));
+static int __lv_txnrgns_lsn_cmp __P((DB *, const DBT *, const DBT *, size_t *));
+static int __lv_ui32_cmp __P((DB *, const DBT *, const DBT *, size_t *));
static int __lv_unpack_txn_vrfy_info __P((VRFY_TXN_INFO **, const DBT *));
static int __lv_unpack_filereg __P((const DBT *, VRFY_FILEREG_INFO **));
@@ -383,16 +383,18 @@ err:
/* Btree compare function for a [fileid, pgno] key. */
static int
-__lv_fidpgno_cmp(db, dbt1, dbt2)
+__lv_fidpgno_cmp(db, dbt1, dbt2, locp)
DB *db;
const DBT *dbt1;
const DBT *dbt2;
+ size_t * locp;
{
db_pgno_t pgno1, pgno2;
int ret;
size_t len;
COMPQUIET(db, NULL);
+ COMPQUIET(locp, NULL);
len = DB_FILE_ID_LEN;
ret = memcmp(dbt1->data, dbt2->data, len);
if (ret == 0) {
@@ -408,14 +410,16 @@ __lv_fidpgno_cmp(db, dbt1, dbt2)
/* Btree compare function for a int32_t type of key. */
static int
-__lv_i32_cmp(db, dbt1, dbt2)
+__lv_i32_cmp(db, dbt1, dbt2, locp)
DB *db;
const DBT *dbt1;
const DBT *dbt2;
+ size_t *locp;
{
int32_t k1, k2;
COMPQUIET(db, NULL);
+ COMPQUIET(locp, NULL);
memcpy(&k1, dbt1->data, sizeof(k1));
memcpy(&k2, dbt2->data, sizeof(k2));
@@ -424,14 +428,16 @@ __lv_i32_cmp(db, dbt1, dbt2)
/* Btree compare function for a u_int32_t type of key. */
static int
-__lv_ui32_cmp(db, dbt1, dbt2)
+__lv_ui32_cmp(db, dbt1, dbt2, locp)
DB *db;
const DBT *dbt1;
const DBT *dbt2;
+ size_t *locp;
{
u_int32_t k1, k2;
COMPQUIET(db, NULL);
+ COMPQUIET(locp, NULL);
memcpy(&k1, dbt1->data, sizeof(k1));
memcpy(&k2, dbt2->data, sizeof(k2));
@@ -440,18 +446,21 @@ __lv_ui32_cmp(db, dbt1, dbt2)
/* Btree compare function for a DB_LSN type of key. */
static int
-__lv_lsn_cmp(db, dbt1, dbt2)
+__lv_lsn_cmp(db, dbt1, dbt2, locp)
DB *db;
const DBT *dbt1;
const DBT *dbt2;
+ size_t *locp;
{
DB_LSN lsn1, lsn2;
+ COMPQUIET(locp, NULL);
DB_ASSERT(db->env, dbt1->size == sizeof(DB_LSN));
DB_ASSERT(db->env, dbt2->size == sizeof(DB_LSN));
memcpy(&lsn1, dbt1->data, sizeof(DB_LSN));
memcpy(&lsn2, dbt2->data, sizeof(DB_LSN));
+ COMPQUIET(db, NULL);
return (LOG_COMPARE(&lsn1, &lsn2));
}
@@ -1663,17 +1672,21 @@ int __put_timestamp_info (lvinfo, tsinfo)
}
static int
-__lv_txnrgns_lsn_cmp (db, d1, d2)
+__lv_txnrgns_lsn_cmp (db, d1, d2, locp)
DB *db;
const DBT *d1, *d2;
+ size_t *locp;
{
struct __lv_txnrange r1, r2;
+ COMPQUIET(locp, NULL);
+
DB_ASSERT(db->env, d1->size == sizeof(r1));
DB_ASSERT(db->env, d2->size == sizeof(r2));
memcpy(&r1, d1->data, d1->size);
memcpy(&r2, d2->data, d2->size);
+ COMPQUIET(db, NULL);
return (LOG_COMPARE(&(r1.end), &(r2.end)));
}