Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

btree_autop.c

00001 /* Do not edit: automatically built by gen_rec.awk. */
00002 
00003 #include "db_config.h"
00004 
00005 #ifndef NO_SYSTEM_INCLUDES
00006 #include <sys/types.h>
00007 
00008 #include <ctype.h>
00009 #include <string.h>
00010 #endif
00011 
00012 #include "db_int.h"
00013 #include "dbinc/crypto.h"
00014 #include "dbinc/db_page.h"
00015 #include "dbinc/db_dispatch.h"
00016 #include "dbinc/db_am.h"
00017 #include "dbinc/btree.h"
00018 #include "dbinc/log.h"
00019 #include "dbinc/txn.h"
00020 
00021 /*
00022  * PUBLIC: int __bam_split_print __P((DB_ENV *, DBT *, DB_LSN *,
00023  * PUBLIC:     db_recops, void *));
00024  */
00025 int
00026 __bam_split_print(dbenv, dbtp, lsnp, notused2, notused3)
00027         DB_ENV *dbenv;
00028         DBT *dbtp;
00029         DB_LSN *lsnp;
00030         db_recops notused2;
00031         void *notused3;
00032 {
00033         __bam_split_args *argp;
00034         u_int32_t i;
00035         int ch;
00036         int ret;
00037 
00038         notused2 = DB_TXN_PRINT;
00039         notused3 = NULL;
00040 
00041         if ((ret = __bam_split_read(dbenv, dbtp->data, &argp)) != 0)
00042                 return (ret);
00043         (void)printf(
00044             "[%lu][%lu]__bam_split%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00045             (u_long)lsnp->file,
00046             (u_long)lsnp->offset,
00047             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00048             (u_long)argp->type,
00049             (u_long)argp->txnid->txnid,
00050             (u_long)argp->prev_lsn.file,
00051             (u_long)argp->prev_lsn.offset);
00052         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00053         (void)printf("\tleft: %lu\n", (u_long)argp->left);
00054         (void)printf("\tllsn: [%lu][%lu]\n",
00055             (u_long)argp->llsn.file, (u_long)argp->llsn.offset);
00056         (void)printf("\tright: %lu\n", (u_long)argp->right);
00057         (void)printf("\trlsn: [%lu][%lu]\n",
00058             (u_long)argp->rlsn.file, (u_long)argp->rlsn.offset);
00059         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
00060         (void)printf("\tnpgno: %lu\n", (u_long)argp->npgno);
00061         (void)printf("\tnlsn: [%lu][%lu]\n",
00062             (u_long)argp->nlsn.file, (u_long)argp->nlsn.offset);
00063         (void)printf("\troot_pgno: %lu\n", (u_long)argp->root_pgno);
00064         (void)printf("\tpg: ");
00065         for (i = 0; i < argp->pg.size; i++) {
00066                 ch = ((u_int8_t *)argp->pg.data)[i];
00067                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00068         }
00069         (void)printf("\n");
00070         (void)printf("\topflags: %lu\n", (u_long)argp->opflags);
00071         (void)printf("\n");
00072         __os_free(dbenv, argp);
00073         return (0);
00074 }
00075 
00076 /*
00077  * PUBLIC: int __bam_rsplit_print __P((DB_ENV *, DBT *, DB_LSN *,
00078  * PUBLIC:     db_recops, void *));
00079  */
00080 int
00081 __bam_rsplit_print(dbenv, dbtp, lsnp, notused2, notused3)
00082         DB_ENV *dbenv;
00083         DBT *dbtp;
00084         DB_LSN *lsnp;
00085         db_recops notused2;
00086         void *notused3;
00087 {
00088         __bam_rsplit_args *argp;
00089         u_int32_t i;
00090         int ch;
00091         int ret;
00092 
00093         notused2 = DB_TXN_PRINT;
00094         notused3 = NULL;
00095 
00096         if ((ret = __bam_rsplit_read(dbenv, dbtp->data, &argp)) != 0)
00097                 return (ret);
00098         (void)printf(
00099             "[%lu][%lu]__bam_rsplit%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00100             (u_long)lsnp->file,
00101             (u_long)lsnp->offset,
00102             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00103             (u_long)argp->type,
00104             (u_long)argp->txnid->txnid,
00105             (u_long)argp->prev_lsn.file,
00106             (u_long)argp->prev_lsn.offset);
00107         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00108         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00109         (void)printf("\tpgdbt: ");
00110         for (i = 0; i < argp->pgdbt.size; i++) {
00111                 ch = ((u_int8_t *)argp->pgdbt.data)[i];
00112                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00113         }
00114         (void)printf("\n");
00115         (void)printf("\troot_pgno: %lu\n", (u_long)argp->root_pgno);
00116         (void)printf("\tnrec: %lu\n", (u_long)argp->nrec);
00117         (void)printf("\trootent: ");
00118         for (i = 0; i < argp->rootent.size; i++) {
00119                 ch = ((u_int8_t *)argp->rootent.data)[i];
00120                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00121         }
00122         (void)printf("\n");
00123         (void)printf("\trootlsn: [%lu][%lu]\n",
00124             (u_long)argp->rootlsn.file, (u_long)argp->rootlsn.offset);
00125         (void)printf("\n");
00126         __os_free(dbenv, argp);
00127         return (0);
00128 }
00129 
00130 /*
00131  * PUBLIC: int __bam_adj_print __P((DB_ENV *, DBT *, DB_LSN *,
00132  * PUBLIC:     db_recops, void *));
00133  */
00134 int
00135 __bam_adj_print(dbenv, dbtp, lsnp, notused2, notused3)
00136         DB_ENV *dbenv;
00137         DBT *dbtp;
00138         DB_LSN *lsnp;
00139         db_recops notused2;
00140         void *notused3;
00141 {
00142         __bam_adj_args *argp;
00143         int ret;
00144 
00145         notused2 = DB_TXN_PRINT;
00146         notused3 = NULL;
00147 
00148         if ((ret = __bam_adj_read(dbenv, dbtp->data, &argp)) != 0)
00149                 return (ret);
00150         (void)printf(
00151             "[%lu][%lu]__bam_adj%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00152             (u_long)lsnp->file,
00153             (u_long)lsnp->offset,
00154             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00155             (u_long)argp->type,
00156             (u_long)argp->txnid->txnid,
00157             (u_long)argp->prev_lsn.file,
00158             (u_long)argp->prev_lsn.offset);
00159         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00160         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00161         (void)printf("\tlsn: [%lu][%lu]\n",
00162             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00163         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
00164         (void)printf("\tindx_copy: %lu\n", (u_long)argp->indx_copy);
00165         (void)printf("\tis_insert: %lu\n", (u_long)argp->is_insert);
00166         (void)printf("\n");
00167         __os_free(dbenv, argp);
00168         return (0);
00169 }
00170 
00171 /*
00172  * PUBLIC: int __bam_cadjust_print __P((DB_ENV *, DBT *, DB_LSN *,
00173  * PUBLIC:     db_recops, void *));
00174  */
00175 int
00176 __bam_cadjust_print(dbenv, dbtp, lsnp, notused2, notused3)
00177         DB_ENV *dbenv;
00178         DBT *dbtp;
00179         DB_LSN *lsnp;
00180         db_recops notused2;
00181         void *notused3;
00182 {
00183         __bam_cadjust_args *argp;
00184         int ret;
00185 
00186         notused2 = DB_TXN_PRINT;
00187         notused3 = NULL;
00188 
00189         if ((ret = __bam_cadjust_read(dbenv, dbtp->data, &argp)) != 0)
00190                 return (ret);
00191         (void)printf(
00192             "[%lu][%lu]__bam_cadjust%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00193             (u_long)lsnp->file,
00194             (u_long)lsnp->offset,
00195             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00196             (u_long)argp->type,
00197             (u_long)argp->txnid->txnid,
00198             (u_long)argp->prev_lsn.file,
00199             (u_long)argp->prev_lsn.offset);
00200         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00201         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00202         (void)printf("\tlsn: [%lu][%lu]\n",
00203             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00204         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
00205         (void)printf("\tadjust: %ld\n", (long)argp->adjust);
00206         (void)printf("\topflags: %lu\n", (u_long)argp->opflags);
00207         (void)printf("\n");
00208         __os_free(dbenv, argp);
00209         return (0);
00210 }
00211 
00212 /*
00213  * PUBLIC: int __bam_cdel_print __P((DB_ENV *, DBT *, DB_LSN *,
00214  * PUBLIC:     db_recops, void *));
00215  */
00216 int
00217 __bam_cdel_print(dbenv, dbtp, lsnp, notused2, notused3)
00218         DB_ENV *dbenv;
00219         DBT *dbtp;
00220         DB_LSN *lsnp;
00221         db_recops notused2;
00222         void *notused3;
00223 {
00224         __bam_cdel_args *argp;
00225         int ret;
00226 
00227         notused2 = DB_TXN_PRINT;
00228         notused3 = NULL;
00229 
00230         if ((ret = __bam_cdel_read(dbenv, dbtp->data, &argp)) != 0)
00231                 return (ret);
00232         (void)printf(
00233             "[%lu][%lu]__bam_cdel%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00234             (u_long)lsnp->file,
00235             (u_long)lsnp->offset,
00236             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00237             (u_long)argp->type,
00238             (u_long)argp->txnid->txnid,
00239             (u_long)argp->prev_lsn.file,
00240             (u_long)argp->prev_lsn.offset);
00241         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00242         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00243         (void)printf("\tlsn: [%lu][%lu]\n",
00244             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00245         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
00246         (void)printf("\n");
00247         __os_free(dbenv, argp);
00248         return (0);
00249 }
00250 
00251 /*
00252  * PUBLIC: int __bam_repl_print __P((DB_ENV *, DBT *, DB_LSN *,
00253  * PUBLIC:     db_recops, void *));
00254  */
00255 int
00256 __bam_repl_print(dbenv, dbtp, lsnp, notused2, notused3)
00257         DB_ENV *dbenv;
00258         DBT *dbtp;
00259         DB_LSN *lsnp;
00260         db_recops notused2;
00261         void *notused3;
00262 {
00263         __bam_repl_args *argp;
00264         u_int32_t i;
00265         int ch;
00266         int ret;
00267 
00268         notused2 = DB_TXN_PRINT;
00269         notused3 = NULL;
00270 
00271         if ((ret = __bam_repl_read(dbenv, dbtp->data, &argp)) != 0)
00272                 return (ret);
00273         (void)printf(
00274             "[%lu][%lu]__bam_repl%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00275             (u_long)lsnp->file,
00276             (u_long)lsnp->offset,
00277             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00278             (u_long)argp->type,
00279             (u_long)argp->txnid->txnid,
00280             (u_long)argp->prev_lsn.file,
00281             (u_long)argp->prev_lsn.offset);
00282         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00283         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00284         (void)printf("\tlsn: [%lu][%lu]\n",
00285             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00286         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
00287         (void)printf("\tisdeleted: %lu\n", (u_long)argp->isdeleted);
00288         (void)printf("\torig: ");
00289         for (i = 0; i < argp->orig.size; i++) {
00290                 ch = ((u_int8_t *)argp->orig.data)[i];
00291                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00292         }
00293         (void)printf("\n");
00294         (void)printf("\trepl: ");
00295         for (i = 0; i < argp->repl.size; i++) {
00296                 ch = ((u_int8_t *)argp->repl.data)[i];
00297                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00298         }
00299         (void)printf("\n");
00300         (void)printf("\tprefix: %lu\n", (u_long)argp->prefix);
00301         (void)printf("\tsuffix: %lu\n", (u_long)argp->suffix);
00302         (void)printf("\n");
00303         __os_free(dbenv, argp);
00304         return (0);
00305 }
00306 
00307 /*
00308  * PUBLIC: int __bam_root_print __P((DB_ENV *, DBT *, DB_LSN *,
00309  * PUBLIC:     db_recops, void *));
00310  */
00311 int
00312 __bam_root_print(dbenv, dbtp, lsnp, notused2, notused3)
00313         DB_ENV *dbenv;
00314         DBT *dbtp;
00315         DB_LSN *lsnp;
00316         db_recops notused2;
00317         void *notused3;
00318 {
00319         __bam_root_args *argp;
00320         int ret;
00321 
00322         notused2 = DB_TXN_PRINT;
00323         notused3 = NULL;
00324 
00325         if ((ret = __bam_root_read(dbenv, dbtp->data, &argp)) != 0)
00326                 return (ret);
00327         (void)printf(
00328             "[%lu][%lu]__bam_root%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00329             (u_long)lsnp->file,
00330             (u_long)lsnp->offset,
00331             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00332             (u_long)argp->type,
00333             (u_long)argp->txnid->txnid,
00334             (u_long)argp->prev_lsn.file,
00335             (u_long)argp->prev_lsn.offset);
00336         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00337         (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno);
00338         (void)printf("\troot_pgno: %lu\n", (u_long)argp->root_pgno);
00339         (void)printf("\tmeta_lsn: [%lu][%lu]\n",
00340             (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset);
00341         (void)printf("\n");
00342         __os_free(dbenv, argp);
00343         return (0);
00344 }
00345 
00346 /*
00347  * PUBLIC: int __bam_curadj_print __P((DB_ENV *, DBT *, DB_LSN *,
00348  * PUBLIC:     db_recops, void *));
00349  */
00350 int
00351 __bam_curadj_print(dbenv, dbtp, lsnp, notused2, notused3)
00352         DB_ENV *dbenv;
00353         DBT *dbtp;
00354         DB_LSN *lsnp;
00355         db_recops notused2;
00356         void *notused3;
00357 {
00358         __bam_curadj_args *argp;
00359         int ret;
00360 
00361         notused2 = DB_TXN_PRINT;
00362         notused3 = NULL;
00363 
00364         if ((ret = __bam_curadj_read(dbenv, dbtp->data, &argp)) != 0)
00365                 return (ret);
00366         (void)printf(
00367             "[%lu][%lu]__bam_curadj%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00368             (u_long)lsnp->file,
00369             (u_long)lsnp->offset,
00370             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00371             (u_long)argp->type,
00372             (u_long)argp->txnid->txnid,
00373             (u_long)argp->prev_lsn.file,
00374             (u_long)argp->prev_lsn.offset);
00375         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00376         (void)printf("\tmode: %ld\n", (long)argp->mode);
00377         (void)printf("\tfrom_pgno: %lu\n", (u_long)argp->from_pgno);
00378         (void)printf("\tto_pgno: %lu\n", (u_long)argp->to_pgno);
00379         (void)printf("\tleft_pgno: %lu\n", (u_long)argp->left_pgno);
00380         (void)printf("\tfirst_indx: %lu\n", (u_long)argp->first_indx);
00381         (void)printf("\tfrom_indx: %lu\n", (u_long)argp->from_indx);
00382         (void)printf("\tto_indx: %lu\n", (u_long)argp->to_indx);
00383         (void)printf("\n");
00384         __os_free(dbenv, argp);
00385         return (0);
00386 }
00387 
00388 /*
00389  * PUBLIC: int __bam_rcuradj_print __P((DB_ENV *, DBT *, DB_LSN *,
00390  * PUBLIC:     db_recops, void *));
00391  */
00392 int
00393 __bam_rcuradj_print(dbenv, dbtp, lsnp, notused2, notused3)
00394         DB_ENV *dbenv;
00395         DBT *dbtp;
00396         DB_LSN *lsnp;
00397         db_recops notused2;
00398         void *notused3;
00399 {
00400         __bam_rcuradj_args *argp;
00401         int ret;
00402 
00403         notused2 = DB_TXN_PRINT;
00404         notused3 = NULL;
00405 
00406         if ((ret = __bam_rcuradj_read(dbenv, dbtp->data, &argp)) != 0)
00407                 return (ret);
00408         (void)printf(
00409             "[%lu][%lu]__bam_rcuradj%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00410             (u_long)lsnp->file,
00411             (u_long)lsnp->offset,
00412             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00413             (u_long)argp->type,
00414             (u_long)argp->txnid->txnid,
00415             (u_long)argp->prev_lsn.file,
00416             (u_long)argp->prev_lsn.offset);
00417         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00418         (void)printf("\tmode: %ld\n", (long)argp->mode);
00419         (void)printf("\troot: %ld\n", (long)argp->root);
00420         (void)printf("\trecno: %ld\n", (long)argp->recno);
00421         (void)printf("\torder: %ld\n", (long)argp->order);
00422         (void)printf("\n");
00423         __os_free(dbenv, argp);
00424         return (0);
00425 }
00426 
00427 /*
00428  * PUBLIC: int __bam_relink_print __P((DB_ENV *, DBT *, DB_LSN *,
00429  * PUBLIC:     db_recops, void *));
00430  */
00431 int
00432 __bam_relink_print(dbenv, dbtp, lsnp, notused2, notused3)
00433         DB_ENV *dbenv;
00434         DBT *dbtp;
00435         DB_LSN *lsnp;
00436         db_recops notused2;
00437         void *notused3;
00438 {
00439         __bam_relink_args *argp;
00440         int ret;
00441 
00442         notused2 = DB_TXN_PRINT;
00443         notused3 = NULL;
00444 
00445         if ((ret = __bam_relink_read(dbenv, dbtp->data, &argp)) != 0)
00446                 return (ret);
00447         (void)printf(
00448             "[%lu][%lu]__bam_relink%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00449             (u_long)lsnp->file,
00450             (u_long)lsnp->offset,
00451             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00452             (u_long)argp->type,
00453             (u_long)argp->txnid->txnid,
00454             (u_long)argp->prev_lsn.file,
00455             (u_long)argp->prev_lsn.offset);
00456         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00457         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00458         (void)printf("\tnew_pgno: %lu\n", (u_long)argp->new_pgno);
00459         (void)printf("\tprev: %lu\n", (u_long)argp->prev);
00460         (void)printf("\tlsn_prev: [%lu][%lu]\n",
00461             (u_long)argp->lsn_prev.file, (u_long)argp->lsn_prev.offset);
00462         (void)printf("\tnext: %lu\n", (u_long)argp->next);
00463         (void)printf("\tlsn_next: [%lu][%lu]\n",
00464             (u_long)argp->lsn_next.file, (u_long)argp->lsn_next.offset);
00465         (void)printf("\n");
00466         __os_free(dbenv, argp);
00467         return (0);
00468 }
00469 
00470 /*
00471  * PUBLIC: int __bam_merge_print __P((DB_ENV *, DBT *, DB_LSN *,
00472  * PUBLIC:     db_recops, void *));
00473  */
00474 int
00475 __bam_merge_print(dbenv, dbtp, lsnp, notused2, notused3)
00476         DB_ENV *dbenv;
00477         DBT *dbtp;
00478         DB_LSN *lsnp;
00479         db_recops notused2;
00480         void *notused3;
00481 {
00482         __bam_merge_args *argp;
00483         u_int32_t i;
00484         int ch;
00485         int ret;
00486 
00487         notused2 = DB_TXN_PRINT;
00488         notused3 = NULL;
00489 
00490         if ((ret = __bam_merge_read(dbenv, dbtp->data, &argp)) != 0)
00491                 return (ret);
00492         (void)printf(
00493             "[%lu][%lu]__bam_merge%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00494             (u_long)lsnp->file,
00495             (u_long)lsnp->offset,
00496             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00497             (u_long)argp->type,
00498             (u_long)argp->txnid->txnid,
00499             (u_long)argp->prev_lsn.file,
00500             (u_long)argp->prev_lsn.offset);
00501         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00502         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00503         (void)printf("\tlsn: [%lu][%lu]\n",
00504             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00505         (void)printf("\tnpgno: %lu\n", (u_long)argp->npgno);
00506         (void)printf("\tnlsn: [%lu][%lu]\n",
00507             (u_long)argp->nlsn.file, (u_long)argp->nlsn.offset);
00508         (void)printf("\thdr: ");
00509         for (i = 0; i < argp->hdr.size; i++) {
00510                 ch = ((u_int8_t *)argp->hdr.data)[i];
00511                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00512         }
00513         (void)printf("\n");
00514         (void)printf("\tdata: ");
00515         for (i = 0; i < argp->data.size; i++) {
00516                 ch = ((u_int8_t *)argp->data.data)[i];
00517                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00518         }
00519         (void)printf("\n");
00520         (void)printf("\tind: ");
00521         for (i = 0; i < argp->ind.size; i++) {
00522                 ch = ((u_int8_t *)argp->ind.data)[i];
00523                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00524         }
00525         (void)printf("\n");
00526         (void)printf("\n");
00527         __os_free(dbenv, argp);
00528         return (0);
00529 }
00530 
00531 /*
00532  * PUBLIC: int __bam_pgno_print __P((DB_ENV *, DBT *, DB_LSN *,
00533  * PUBLIC:     db_recops, void *));
00534  */
00535 int
00536 __bam_pgno_print(dbenv, dbtp, lsnp, notused2, notused3)
00537         DB_ENV *dbenv;
00538         DBT *dbtp;
00539         DB_LSN *lsnp;
00540         db_recops notused2;
00541         void *notused3;
00542 {
00543         __bam_pgno_args *argp;
00544         int ret;
00545 
00546         notused2 = DB_TXN_PRINT;
00547         notused3 = NULL;
00548 
00549         if ((ret = __bam_pgno_read(dbenv, dbtp->data, &argp)) != 0)
00550                 return (ret);
00551         (void)printf(
00552             "[%lu][%lu]__bam_pgno%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00553             (u_long)lsnp->file,
00554             (u_long)lsnp->offset,
00555             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00556             (u_long)argp->type,
00557             (u_long)argp->txnid->txnid,
00558             (u_long)argp->prev_lsn.file,
00559             (u_long)argp->prev_lsn.offset);
00560         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00561         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00562         (void)printf("\tlsn: [%lu][%lu]\n",
00563             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00564         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
00565         (void)printf("\topgno: %lu\n", (u_long)argp->opgno);
00566         (void)printf("\tnpgno: %lu\n", (u_long)argp->npgno);
00567         (void)printf("\n");
00568         __os_free(dbenv, argp);
00569         return (0);
00570 }
00571 
00572 /*
00573  * PUBLIC: int __bam_init_print __P((DB_ENV *, int (***)(DB_ENV *,
00574  * PUBLIC:     DBT *, DB_LSN *, db_recops, void *), size_t *));
00575  */
00576 int
00577 __bam_init_print(dbenv, dtabp, dtabsizep)
00578         DB_ENV *dbenv;
00579         int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
00580         size_t *dtabsizep;
00581 {
00582         int ret;
00583 
00584         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00585             __bam_split_print, DB___bam_split)) != 0)
00586                 return (ret);
00587         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00588             __bam_rsplit_print, DB___bam_rsplit)) != 0)
00589                 return (ret);
00590         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00591             __bam_adj_print, DB___bam_adj)) != 0)
00592                 return (ret);
00593         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00594             __bam_cadjust_print, DB___bam_cadjust)) != 0)
00595                 return (ret);
00596         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00597             __bam_cdel_print, DB___bam_cdel)) != 0)
00598                 return (ret);
00599         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00600             __bam_repl_print, DB___bam_repl)) != 0)
00601                 return (ret);
00602         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00603             __bam_root_print, DB___bam_root)) != 0)
00604                 return (ret);
00605         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00606             __bam_curadj_print, DB___bam_curadj)) != 0)
00607                 return (ret);
00608         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00609             __bam_rcuradj_print, DB___bam_rcuradj)) != 0)
00610                 return (ret);
00611         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00612             __bam_relink_print, DB___bam_relink)) != 0)
00613                 return (ret);
00614         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00615             __bam_merge_print, DB___bam_merge)) != 0)
00616                 return (ret);
00617         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00618             __bam_pgno_print, DB___bam_pgno)) != 0)
00619                 return (ret);
00620         return (0);
00621 }

Generated on Sun Dec 25 12:14:14 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2