1 /* Do not edit: automatically built by dist/db_gen.sh. */
4 #ifndef NO_SYSTEM_INCLUDES
14 #include "db_dispatch.h"
18 * PUBLIC: int __bam_pg_alloc_log
19 * PUBLIC: __P((DB_LOG *, DB_TXN *, DB_LSN *, u_int32_t,
20 * PUBLIC: u_int32_t, DB_LSN *, DB_LSN *, db_pgno_t,
21 * PUBLIC: u_int32_t, db_pgno_t));
23 int __bam_pg_alloc_log(logp
, txnid
, ret_lsnp
, flags
,
24 fileid
, meta_lsn
, page_lsn
, pgno
, ptype
, next
)
37 DB_LSN
*lsnp
, null_lsn
;
38 u_int32_t rectype
, txn_num
;
42 rectype
= DB_bam_pg_alloc
;
43 txn_num
= txnid
== NULL
? 0 : txnid
->txnid
;
48 lsnp
= &txnid
->last_lsn
;
49 logrec
.size
= sizeof(rectype
) + sizeof(txn_num
) + sizeof(DB_LSN
)
56 if ((ret
= __os_malloc(logrec
.size
, NULL
, &logrec
.data
)) != 0)
60 memcpy(bp
, &rectype
, sizeof(rectype
));
61 bp
+= sizeof(rectype
);
62 memcpy(bp
, &txn_num
, sizeof(txn_num
));
63 bp
+= sizeof(txn_num
);
64 memcpy(bp
, lsnp
, sizeof(DB_LSN
));
66 memcpy(bp
, &fileid
, sizeof(fileid
));
69 memcpy(bp
, meta_lsn
, sizeof(*meta_lsn
));
71 memset(bp
, 0, sizeof(*meta_lsn
));
72 bp
+= sizeof(*meta_lsn
);
74 memcpy(bp
, page_lsn
, sizeof(*page_lsn
));
76 memset(bp
, 0, sizeof(*page_lsn
));
77 bp
+= sizeof(*page_lsn
);
78 memcpy(bp
, &pgno
, sizeof(pgno
));
80 memcpy(bp
, &ptype
, sizeof(ptype
));
82 memcpy(bp
, &next
, sizeof(next
));
85 if ((u_int32_t
)(bp
- (u_int8_t
*)logrec
.data
) != logrec
.size
)
86 fprintf(stderr
, "Error in log record length");
88 ret
= log_put(logp
, ret_lsnp
, (DBT
*)&logrec
, flags
);
90 txnid
->last_lsn
= *ret_lsnp
;
91 __os_free(logrec
.data
, 0);
96 * PUBLIC: int __bam_pg_alloc_print
97 * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *));
100 __bam_pg_alloc_print(notused1
, dbtp
, lsnp
, notused2
, notused3
)
107 __bam_pg_alloc_args
*argp
;
118 if ((ret
= __bam_pg_alloc_read(dbtp
->data
, &argp
)) != 0)
120 printf("[%lu][%lu]bam_pg_alloc: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
122 (u_long
)lsnp
->offset
,
124 (u_long
)argp
->txnid
->txnid
,
125 (u_long
)argp
->prev_lsn
.file
,
126 (u_long
)argp
->prev_lsn
.offset
);
127 printf("\tfileid: %lu\n", (u_long
)argp
->fileid
);
128 printf("\tmeta_lsn: [%lu][%lu]\n",
129 (u_long
)argp
->meta_lsn
.file
, (u_long
)argp
->meta_lsn
.offset
);
130 printf("\tpage_lsn: [%lu][%lu]\n",
131 (u_long
)argp
->page_lsn
.file
, (u_long
)argp
->page_lsn
.offset
);
132 printf("\tpgno: %lu\n", (u_long
)argp
->pgno
);
133 printf("\tptype: %lu\n", (u_long
)argp
->ptype
);
134 printf("\tnext: %lu\n", (u_long
)argp
->next
);
141 * PUBLIC: int __bam_pg_alloc_read __P((void *, __bam_pg_alloc_args **));
144 __bam_pg_alloc_read(recbuf
, argpp
)
146 __bam_pg_alloc_args
**argpp
;
148 __bam_pg_alloc_args
*argp
;
152 ret
= __os_malloc(sizeof(__bam_pg_alloc_args
) +
153 sizeof(DB_TXN
), NULL
, &argp
);
156 argp
->txnid
= (DB_TXN
*)&argp
[1];
158 memcpy(&argp
->type
, bp
, sizeof(argp
->type
));
159 bp
+= sizeof(argp
->type
);
160 memcpy(&argp
->txnid
->txnid
, bp
, sizeof(argp
->txnid
->txnid
));
161 bp
+= sizeof(argp
->txnid
->txnid
);
162 memcpy(&argp
->prev_lsn
, bp
, sizeof(DB_LSN
));
163 bp
+= sizeof(DB_LSN
);
164 memcpy(&argp
->fileid
, bp
, sizeof(argp
->fileid
));
165 bp
+= sizeof(argp
->fileid
);
166 memcpy(&argp
->meta_lsn
, bp
, sizeof(argp
->meta_lsn
));
167 bp
+= sizeof(argp
->meta_lsn
);
168 memcpy(&argp
->page_lsn
, bp
, sizeof(argp
->page_lsn
));
169 bp
+= sizeof(argp
->page_lsn
);
170 memcpy(&argp
->pgno
, bp
, sizeof(argp
->pgno
));
171 bp
+= sizeof(argp
->pgno
);
172 memcpy(&argp
->ptype
, bp
, sizeof(argp
->ptype
));
173 bp
+= sizeof(argp
->ptype
);
174 memcpy(&argp
->next
, bp
, sizeof(argp
->next
));
175 bp
+= sizeof(argp
->next
);
181 * PUBLIC: int __bam_pg_free_log
182 * PUBLIC: __P((DB_LOG *, DB_TXN *, DB_LSN *, u_int32_t,
183 * PUBLIC: u_int32_t, db_pgno_t, DB_LSN *, const DBT *,
184 * PUBLIC: db_pgno_t));
186 int __bam_pg_free_log(logp
, txnid
, ret_lsnp
, flags
,
187 fileid
, pgno
, meta_lsn
, header
, next
)
199 DB_LSN
*lsnp
, null_lsn
;
201 u_int32_t rectype
, txn_num
;
205 rectype
= DB_bam_pg_free
;
206 txn_num
= txnid
== NULL
? 0 : txnid
->txnid
;
211 lsnp
= &txnid
->last_lsn
;
212 logrec
.size
= sizeof(rectype
) + sizeof(txn_num
) + sizeof(DB_LSN
)
216 + sizeof(u_int32_t
) + (header
== NULL
? 0 : header
->size
)
218 if ((ret
= __os_malloc(logrec
.size
, NULL
, &logrec
.data
)) != 0)
222 memcpy(bp
, &rectype
, sizeof(rectype
));
223 bp
+= sizeof(rectype
);
224 memcpy(bp
, &txn_num
, sizeof(txn_num
));
225 bp
+= sizeof(txn_num
);
226 memcpy(bp
, lsnp
, sizeof(DB_LSN
));
227 bp
+= sizeof(DB_LSN
);
228 memcpy(bp
, &fileid
, sizeof(fileid
));
229 bp
+= sizeof(fileid
);
230 memcpy(bp
, &pgno
, sizeof(pgno
));
232 if (meta_lsn
!= NULL
)
233 memcpy(bp
, meta_lsn
, sizeof(*meta_lsn
));
235 memset(bp
, 0, sizeof(*meta_lsn
));
236 bp
+= sizeof(*meta_lsn
);
237 if (header
== NULL
) {
239 memcpy(bp
, &zero
, sizeof(u_int32_t
));
240 bp
+= sizeof(u_int32_t
);
242 memcpy(bp
, &header
->size
, sizeof(header
->size
));
243 bp
+= sizeof(header
->size
);
244 memcpy(bp
, header
->data
, header
->size
);
247 memcpy(bp
, &next
, sizeof(next
));
250 if ((u_int32_t
)(bp
- (u_int8_t
*)logrec
.data
) != logrec
.size
)
251 fprintf(stderr
, "Error in log record length");
253 ret
= log_put(logp
, ret_lsnp
, (DBT
*)&logrec
, flags
);
255 txnid
->last_lsn
= *ret_lsnp
;
256 __os_free(logrec
.data
, 0);
261 * PUBLIC: int __bam_pg_free_print
262 * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *));
265 __bam_pg_free_print(notused1
, dbtp
, lsnp
, notused2
, notused3
)
272 __bam_pg_free_args
*argp
;
283 if ((ret
= __bam_pg_free_read(dbtp
->data
, &argp
)) != 0)
285 printf("[%lu][%lu]bam_pg_free: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
287 (u_long
)lsnp
->offset
,
289 (u_long
)argp
->txnid
->txnid
,
290 (u_long
)argp
->prev_lsn
.file
,
291 (u_long
)argp
->prev_lsn
.offset
);
292 printf("\tfileid: %lu\n", (u_long
)argp
->fileid
);
293 printf("\tpgno: %lu\n", (u_long
)argp
->pgno
);
294 printf("\tmeta_lsn: [%lu][%lu]\n",
295 (u_long
)argp
->meta_lsn
.file
, (u_long
)argp
->meta_lsn
.offset
);
296 printf("\theader: ");
297 for (i
= 0; i
< argp
->header
.size
; i
++) {
298 ch
= ((u_int8_t
*)argp
->header
.data
)[i
];
299 if (isprint(ch
) || ch
== 0xa)
305 printf("\tnext: %lu\n", (u_long
)argp
->next
);
312 * PUBLIC: int __bam_pg_free_read __P((void *, __bam_pg_free_args **));
315 __bam_pg_free_read(recbuf
, argpp
)
317 __bam_pg_free_args
**argpp
;
319 __bam_pg_free_args
*argp
;
323 ret
= __os_malloc(sizeof(__bam_pg_free_args
) +
324 sizeof(DB_TXN
), NULL
, &argp
);
327 argp
->txnid
= (DB_TXN
*)&argp
[1];
329 memcpy(&argp
->type
, bp
, sizeof(argp
->type
));
330 bp
+= sizeof(argp
->type
);
331 memcpy(&argp
->txnid
->txnid
, bp
, sizeof(argp
->txnid
->txnid
));
332 bp
+= sizeof(argp
->txnid
->txnid
);
333 memcpy(&argp
->prev_lsn
, bp
, sizeof(DB_LSN
));
334 bp
+= sizeof(DB_LSN
);
335 memcpy(&argp
->fileid
, bp
, sizeof(argp
->fileid
));
336 bp
+= sizeof(argp
->fileid
);
337 memcpy(&argp
->pgno
, bp
, sizeof(argp
->pgno
));
338 bp
+= sizeof(argp
->pgno
);
339 memcpy(&argp
->meta_lsn
, bp
, sizeof(argp
->meta_lsn
));
340 bp
+= sizeof(argp
->meta_lsn
);
341 memcpy(&argp
->header
.size
, bp
, sizeof(u_int32_t
));
342 bp
+= sizeof(u_int32_t
);
343 argp
->header
.data
= bp
;
344 bp
+= argp
->header
.size
;
345 memcpy(&argp
->next
, bp
, sizeof(argp
->next
));
346 bp
+= sizeof(argp
->next
);
352 * PUBLIC: int __bam_split_log
353 * PUBLIC: __P((DB_LOG *, DB_TXN *, DB_LSN *, u_int32_t,
354 * PUBLIC: u_int32_t, db_pgno_t, DB_LSN *, db_pgno_t,
355 * PUBLIC: DB_LSN *, u_int32_t, db_pgno_t, DB_LSN *,
356 * PUBLIC: const DBT *));
358 int __bam_split_log(logp
, txnid
, ret_lsnp
, flags
,
359 fileid
, left
, llsn
, right
, rlsn
, indx
,
376 DB_LSN
*lsnp
, null_lsn
;
378 u_int32_t rectype
, txn_num
;
382 rectype
= DB_bam_split
;
383 txn_num
= txnid
== NULL
? 0 : txnid
->txnid
;
388 lsnp
= &txnid
->last_lsn
;
389 logrec
.size
= sizeof(rectype
) + sizeof(txn_num
) + sizeof(DB_LSN
)
398 + sizeof(u_int32_t
) + (pg
== NULL
? 0 : pg
->size
);
399 if ((ret
= __os_malloc(logrec
.size
, NULL
, &logrec
.data
)) != 0)
403 memcpy(bp
, &rectype
, sizeof(rectype
));
404 bp
+= sizeof(rectype
);
405 memcpy(bp
, &txn_num
, sizeof(txn_num
));
406 bp
+= sizeof(txn_num
);
407 memcpy(bp
, lsnp
, sizeof(DB_LSN
));
408 bp
+= sizeof(DB_LSN
);
409 memcpy(bp
, &fileid
, sizeof(fileid
));
410 bp
+= sizeof(fileid
);
411 memcpy(bp
, &left
, sizeof(left
));
414 memcpy(bp
, llsn
, sizeof(*llsn
));
416 memset(bp
, 0, sizeof(*llsn
));
418 memcpy(bp
, &right
, sizeof(right
));
421 memcpy(bp
, rlsn
, sizeof(*rlsn
));
423 memset(bp
, 0, sizeof(*rlsn
));
425 memcpy(bp
, &indx
, sizeof(indx
));
427 memcpy(bp
, &npgno
, sizeof(npgno
));
430 memcpy(bp
, nlsn
, sizeof(*nlsn
));
432 memset(bp
, 0, sizeof(*nlsn
));
436 memcpy(bp
, &zero
, sizeof(u_int32_t
));
437 bp
+= sizeof(u_int32_t
);
439 memcpy(bp
, &pg
->size
, sizeof(pg
->size
));
440 bp
+= sizeof(pg
->size
);
441 memcpy(bp
, pg
->data
, pg
->size
);
445 if ((u_int32_t
)(bp
- (u_int8_t
*)logrec
.data
) != logrec
.size
)
446 fprintf(stderr
, "Error in log record length");
448 ret
= log_put(logp
, ret_lsnp
, (DBT
*)&logrec
, flags
);
450 txnid
->last_lsn
= *ret_lsnp
;
451 __os_free(logrec
.data
, 0);
456 * PUBLIC: int __bam_split_print
457 * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *));
460 __bam_split_print(notused1
, dbtp
, lsnp
, notused2
, notused3
)
467 __bam_split_args
*argp
;
478 if ((ret
= __bam_split_read(dbtp
->data
, &argp
)) != 0)
480 printf("[%lu][%lu]bam_split: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
482 (u_long
)lsnp
->offset
,
484 (u_long
)argp
->txnid
->txnid
,
485 (u_long
)argp
->prev_lsn
.file
,
486 (u_long
)argp
->prev_lsn
.offset
);
487 printf("\tfileid: %lu\n", (u_long
)argp
->fileid
);
488 printf("\tleft: %lu\n", (u_long
)argp
->left
);
489 printf("\tllsn: [%lu][%lu]\n",
490 (u_long
)argp
->llsn
.file
, (u_long
)argp
->llsn
.offset
);
491 printf("\tright: %lu\n", (u_long
)argp
->right
);
492 printf("\trlsn: [%lu][%lu]\n",
493 (u_long
)argp
->rlsn
.file
, (u_long
)argp
->rlsn
.offset
);
494 printf("\tindx: %lu\n", (u_long
)argp
->indx
);
495 printf("\tnpgno: %lu\n", (u_long
)argp
->npgno
);
496 printf("\tnlsn: [%lu][%lu]\n",
497 (u_long
)argp
->nlsn
.file
, (u_long
)argp
->nlsn
.offset
);
499 for (i
= 0; i
< argp
->pg
.size
; i
++) {
500 ch
= ((u_int8_t
*)argp
->pg
.data
)[i
];
501 if (isprint(ch
) || ch
== 0xa)
513 * PUBLIC: int __bam_split_read __P((void *, __bam_split_args **));
516 __bam_split_read(recbuf
, argpp
)
518 __bam_split_args
**argpp
;
520 __bam_split_args
*argp
;
524 ret
= __os_malloc(sizeof(__bam_split_args
) +
525 sizeof(DB_TXN
), NULL
, &argp
);
528 argp
->txnid
= (DB_TXN
*)&argp
[1];
530 memcpy(&argp
->type
, bp
, sizeof(argp
->type
));
531 bp
+= sizeof(argp
->type
);
532 memcpy(&argp
->txnid
->txnid
, bp
, sizeof(argp
->txnid
->txnid
));
533 bp
+= sizeof(argp
->txnid
->txnid
);
534 memcpy(&argp
->prev_lsn
, bp
, sizeof(DB_LSN
));
535 bp
+= sizeof(DB_LSN
);
536 memcpy(&argp
->fileid
, bp
, sizeof(argp
->fileid
));
537 bp
+= sizeof(argp
->fileid
);
538 memcpy(&argp
->left
, bp
, sizeof(argp
->left
));
539 bp
+= sizeof(argp
->left
);
540 memcpy(&argp
->llsn
, bp
, sizeof(argp
->llsn
));
541 bp
+= sizeof(argp
->llsn
);
542 memcpy(&argp
->right
, bp
, sizeof(argp
->right
));
543 bp
+= sizeof(argp
->right
);
544 memcpy(&argp
->rlsn
, bp
, sizeof(argp
->rlsn
));
545 bp
+= sizeof(argp
->rlsn
);
546 memcpy(&argp
->indx
, bp
, sizeof(argp
->indx
));
547 bp
+= sizeof(argp
->indx
);
548 memcpy(&argp
->npgno
, bp
, sizeof(argp
->npgno
));
549 bp
+= sizeof(argp
->npgno
);
550 memcpy(&argp
->nlsn
, bp
, sizeof(argp
->nlsn
));
551 bp
+= sizeof(argp
->nlsn
);
552 memcpy(&argp
->pg
.size
, bp
, sizeof(u_int32_t
));
553 bp
+= sizeof(u_int32_t
);
561 * PUBLIC: int __bam_rsplit_log
562 * PUBLIC: __P((DB_LOG *, DB_TXN *, DB_LSN *, u_int32_t,
563 * PUBLIC: u_int32_t, db_pgno_t, const DBT *, db_pgno_t,
564 * PUBLIC: const DBT *, DB_LSN *));
566 int __bam_rsplit_log(logp
, txnid
, ret_lsnp
, flags
,
567 fileid
, pgno
, pgdbt
, nrec
, rootent
, rootlsn
)
580 DB_LSN
*lsnp
, null_lsn
;
582 u_int32_t rectype
, txn_num
;
586 rectype
= DB_bam_rsplit
;
587 txn_num
= txnid
== NULL
? 0 : txnid
->txnid
;
592 lsnp
= &txnid
->last_lsn
;
593 logrec
.size
= sizeof(rectype
) + sizeof(txn_num
) + sizeof(DB_LSN
)
596 + sizeof(u_int32_t
) + (pgdbt
== NULL
? 0 : pgdbt
->size
)
598 + sizeof(u_int32_t
) + (rootent
== NULL
? 0 : rootent
->size
)
600 if ((ret
= __os_malloc(logrec
.size
, NULL
, &logrec
.data
)) != 0)
604 memcpy(bp
, &rectype
, sizeof(rectype
));
605 bp
+= sizeof(rectype
);
606 memcpy(bp
, &txn_num
, sizeof(txn_num
));
607 bp
+= sizeof(txn_num
);
608 memcpy(bp
, lsnp
, sizeof(DB_LSN
));
609 bp
+= sizeof(DB_LSN
);
610 memcpy(bp
, &fileid
, sizeof(fileid
));
611 bp
+= sizeof(fileid
);
612 memcpy(bp
, &pgno
, sizeof(pgno
));
616 memcpy(bp
, &zero
, sizeof(u_int32_t
));
617 bp
+= sizeof(u_int32_t
);
619 memcpy(bp
, &pgdbt
->size
, sizeof(pgdbt
->size
));
620 bp
+= sizeof(pgdbt
->size
);
621 memcpy(bp
, pgdbt
->data
, pgdbt
->size
);
624 memcpy(bp
, &nrec
, sizeof(nrec
));
626 if (rootent
== NULL
) {
628 memcpy(bp
, &zero
, sizeof(u_int32_t
));
629 bp
+= sizeof(u_int32_t
);
631 memcpy(bp
, &rootent
->size
, sizeof(rootent
->size
));
632 bp
+= sizeof(rootent
->size
);
633 memcpy(bp
, rootent
->data
, rootent
->size
);
637 memcpy(bp
, rootlsn
, sizeof(*rootlsn
));
639 memset(bp
, 0, sizeof(*rootlsn
));
640 bp
+= sizeof(*rootlsn
);
642 if ((u_int32_t
)(bp
- (u_int8_t
*)logrec
.data
) != logrec
.size
)
643 fprintf(stderr
, "Error in log record length");
645 ret
= log_put(logp
, ret_lsnp
, (DBT
*)&logrec
, flags
);
647 txnid
->last_lsn
= *ret_lsnp
;
648 __os_free(logrec
.data
, 0);
653 * PUBLIC: int __bam_rsplit_print
654 * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *));
657 __bam_rsplit_print(notused1
, dbtp
, lsnp
, notused2
, notused3
)
664 __bam_rsplit_args
*argp
;
675 if ((ret
= __bam_rsplit_read(dbtp
->data
, &argp
)) != 0)
677 printf("[%lu][%lu]bam_rsplit: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
679 (u_long
)lsnp
->offset
,
681 (u_long
)argp
->txnid
->txnid
,
682 (u_long
)argp
->prev_lsn
.file
,
683 (u_long
)argp
->prev_lsn
.offset
);
684 printf("\tfileid: %lu\n", (u_long
)argp
->fileid
);
685 printf("\tpgno: %lu\n", (u_long
)argp
->pgno
);
687 for (i
= 0; i
< argp
->pgdbt
.size
; i
++) {
688 ch
= ((u_int8_t
*)argp
->pgdbt
.data
)[i
];
689 if (isprint(ch
) || ch
== 0xa)
695 printf("\tnrec: %lu\n", (u_long
)argp
->nrec
);
696 printf("\trootent: ");
697 for (i
= 0; i
< argp
->rootent
.size
; i
++) {
698 ch
= ((u_int8_t
*)argp
->rootent
.data
)[i
];
699 if (isprint(ch
) || ch
== 0xa)
705 printf("\trootlsn: [%lu][%lu]\n",
706 (u_long
)argp
->rootlsn
.file
, (u_long
)argp
->rootlsn
.offset
);
713 * PUBLIC: int __bam_rsplit_read __P((void *, __bam_rsplit_args **));
716 __bam_rsplit_read(recbuf
, argpp
)
718 __bam_rsplit_args
**argpp
;
720 __bam_rsplit_args
*argp
;
724 ret
= __os_malloc(sizeof(__bam_rsplit_args
) +
725 sizeof(DB_TXN
), NULL
, &argp
);
728 argp
->txnid
= (DB_TXN
*)&argp
[1];
730 memcpy(&argp
->type
, bp
, sizeof(argp
->type
));
731 bp
+= sizeof(argp
->type
);
732 memcpy(&argp
->txnid
->txnid
, bp
, sizeof(argp
->txnid
->txnid
));
733 bp
+= sizeof(argp
->txnid
->txnid
);
734 memcpy(&argp
->prev_lsn
, bp
, sizeof(DB_LSN
));
735 bp
+= sizeof(DB_LSN
);
736 memcpy(&argp
->fileid
, bp
, sizeof(argp
->fileid
));
737 bp
+= sizeof(argp
->fileid
);
738 memcpy(&argp
->pgno
, bp
, sizeof(argp
->pgno
));
739 bp
+= sizeof(argp
->pgno
);
740 memcpy(&argp
->pgdbt
.size
, bp
, sizeof(u_int32_t
));
741 bp
+= sizeof(u_int32_t
);
742 argp
->pgdbt
.data
= bp
;
743 bp
+= argp
->pgdbt
.size
;
744 memcpy(&argp
->nrec
, bp
, sizeof(argp
->nrec
));
745 bp
+= sizeof(argp
->nrec
);
746 memcpy(&argp
->rootent
.size
, bp
, sizeof(u_int32_t
));
747 bp
+= sizeof(u_int32_t
);
748 argp
->rootent
.data
= bp
;
749 bp
+= argp
->rootent
.size
;
750 memcpy(&argp
->rootlsn
, bp
, sizeof(argp
->rootlsn
));
751 bp
+= sizeof(argp
->rootlsn
);
757 * PUBLIC: int __bam_adj_log
758 * PUBLIC: __P((DB_LOG *, DB_TXN *, DB_LSN *, u_int32_t,
759 * PUBLIC: u_int32_t, db_pgno_t, DB_LSN *, u_int32_t,
760 * PUBLIC: u_int32_t, u_int32_t));
762 int __bam_adj_log(logp
, txnid
, ret_lsnp
, flags
,
763 fileid
, pgno
, lsn
, indx
, indx_copy
, is_insert
)
776 DB_LSN
*lsnp
, null_lsn
;
777 u_int32_t rectype
, txn_num
;
781 rectype
= DB_bam_adj
;
782 txn_num
= txnid
== NULL
? 0 : txnid
->txnid
;
787 lsnp
= &txnid
->last_lsn
;
788 logrec
.size
= sizeof(rectype
) + sizeof(txn_num
) + sizeof(DB_LSN
)
795 if ((ret
= __os_malloc(logrec
.size
, NULL
, &logrec
.data
)) != 0)
799 memcpy(bp
, &rectype
, sizeof(rectype
));
800 bp
+= sizeof(rectype
);
801 memcpy(bp
, &txn_num
, sizeof(txn_num
));
802 bp
+= sizeof(txn_num
);
803 memcpy(bp
, lsnp
, sizeof(DB_LSN
));
804 bp
+= sizeof(DB_LSN
);
805 memcpy(bp
, &fileid
, sizeof(fileid
));
806 bp
+= sizeof(fileid
);
807 memcpy(bp
, &pgno
, sizeof(pgno
));
810 memcpy(bp
, lsn
, sizeof(*lsn
));
812 memset(bp
, 0, sizeof(*lsn
));
814 memcpy(bp
, &indx
, sizeof(indx
));
816 memcpy(bp
, &indx_copy
, sizeof(indx_copy
));
817 bp
+= sizeof(indx_copy
);
818 memcpy(bp
, &is_insert
, sizeof(is_insert
));
819 bp
+= sizeof(is_insert
);
821 if ((u_int32_t
)(bp
- (u_int8_t
*)logrec
.data
) != logrec
.size
)
822 fprintf(stderr
, "Error in log record length");
824 ret
= log_put(logp
, ret_lsnp
, (DBT
*)&logrec
, flags
);
826 txnid
->last_lsn
= *ret_lsnp
;
827 __os_free(logrec
.data
, 0);
832 * PUBLIC: int __bam_adj_print
833 * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *));
836 __bam_adj_print(notused1
, dbtp
, lsnp
, notused2
, notused3
)
843 __bam_adj_args
*argp
;
854 if ((ret
= __bam_adj_read(dbtp
->data
, &argp
)) != 0)
856 printf("[%lu][%lu]bam_adj: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
858 (u_long
)lsnp
->offset
,
860 (u_long
)argp
->txnid
->txnid
,
861 (u_long
)argp
->prev_lsn
.file
,
862 (u_long
)argp
->prev_lsn
.offset
);
863 printf("\tfileid: %lu\n", (u_long
)argp
->fileid
);
864 printf("\tpgno: %lu\n", (u_long
)argp
->pgno
);
865 printf("\tlsn: [%lu][%lu]\n",
866 (u_long
)argp
->lsn
.file
, (u_long
)argp
->lsn
.offset
);
867 printf("\tindx: %lu\n", (u_long
)argp
->indx
);
868 printf("\tindx_copy: %lu\n", (u_long
)argp
->indx_copy
);
869 printf("\tis_insert: %lu\n", (u_long
)argp
->is_insert
);
876 * PUBLIC: int __bam_adj_read __P((void *, __bam_adj_args **));
879 __bam_adj_read(recbuf
, argpp
)
881 __bam_adj_args
**argpp
;
883 __bam_adj_args
*argp
;
887 ret
= __os_malloc(sizeof(__bam_adj_args
) +
888 sizeof(DB_TXN
), NULL
, &argp
);
891 argp
->txnid
= (DB_TXN
*)&argp
[1];
893 memcpy(&argp
->type
, bp
, sizeof(argp
->type
));
894 bp
+= sizeof(argp
->type
);
895 memcpy(&argp
->txnid
->txnid
, bp
, sizeof(argp
->txnid
->txnid
));
896 bp
+= sizeof(argp
->txnid
->txnid
);
897 memcpy(&argp
->prev_lsn
, bp
, sizeof(DB_LSN
));
898 bp
+= sizeof(DB_LSN
);
899 memcpy(&argp
->fileid
, bp
, sizeof(argp
->fileid
));
900 bp
+= sizeof(argp
->fileid
);
901 memcpy(&argp
->pgno
, bp
, sizeof(argp
->pgno
));
902 bp
+= sizeof(argp
->pgno
);
903 memcpy(&argp
->lsn
, bp
, sizeof(argp
->lsn
));
904 bp
+= sizeof(argp
->lsn
);
905 memcpy(&argp
->indx
, bp
, sizeof(argp
->indx
));
906 bp
+= sizeof(argp
->indx
);
907 memcpy(&argp
->indx_copy
, bp
, sizeof(argp
->indx_copy
));
908 bp
+= sizeof(argp
->indx_copy
);
909 memcpy(&argp
->is_insert
, bp
, sizeof(argp
->is_insert
));
910 bp
+= sizeof(argp
->is_insert
);
916 * PUBLIC: int __bam_cadjust_log
917 * PUBLIC: __P((DB_LOG *, DB_TXN *, DB_LSN *, u_int32_t,
918 * PUBLIC: u_int32_t, db_pgno_t, DB_LSN *, u_int32_t,
919 * PUBLIC: int32_t, int32_t));
921 int __bam_cadjust_log(logp
, txnid
, ret_lsnp
, flags
,
922 fileid
, pgno
, lsn
, indx
, adjust
, total
)
935 DB_LSN
*lsnp
, null_lsn
;
936 u_int32_t rectype
, txn_num
;
940 rectype
= DB_bam_cadjust
;
941 txn_num
= txnid
== NULL
? 0 : txnid
->txnid
;
946 lsnp
= &txnid
->last_lsn
;
947 logrec
.size
= sizeof(rectype
) + sizeof(txn_num
) + sizeof(DB_LSN
)
954 if ((ret
= __os_malloc(logrec
.size
, NULL
, &logrec
.data
)) != 0)
958 memcpy(bp
, &rectype
, sizeof(rectype
));
959 bp
+= sizeof(rectype
);
960 memcpy(bp
, &txn_num
, sizeof(txn_num
));
961 bp
+= sizeof(txn_num
);
962 memcpy(bp
, lsnp
, sizeof(DB_LSN
));
963 bp
+= sizeof(DB_LSN
);
964 memcpy(bp
, &fileid
, sizeof(fileid
));
965 bp
+= sizeof(fileid
);
966 memcpy(bp
, &pgno
, sizeof(pgno
));
969 memcpy(bp
, lsn
, sizeof(*lsn
));
971 memset(bp
, 0, sizeof(*lsn
));
973 memcpy(bp
, &indx
, sizeof(indx
));
975 memcpy(bp
, &adjust
, sizeof(adjust
));
976 bp
+= sizeof(adjust
);
977 memcpy(bp
, &total
, sizeof(total
));
980 if ((u_int32_t
)(bp
- (u_int8_t
*)logrec
.data
) != logrec
.size
)
981 fprintf(stderr
, "Error in log record length");
983 ret
= log_put(logp
, ret_lsnp
, (DBT
*)&logrec
, flags
);
985 txnid
->last_lsn
= *ret_lsnp
;
986 __os_free(logrec
.data
, 0);
991 * PUBLIC: int __bam_cadjust_print
992 * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *));
995 __bam_cadjust_print(notused1
, dbtp
, lsnp
, notused2
, notused3
)
1002 __bam_cadjust_args
*argp
;
1013 if ((ret
= __bam_cadjust_read(dbtp
->data
, &argp
)) != 0)
1015 printf("[%lu][%lu]bam_cadjust: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
1017 (u_long
)lsnp
->offset
,
1019 (u_long
)argp
->txnid
->txnid
,
1020 (u_long
)argp
->prev_lsn
.file
,
1021 (u_long
)argp
->prev_lsn
.offset
);
1022 printf("\tfileid: %lu\n", (u_long
)argp
->fileid
);
1023 printf("\tpgno: %lu\n", (u_long
)argp
->pgno
);
1024 printf("\tlsn: [%lu][%lu]\n",
1025 (u_long
)argp
->lsn
.file
, (u_long
)argp
->lsn
.offset
);
1026 printf("\tindx: %lu\n", (u_long
)argp
->indx
);
1027 printf("\tadjust: %ld\n", (long)argp
->adjust
);
1028 printf("\ttotal: %ld\n", (long)argp
->total
);
1035 * PUBLIC: int __bam_cadjust_read __P((void *, __bam_cadjust_args **));
1038 __bam_cadjust_read(recbuf
, argpp
)
1040 __bam_cadjust_args
**argpp
;
1042 __bam_cadjust_args
*argp
;
1046 ret
= __os_malloc(sizeof(__bam_cadjust_args
) +
1047 sizeof(DB_TXN
), NULL
, &argp
);
1050 argp
->txnid
= (DB_TXN
*)&argp
[1];
1052 memcpy(&argp
->type
, bp
, sizeof(argp
->type
));
1053 bp
+= sizeof(argp
->type
);
1054 memcpy(&argp
->txnid
->txnid
, bp
, sizeof(argp
->txnid
->txnid
));
1055 bp
+= sizeof(argp
->txnid
->txnid
);
1056 memcpy(&argp
->prev_lsn
, bp
, sizeof(DB_LSN
));
1057 bp
+= sizeof(DB_LSN
);
1058 memcpy(&argp
->fileid
, bp
, sizeof(argp
->fileid
));
1059 bp
+= sizeof(argp
->fileid
);
1060 memcpy(&argp
->pgno
, bp
, sizeof(argp
->pgno
));
1061 bp
+= sizeof(argp
->pgno
);
1062 memcpy(&argp
->lsn
, bp
, sizeof(argp
->lsn
));
1063 bp
+= sizeof(argp
->lsn
);
1064 memcpy(&argp
->indx
, bp
, sizeof(argp
->indx
));
1065 bp
+= sizeof(argp
->indx
);
1066 memcpy(&argp
->adjust
, bp
, sizeof(argp
->adjust
));
1067 bp
+= sizeof(argp
->adjust
);
1068 memcpy(&argp
->total
, bp
, sizeof(argp
->total
));
1069 bp
+= sizeof(argp
->total
);
1075 * PUBLIC: int __bam_cdel_log
1076 * PUBLIC: __P((DB_LOG *, DB_TXN *, DB_LSN *, u_int32_t,
1077 * PUBLIC: u_int32_t, db_pgno_t, DB_LSN *, u_int32_t));
1079 int __bam_cdel_log(logp
, txnid
, ret_lsnp
, flags
,
1080 fileid
, pgno
, lsn
, indx
)
1091 DB_LSN
*lsnp
, null_lsn
;
1092 u_int32_t rectype
, txn_num
;
1096 rectype
= DB_bam_cdel
;
1097 txn_num
= txnid
== NULL
? 0 : txnid
->txnid
;
1098 if (txnid
== NULL
) {
1102 lsnp
= &txnid
->last_lsn
;
1103 logrec
.size
= sizeof(rectype
) + sizeof(txn_num
) + sizeof(DB_LSN
)
1108 if ((ret
= __os_malloc(logrec
.size
, NULL
, &logrec
.data
)) != 0)
1112 memcpy(bp
, &rectype
, sizeof(rectype
));
1113 bp
+= sizeof(rectype
);
1114 memcpy(bp
, &txn_num
, sizeof(txn_num
));
1115 bp
+= sizeof(txn_num
);
1116 memcpy(bp
, lsnp
, sizeof(DB_LSN
));
1117 bp
+= sizeof(DB_LSN
);
1118 memcpy(bp
, &fileid
, sizeof(fileid
));
1119 bp
+= sizeof(fileid
);
1120 memcpy(bp
, &pgno
, sizeof(pgno
));
1123 memcpy(bp
, lsn
, sizeof(*lsn
));
1125 memset(bp
, 0, sizeof(*lsn
));
1127 memcpy(bp
, &indx
, sizeof(indx
));
1130 if ((u_int32_t
)(bp
- (u_int8_t
*)logrec
.data
) != logrec
.size
)
1131 fprintf(stderr
, "Error in log record length");
1133 ret
= log_put(logp
, ret_lsnp
, (DBT
*)&logrec
, flags
);
1135 txnid
->last_lsn
= *ret_lsnp
;
1136 __os_free(logrec
.data
, 0);
1141 * PUBLIC: int __bam_cdel_print
1142 * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *));
1145 __bam_cdel_print(notused1
, dbtp
, lsnp
, notused2
, notused3
)
1152 __bam_cdel_args
*argp
;
1163 if ((ret
= __bam_cdel_read(dbtp
->data
, &argp
)) != 0)
1165 printf("[%lu][%lu]bam_cdel: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
1167 (u_long
)lsnp
->offset
,
1169 (u_long
)argp
->txnid
->txnid
,
1170 (u_long
)argp
->prev_lsn
.file
,
1171 (u_long
)argp
->prev_lsn
.offset
);
1172 printf("\tfileid: %lu\n", (u_long
)argp
->fileid
);
1173 printf("\tpgno: %lu\n", (u_long
)argp
->pgno
);
1174 printf("\tlsn: [%lu][%lu]\n",
1175 (u_long
)argp
->lsn
.file
, (u_long
)argp
->lsn
.offset
);
1176 printf("\tindx: %lu\n", (u_long
)argp
->indx
);
1183 * PUBLIC: int __bam_cdel_read __P((void *, __bam_cdel_args **));
1186 __bam_cdel_read(recbuf
, argpp
)
1188 __bam_cdel_args
**argpp
;
1190 __bam_cdel_args
*argp
;
1194 ret
= __os_malloc(sizeof(__bam_cdel_args
) +
1195 sizeof(DB_TXN
), NULL
, &argp
);
1198 argp
->txnid
= (DB_TXN
*)&argp
[1];
1200 memcpy(&argp
->type
, bp
, sizeof(argp
->type
));
1201 bp
+= sizeof(argp
->type
);
1202 memcpy(&argp
->txnid
->txnid
, bp
, sizeof(argp
->txnid
->txnid
));
1203 bp
+= sizeof(argp
->txnid
->txnid
);
1204 memcpy(&argp
->prev_lsn
, bp
, sizeof(DB_LSN
));
1205 bp
+= sizeof(DB_LSN
);
1206 memcpy(&argp
->fileid
, bp
, sizeof(argp
->fileid
));
1207 bp
+= sizeof(argp
->fileid
);
1208 memcpy(&argp
->pgno
, bp
, sizeof(argp
->pgno
));
1209 bp
+= sizeof(argp
->pgno
);
1210 memcpy(&argp
->lsn
, bp
, sizeof(argp
->lsn
));
1211 bp
+= sizeof(argp
->lsn
);
1212 memcpy(&argp
->indx
, bp
, sizeof(argp
->indx
));
1213 bp
+= sizeof(argp
->indx
);
1219 * PUBLIC: int __bam_repl_log
1220 * PUBLIC: __P((DB_LOG *, DB_TXN *, DB_LSN *, u_int32_t,
1221 * PUBLIC: u_int32_t, db_pgno_t, DB_LSN *, u_int32_t,
1222 * PUBLIC: u_int32_t, const DBT *, const DBT *, u_int32_t,
1223 * PUBLIC: u_int32_t));
1225 int __bam_repl_log(logp
, txnid
, ret_lsnp
, flags
,
1226 fileid
, pgno
, lsn
, indx
, isdeleted
, orig
,
1227 repl
, prefix
, suffix
)
1236 u_int32_t isdeleted
;
1243 DB_LSN
*lsnp
, null_lsn
;
1245 u_int32_t rectype
, txn_num
;
1249 rectype
= DB_bam_repl
;
1250 txn_num
= txnid
== NULL
? 0 : txnid
->txnid
;
1251 if (txnid
== NULL
) {
1255 lsnp
= &txnid
->last_lsn
;
1256 logrec
.size
= sizeof(rectype
) + sizeof(txn_num
) + sizeof(DB_LSN
)
1262 + sizeof(u_int32_t
) + (orig
== NULL
? 0 : orig
->size
)
1263 + sizeof(u_int32_t
) + (repl
== NULL
? 0 : repl
->size
)
1266 if ((ret
= __os_malloc(logrec
.size
, NULL
, &logrec
.data
)) != 0)
1270 memcpy(bp
, &rectype
, sizeof(rectype
));
1271 bp
+= sizeof(rectype
);
1272 memcpy(bp
, &txn_num
, sizeof(txn_num
));
1273 bp
+= sizeof(txn_num
);
1274 memcpy(bp
, lsnp
, sizeof(DB_LSN
));
1275 bp
+= sizeof(DB_LSN
);
1276 memcpy(bp
, &fileid
, sizeof(fileid
));
1277 bp
+= sizeof(fileid
);
1278 memcpy(bp
, &pgno
, sizeof(pgno
));
1281 memcpy(bp
, lsn
, sizeof(*lsn
));
1283 memset(bp
, 0, sizeof(*lsn
));
1285 memcpy(bp
, &indx
, sizeof(indx
));
1287 memcpy(bp
, &isdeleted
, sizeof(isdeleted
));
1288 bp
+= sizeof(isdeleted
);
1291 memcpy(bp
, &zero
, sizeof(u_int32_t
));
1292 bp
+= sizeof(u_int32_t
);
1294 memcpy(bp
, &orig
->size
, sizeof(orig
->size
));
1295 bp
+= sizeof(orig
->size
);
1296 memcpy(bp
, orig
->data
, orig
->size
);
1301 memcpy(bp
, &zero
, sizeof(u_int32_t
));
1302 bp
+= sizeof(u_int32_t
);
1304 memcpy(bp
, &repl
->size
, sizeof(repl
->size
));
1305 bp
+= sizeof(repl
->size
);
1306 memcpy(bp
, repl
->data
, repl
->size
);
1309 memcpy(bp
, &prefix
, sizeof(prefix
));
1310 bp
+= sizeof(prefix
);
1311 memcpy(bp
, &suffix
, sizeof(suffix
));
1312 bp
+= sizeof(suffix
);
1314 if ((u_int32_t
)(bp
- (u_int8_t
*)logrec
.data
) != logrec
.size
)
1315 fprintf(stderr
, "Error in log record length");
1317 ret
= log_put(logp
, ret_lsnp
, (DBT
*)&logrec
, flags
);
1319 txnid
->last_lsn
= *ret_lsnp
;
1320 __os_free(logrec
.data
, 0);
1325 * PUBLIC: int __bam_repl_print
1326 * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *));
1329 __bam_repl_print(notused1
, dbtp
, lsnp
, notused2
, notused3
)
1336 __bam_repl_args
*argp
;
1347 if ((ret
= __bam_repl_read(dbtp
->data
, &argp
)) != 0)
1349 printf("[%lu][%lu]bam_repl: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
1351 (u_long
)lsnp
->offset
,
1353 (u_long
)argp
->txnid
->txnid
,
1354 (u_long
)argp
->prev_lsn
.file
,
1355 (u_long
)argp
->prev_lsn
.offset
);
1356 printf("\tfileid: %lu\n", (u_long
)argp
->fileid
);
1357 printf("\tpgno: %lu\n", (u_long
)argp
->pgno
);
1358 printf("\tlsn: [%lu][%lu]\n",
1359 (u_long
)argp
->lsn
.file
, (u_long
)argp
->lsn
.offset
);
1360 printf("\tindx: %lu\n", (u_long
)argp
->indx
);
1361 printf("\tisdeleted: %lu\n", (u_long
)argp
->isdeleted
);
1363 for (i
= 0; i
< argp
->orig
.size
; i
++) {
1364 ch
= ((u_int8_t
*)argp
->orig
.data
)[i
];
1365 if (isprint(ch
) || ch
== 0xa)
1372 for (i
= 0; i
< argp
->repl
.size
; i
++) {
1373 ch
= ((u_int8_t
*)argp
->repl
.data
)[i
];
1374 if (isprint(ch
) || ch
== 0xa)
1380 printf("\tprefix: %lu\n", (u_long
)argp
->prefix
);
1381 printf("\tsuffix: %lu\n", (u_long
)argp
->suffix
);
1388 * PUBLIC: int __bam_repl_read __P((void *, __bam_repl_args **));
1391 __bam_repl_read(recbuf
, argpp
)
1393 __bam_repl_args
**argpp
;
1395 __bam_repl_args
*argp
;
1399 ret
= __os_malloc(sizeof(__bam_repl_args
) +
1400 sizeof(DB_TXN
), NULL
, &argp
);
1403 argp
->txnid
= (DB_TXN
*)&argp
[1];
1405 memcpy(&argp
->type
, bp
, sizeof(argp
->type
));
1406 bp
+= sizeof(argp
->type
);
1407 memcpy(&argp
->txnid
->txnid
, bp
, sizeof(argp
->txnid
->txnid
));
1408 bp
+= sizeof(argp
->txnid
->txnid
);
1409 memcpy(&argp
->prev_lsn
, bp
, sizeof(DB_LSN
));
1410 bp
+= sizeof(DB_LSN
);
1411 memcpy(&argp
->fileid
, bp
, sizeof(argp
->fileid
));
1412 bp
+= sizeof(argp
->fileid
);
1413 memcpy(&argp
->pgno
, bp
, sizeof(argp
->pgno
));
1414 bp
+= sizeof(argp
->pgno
);
1415 memcpy(&argp
->lsn
, bp
, sizeof(argp
->lsn
));
1416 bp
+= sizeof(argp
->lsn
);
1417 memcpy(&argp
->indx
, bp
, sizeof(argp
->indx
));
1418 bp
+= sizeof(argp
->indx
);
1419 memcpy(&argp
->isdeleted
, bp
, sizeof(argp
->isdeleted
));
1420 bp
+= sizeof(argp
->isdeleted
);
1421 memcpy(&argp
->orig
.size
, bp
, sizeof(u_int32_t
));
1422 bp
+= sizeof(u_int32_t
);
1423 argp
->orig
.data
= bp
;
1424 bp
+= argp
->orig
.size
;
1425 memcpy(&argp
->repl
.size
, bp
, sizeof(u_int32_t
));
1426 bp
+= sizeof(u_int32_t
);
1427 argp
->repl
.data
= bp
;
1428 bp
+= argp
->repl
.size
;
1429 memcpy(&argp
->prefix
, bp
, sizeof(argp
->prefix
));
1430 bp
+= sizeof(argp
->prefix
);
1431 memcpy(&argp
->suffix
, bp
, sizeof(argp
->suffix
));
1432 bp
+= sizeof(argp
->suffix
);
1438 * PUBLIC: int __bam_init_print __P((DB_ENV *));
1441 __bam_init_print(dbenv
)
1446 if ((ret
= __db_add_recovery(dbenv
,
1447 __bam_pg_alloc_print
, DB_bam_pg_alloc
)) != 0)
1449 if ((ret
= __db_add_recovery(dbenv
,
1450 __bam_pg_free_print
, DB_bam_pg_free
)) != 0)
1452 if ((ret
= __db_add_recovery(dbenv
,
1453 __bam_split_print
, DB_bam_split
)) != 0)
1455 if ((ret
= __db_add_recovery(dbenv
,
1456 __bam_rsplit_print
, DB_bam_rsplit
)) != 0)
1458 if ((ret
= __db_add_recovery(dbenv
,
1459 __bam_adj_print
, DB_bam_adj
)) != 0)
1461 if ((ret
= __db_add_recovery(dbenv
,
1462 __bam_cadjust_print
, DB_bam_cadjust
)) != 0)
1464 if ((ret
= __db_add_recovery(dbenv
,
1465 __bam_cdel_print
, DB_bam_cdel
)) != 0)
1467 if ((ret
= __db_add_recovery(dbenv
,
1468 __bam_repl_print
, DB_bam_repl
)) != 0)
1474 * PUBLIC: int __bam_init_recover __P((DB_ENV *));
1477 __bam_init_recover(dbenv
)
1482 if ((ret
= __db_add_recovery(dbenv
,
1483 __bam_pg_alloc_recover
, DB_bam_pg_alloc
)) != 0)
1485 if ((ret
= __db_add_recovery(dbenv
,
1486 __bam_pg_free_recover
, DB_bam_pg_free
)) != 0)
1488 if ((ret
= __db_add_recovery(dbenv
,
1489 __bam_split_recover
, DB_bam_split
)) != 0)
1491 if ((ret
= __db_add_recovery(dbenv
,
1492 __bam_rsplit_recover
, DB_bam_rsplit
)) != 0)
1494 if ((ret
= __db_add_recovery(dbenv
,
1495 __bam_adj_recover
, DB_bam_adj
)) != 0)
1497 if ((ret
= __db_add_recovery(dbenv
,
1498 __bam_cadjust_recover
, DB_bam_cadjust
)) != 0)
1500 if ((ret
= __db_add_recovery(dbenv
,
1501 __bam_cdel_recover
, DB_bam_cdel
)) != 0)
1503 if ((ret
= __db_add_recovery(dbenv
,
1504 __bam_repl_recover
, DB_bam_repl
)) != 0)