2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 1996-2009 Oracle. All rights reserved.
12 #include "dbinc/log.h"
16 * Compare two LSN's; return 1, 0, -1 if first is >, == or < second.
18 * EXTERN: int log_compare __P((const DB_LSN *, const DB_LSN *));
21 log_compare(lsn0, lsn1)
22 const DB_LSN *lsn0, *lsn1;
24 return (LOG_COMPARE(lsn0, lsn1));
28 * __log_check_page_lsn --
29 * Panic if the page's lsn in past the end of the current log.
31 * PUBLIC: int __log_check_page_lsn __P((ENV *, DB *, DB_LSN *));
34 __log_check_page_lsn(env, dbp, lsnp)
42 lp = env->lg_handle->reginfo.primary;
45 ret = LOG_COMPARE(lsnp, &lp->lsn);
47 LOG_SYSTEM_UNLOCK(env);
53 "file %s has LSN %lu/%lu, past end of log at %lu/%lu",
54 dbp == NULL || dbp->fname == NULL ? "unknown" : dbp->fname,
55 (u_long)lsnp->file, (u_long)lsnp->offset,
56 (u_long)lp->lsn.file, (u_long)lp->lsn.offset);
58 "Commonly caused by moving a database from one database environment");
60 "to another without clearing the database LSNs, or by removing all of");
62 "the log files from a database environment");