Home | History | Annotate | Download | only in btree

Lines Matching defs:PAGE

48 #define	DEFMINKEYPAGE	(2)		/* Minimum keys per page */
50 #define MINPSIZE (512) /* Minimum page size */
53 * Page 0 of a btree file contains a copy of the meta-data. This page is also
54 * used as an out-of-band page, i.e. page pointers that point to nowhere point
55 * to page 0. Page 1 is the root of the btree.
57 #define P_INVALID 0 /* Invalid tree page number. */
58 #define P_META 0 /* Tree metadata page number. */
59 #define P_ROOT 1 /* Tree root page number. */
62 * There are five page layouts in the btree: btree internal pages (BINTERNAL),
64 * (RLEAF) and overflow pages. All five page types have a page header (PAGE).
70 pgno_t pgno; /* this page's page number */
74 #define P_BINTERNAL 0x01 /* btree internal page */
75 #define P_BLEAF 0x02 /* leaf page */
76 #define P_OVERFLOW 0x04 /* overflow page */
77 #define P_RINTERNAL 0x08 /* recno internal page */
78 #define P_RLEAF 0x10 /* leaf page */
83 indx_t lower; /* lower bound of free space on page */
84 indx_t upper; /* upper bound of free space on page */
86 } PAGE;
96 NEXTINDEX(const PAGE *p) {
107 * rest of the page immediately following the page header. Each offset is to
108 * an item which is unique to the type of page. The h_lower offset is just
110 * page. Offsets are from the beginning of the page.
112 * If an item is too big to store on a single page, a flag is set and the item
113 * is a { page, size } pair such that the page is the first page of an overflow
117 * The page number and size fields in the items are pgno_t-aligned so they can
127 * on that page. For a tree without duplicate keys, an internal page with two
129 * and less than b stored on the page associated with a. Duplicate keys are
130 * somewhat special and can cause duplicate internal and leaf page records and
135 pgno_t pgno; /* page number stored on */
142 /* Get the page's BINTERNAL structure at index indx. */
160 /* Copy a BINTERNAL entry to the page. */
172 * For the recno internal pages, the item is a page number with the number of
173 * keys found on that page and below.
177 pgno_t pgno; /* page number stored below */
180 /* Get the page's RINTERNAL structure at index indx. */
188 /* Copy a RINTERNAL entry to the page. */
203 /* Get the page's BLEAF structure at index indx. */
226 /* Copy a BLEAF entry to the page. */
248 /* Get the page's RLEAF structure at index indx. */
271 /* Copy a RLEAF entry to the page. */
282 * A record in the tree is either a pointer to a page and an index in the page
283 * or a page number and an index. These structures are used as a cursor, stack
286 * One comment about searches. Internal page searches must find the largest
287 * record less than key in the tree so that descents work. Leaf page searches
292 pgno_t pgno; /* the page number */
293 indx_t index; /* the index on the page */
297 PAGE *page; /* the (pinned) page */
298 indx_t index; /* the index on the page */
302 * About cursors. The cursor (and the page that contained the key/data pair
345 uint32_t psize; /* page size */
346 uint32_t free; /* page number of first free page */
359 EPG bt_cur; /* current (pinned) page */
360 PAGE *bt_pinned; /* page pinned across calls */
379 pgno_t bt_free; /* next free page */
380 uint32_t bt_psize; /* page size */