aboutsummaryrefslogtreecommitdiff
path: root/db2/include/db_am.h
diff options
context:
space:
mode:
Diffstat (limited to 'db2/include/db_am.h')
-rw-r--r--db2/include/db_am.h39
1 files changed, 19 insertions, 20 deletions
diff --git a/db2/include/db_am.h b/db2/include/db_am.h
index 0c189244a2..fe2176d772 100644
--- a/db2/include/db_am.h
+++ b/db2/include/db_am.h
@@ -4,7 +4,7 @@
* Copyright (c) 1996, 1997, 1998
* Sleepycat Software. All rights reserved.
*
- * @(#)db_am.h 10.9 (Sleepycat) 4/10/98
+ * @(#)db_am.h 10.15 (Sleepycat) 11/22/98
*/
#ifndef _DB_AM_H
#define _DB_AM_H
@@ -16,6 +16,8 @@
#define DB_REM_BIG 0x40
#define DB_SPLITOLD 0x50
#define DB_SPLITNEW 0x60
+#define DB_ADD_PAGE 0x70
+#define DB_REM_PAGE 0x80
/*
* Standard initialization and shutdown macros for all recovery functions.
@@ -27,34 +29,31 @@
* int ret;
*/
#define REC_INTRO(func) { \
- file_dbp = mdbp = NULL; \
+ file_dbp = NULL; \
+ dbc = NULL; \
if ((ret = func(dbtp->data, &argp)) != 0) \
goto out; \
- if ((ret = __db_fileid_to_db(logp, &mdbp, argp->fileid)) != 0) {\
- if (ret == DB_DELETED) \
+ if ((ret = \
+ __db_fileid_to_db(logp, &file_dbp, argp->fileid)) != 0) { \
+ if (ret == DB_DELETED) { \
ret = 0; \
+ goto done; \
+ } \
goto out; \
} \
- if (mdbp == NULL) \
+ if (file_dbp == NULL) \
goto out; \
- if (F_ISSET(mdbp, DB_AM_THREAD)) { \
- if ((ret = __db_gethandle(mdbp, \
- mdbp->type == DB_HASH ? __ham_hdup : __bam_bdup, \
- &file_dbp)) != 0) \
- goto out; \
- } else \
- file_dbp = mdbp; \
- F_SET(file_dbp, DB_AM_RECOVER); \
+ if ((ret = file_dbp->cursor(file_dbp, NULL, &dbc, 0)) != 0) \
+ goto out; \
+ F_SET(dbc, DBC_RECOVER); \
mpf = file_dbp->mpf; \
}
+
#define REC_CLOSE { \
if (argp != NULL) \
- __db_free(argp); \
- if (file_dbp != NULL) { \
- F_CLR(file_dbp, DB_AM_RECOVER); \
- if (F_ISSET(file_dbp, DB_AM_THREAD)) \
- __db_puthandle(file_dbp); \
- } \
+ __os_free(argp, sizeof(*argp)); \
+ if (dbc != NULL) \
+ dbc->c_close(dbc); \
return (ret); \
}
@@ -67,7 +66,7 @@
}
#define REC_NOOP_CLOSE { \
if (argp != NULL) \
- __db_free(argp); \
+ __os_free(argp, sizeof(*argp)); \
return (ret); \
}