2
* See the file LICENSE for redistribution information.
4
* Copyright (c) 1996-2002
5
* Sleepycat Software. All rights reserved.
13
INCLUDE #include "db_config.h"
15
INCLUDE #ifndef NO_SYSTEM_INCLUDES
16
INCLUDE #include <sys/types.h>
18
INCLUDE #include <ctype.h>
19
INCLUDE #include <string.h>
22
INCLUDE #include "db_int.h"
23
INCLUDE #include "dbinc/crypto.h"
24
INCLUDE #include "dbinc/db_page.h"
25
INCLUDE #include "dbinc/db_dispatch.h"
26
INCLUDE #include "dbinc/db_am.h"
27
INCLUDE #include "dbinc/btree.h"
28
INCLUDE #include "dbinc/log.h"
29
INCLUDE #include "dbinc/rep.h"
30
INCLUDE #include "dbinc/txn.h"
34
* NOTE: pg_alloc and pg_free have been moved to db.src, where they belong.
38
* BTREE-split: used to log a page split.
40
* left: the page number for the low-order contents.
41
* llsn: the left page's original LSN.
42
* right: the page number for the high-order contents.
43
* rlsn: the right page's original LSN.
44
* indx: the number of entries that went to the left page.
45
* npgno: the next page number
46
* nlsn: the next page's original LSN (or 0 if no next page).
47
* root_pgno: the root page number
48
* pg: the split page's contents before the split.
49
* opflags: SPL_NRECS: if splitting a tree that maintains a record count.
53
WRLOCK left db_pgno_t lu
54
POINTER llsn DB_LSN * lu
55
WRLOCK right db_pgno_t lu
56
POINTER rlsn DB_LSN * lu
58
ARG npgno db_pgno_t lu
59
POINTER nlsn DB_LSN * lu
60
WRLOCKNZ root_pgno db_pgno_t lu
62
ARG opflags u_int32_t lu
66
* BTREE-rsplit: used to log a reverse-split
68
* pgno: the page number of the page copied over the root.
69
* pgdbt: the page being copied on the root page.
70
* root_pgno: the root page number.
71
* nrec: the tree's record count.
72
* rootent: last entry on the root page.
73
* rootlsn: the root page's original lsn.
77
WRLOCK pgno db_pgno_t lu
79
WRLOCK root_pgno db_pgno_t lu
82
POINTER rootlsn DB_LSN * lu
86
* BTREE-adj: used to log the adjustment of an index.
88
* pgno: the page modified.
89
* lsn: the page's original lsn.
90
* indx: the index adjusted.
91
* indx_copy: the index to copy if inserting.
92
* is_insert: 0 if a delete, 1 if an insert.
96
WRLOCK pgno db_pgno_t lu
97
POINTER lsn DB_LSN * lu
99
ARG indx_copy u_int32_t lu
100
ARG is_insert u_int32_t lu
104
* BTREE-cadjust: used to adjust the count change in an internal page.
106
* pgno: the page modified.
107
* lsn: the page's original lsn.
108
* indx: the index to be adjusted.
109
* adjust: the signed adjustment.
110
* opflags: CAD_UPDATEROOT: if root page count was adjusted.
114
WRLOCK pgno db_pgno_t lu
115
POINTER lsn DB_LSN * lu
116
ARG indx u_int32_t lu
117
ARG adjust int32_t ld
118
ARG opflags u_int32_t lu
122
* BTREE-cdel: used to log the intent-to-delete of a cursor record.
124
* pgno: the page modified.
125
* lsn: the page's original lsn.
126
* indx: the index to be deleted.
130
WRLOCK pgno db_pgno_t lu
131
POINTER lsn DB_LSN * lu
132
ARG indx u_int32_t lu
136
* BTREE-repl: used to log the replacement of an item.
138
* pgno: the page modified.
139
* lsn: the page's original lsn.
140
* orig: the original data.
141
* new: the replacement data.
142
* duplicate: the prefix of the replacement that matches the original.
146
WRLOCK pgno db_pgno_t lu
147
POINTER lsn DB_LSN * lu
148
ARG indx u_int32_t lu
149
ARG isdeleted u_int32_t lu
152
ARG prefix u_int32_t lu
153
ARG suffix u_int32_t lu
157
* BTREE-root: log the assignment of a root btree page.
161
WRLOCK meta_pgno db_pgno_t lu
162
WRLOCK root_pgno db_pgno_t lu
163
POINTER meta_lsn DB_LSN * lu
167
* BTREE-curadj: undo cursor adjustments on txn abort.
168
* Should only be processed during DB_TXN_ABORT.
169
* NOTE: the first_indx field gets used to hold
170
* signed index adjustment in one case.
171
* care should be taken if its size is changed.
174
/* Fileid of db affected. */
176
/* Which adjustment. */
177
ARG mode db_ca_mode ld
178
/* Page entry is from. */
179
ARG from_pgno db_pgno_t lu
180
/* Page entry went to. */
181
ARG to_pgno db_pgno_t lu
182
/* Left page of root split. */
183
ARG left_pgno db_pgno_t lu
184
/* First index of dup set. Also used as adjustment. */
185
ARG first_indx u_int32_t lu
186
/* Index entry is from. */
187
ARG from_indx u_int32_t lu
188
/* Index where entry went. */
189
ARG to_indx u_int32_t lu
193
* BTREE-rcuradj: undo cursor adjustments on txn abort in
194
* renumbering recno trees.
195
* Should only be processed during DB_TXN_ABORT.
198
/* Fileid of db affected. */
200
/* Which adjustment. */
201
ARG mode ca_recno_arg ld
202
/* Root page number. */
203
ARG root db_pgno_t ld
204
/* Recno of the adjustment. */
205
ARG recno db_recno_t ld
206
/* Order number of the adjustment. */
207
ARG order u_int32_t ld