Update.
[glibc.git] / db2 / btree / btree.src
blob7c8c4b125f4209afc282cebd4926d8105c9f8caf
1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 1996, 1997
5  *      Sleepycat Software.  All rights reserved.
6  */
8 #include "config.h"
10 #ifndef lint
11 static const char sccsid[] = "@(#)btree.src     10.4 (Sleepycat) 8/27/97";
12 #endif /* not lint */
14 PREFIX  bam
17  * BTREE-pg_alloc: used to record allocating a new page.
18  *
19  * meta_lsn:    the meta-data page's original lsn.
20  * page_lsn:    the allocated page's original lsn.
21  * pgno:        the page allocated.
22  * next:        the next page on the free list.
23  */
24 BEGIN pg_alloc
25 ARG     fileid          u_int32_t       lu
26 POINTER meta_lsn        DB_LSN *        lu
27 POINTER page_lsn        DB_LSN *        lu
28 ARG     pgno            db_pgno_t       lu
29 ARG     ptype           u_int32_t       lu
30 ARG     next            db_pgno_t       lu
31 END
34  * BTREE-pg_free: used to record freeing a page.
35  *
36  * pgno:        the page being freed.
37  * meta_lsn:    the meta-data page's original lsn.
38  * header:      the header from the free'd page.
39  * next:        the previous next pointer on the metadata page.
40  */
41 BEGIN pg_free
42 ARG     fileid          u_int32_t       lu
43 ARG     pgno            db_pgno_t       lu
44 POINTER meta_lsn        DB_LSN *        lu
45 DBT     header          DBT             s
46 ARG     next            db_pgno_t       lu
47 END
50  * BTREE-split: used to log a page split.
51  *
52  * left:        the page number for the low-order contents.
53  * llsn:        the left page's original LSN.
54  * right:       the page number for the high-order contents.
55  * rlsn:        the right page's original LSN.
56  * indx:        the number of entries that went to the left page.
57  * npgno:       the next page number
58  * nlsn:        the next page's original LSN (or 0 if no next page).
59  * pg:          the split page's contents before the split.
60  */
61 BEGIN split
62 ARG     fileid          u_int32_t       lu
63 ARG     left            db_pgno_t       lu
64 POINTER llsn            DB_LSN *        lu
65 ARG     right           db_pgno_t       lu
66 POINTER rlsn            DB_LSN *        lu
67 ARG     indx            u_int32_t       lu
68 ARG     npgno           db_pgno_t       lu
69 POINTER nlsn            DB_LSN *        lu
70 DBT     pg              DBT             s
71 END
74  * BTREE-rsplit: used to log a reverse-split
75  *
76  * pgno:        the page number of the page copied over the root.
77  * pgdbt:       the page being copied on the root page.
78  * rootent:     last entry on the root page.
79  * rootlsn:     the root page's original lsn.
80  */
81 BEGIN rsplit
82 ARG     fileid          u_int32_t       lu
83 ARG     pgno            db_pgno_t       lu
84 DBT     pgdbt           DBT             s
85 DBT     rootent         DBT             s
86 POINTER rootlsn         DB_LSN *        lu
87 END
90  * BTREE-adj: used to log the adjustment of an index.
91  *
92  * pgno:        the page modified.
93  * lsn:         the page's original lsn.
94  * indx:        the index adjusted.
95  * indx_copy:   the index to copy if inserting.
96  * is_insert:   0 if a delete, 1 if an insert.
97  */
98 BEGIN adj
99 ARG     fileid          u_int32_t       lu
100 ARG     pgno            db_pgno_t       lu
101 POINTER lsn             DB_LSN *        lu
102 ARG     indx            u_int32_t       lu
103 ARG     indx_copy       u_int32_t       lu
104 ARG     is_insert       u_int32_t       lu
108  * BTREE-cadjust: used to adjust the count change in an internal page.
110  * pgno:        the page modified.
111  * lsn:         the page's original lsn.
112  * indx:        the index to be adjusted.
113  * adjust:      the signed adjustment.
114  * total:       if the total tree entries count should be adjusted
115  */
116 BEGIN cadjust
117 ARG     fileid          u_int32_t       lu
118 ARG     pgno            db_pgno_t       lu
119 POINTER lsn             DB_LSN *        lu
120 ARG     indx            u_int32_t       lu
121 ARG     adjust          int32_t         ld
122 ARG     total           int32_t         ld
126  * BTREE-cdel: used to log the intent-to-delete of a cursor record.
128  * pgno:        the page modified.
129  * lsn:         the page's original lsn.
130  * indx:        the index to be deleted.
131  */
132 BEGIN cdel
133 ARG     fileid          u_int32_t       lu
134 ARG     pgno            db_pgno_t       lu
135 POINTER lsn             DB_LSN *        lu
136 ARG     indx            u_int32_t       lu