2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 1996, 1997, 1998
5 * Sleepycat Software. All rights reserved.
7 * @(#)db_am.h 10.15 (Sleepycat) 11/22/98
13 #define DB_ADD_DUP 0x10
14 #define DB_REM_DUP 0x20
15 #define DB_ADD_BIG 0x30
16 #define DB_REM_BIG 0x40
17 #define DB_SPLITOLD 0x50
18 #define DB_SPLITNEW 0x60
19 #define DB_ADD_PAGE 0x70
20 #define DB_REM_PAGE 0x80
23 * Standard initialization and shutdown macros for all recovery functions.
25 * Requires the following local variables:
27 * DB *file_dbp, *mdbp;
31 #define REC_INTRO(func) { \
34 if ((ret = func(dbtp->data, &argp)) != 0) \
37 __db_fileid_to_db(logp, &file_dbp, argp->fileid)) != 0) { \
38 if (ret == DB_DELETED) { \
44 if (file_dbp == NULL) \
46 if ((ret = file_dbp->cursor(file_dbp, NULL, &dbc, 0)) != 0) \
48 F_SET(dbc, DBC_RECOVER); \
49 mpf = file_dbp->mpf; \
54 __os_free(argp, sizeof(*argp)); \
61 * No-op versions of the same macros.
63 #define REC_NOOP_INTRO(func) { \
64 if ((ret = func(dbtp->data, &argp)) != 0) \
67 #define REC_NOOP_CLOSE { \
69 __os_free(argp, sizeof(*argp)); \
74 * Standard debugging macro for all recovery functions.
77 #define REC_PRINT(func) \
78 (void)func(logp, dbtp, lsnp, redo, info);
80 #define REC_PRINT(func) \
81 COMPQUIET(info, NULL);