1N/A/*-
1N/A * See the file LICENSE for redistribution information.
1N/A *
1N/A * Copyright (c) 1996, 1997, 1998
1N/A * Sleepycat Software. All rights reserved.
1N/A *
1N/A * @(#)db_page.h 10.18 (Sleepycat) 12/2/98
1N/A */
1N/A
1N/A#ifndef _DB_PAGE_H_
1N/A#define _DB_PAGE_H_
1N/A
1N/A/*
1N/A * DB page formats.
1N/A *
1N/A * This implementation requires that values within the following structures
1N/A * NOT be padded -- note, ANSI C permits random padding within structures.
1N/A * If your compiler pads randomly you can just forget ever making DB run on
1N/A * your system. In addition, no data type can require larger alignment than
1N/A * its own size, e.g., a 4-byte data element may not require 8-byte alignment.
1N/A *
1N/A * Note that key/data lengths are often stored in db_indx_t's -- this is
1N/A * not accidental, nor does it limit the key/data size. If the key/data
1N/A * item fits on a page, it's guaranteed to be small enough to fit into a
1N/A * db_indx_t, and storing it in one saves space.
1N/A */
1N/A
1N/A#define PGNO_METADATA 0 /* Metadata page number. */
1N/A#define PGNO_INVALID 0 /* Metadata page number, therefore illegal. */
1N/A#define PGNO_ROOT 1 /* Root is page #1. */
1N/A
1N/A/*
1N/A * When we create pages in mpool, we ask mpool to clear some number of bytes
1N/A * in the header. This number must be at least as big as the regular page
1N/A * headers and cover enough of the btree and hash meta-data pages to obliterate
1N/A * the magic and version numbers.
1N/A */
1N/A#define DB_PAGE_CLEAR_LEN 32
1N/A
1N/A/************************************************************************
1N/A BTREE METADATA PAGE LAYOUT
1N/A ************************************************************************/
1N/A
1N/A/*
1N/A * Btree metadata page layout:
1N/A */
1N/Atypedef struct _btmeta {
1N/A DB_LSN lsn; /* 00-07: LSN. */
1N/A db_pgno_t pgno; /* 08-11: Current page number. */
1N/A u_int32_t magic; /* 12-15: Magic number. */
1N/A u_int32_t version; /* 16-19: Version. */
1N/A u_int32_t pagesize; /* 20-23: Pagesize. */
1N/A u_int32_t maxkey; /* 24-27: Btree: Maxkey. */
1N/A u_int32_t minkey; /* 28-31: Btree: Minkey. */
1N/A u_int32_t free; /* 32-35: Free list page number. */
1N/A#define BTM_DUP 0x001 /* Duplicates. */
1N/A#define BTM_RECNO 0x002 /* Recno tree. */
1N/A#define BTM_RECNUM 0x004 /* Btree: maintain record count. */
1N/A#define BTM_FIXEDLEN 0x008 /* Recno: fixed length records. */
1N/A#define BTM_RENUMBER 0x010 /* Recno: renumber on insert/delete. */
1N/A#define BTM_MASK 0x01f
1N/A u_int32_t flags; /* 36-39: Flags. */
1N/A u_int32_t re_len; /* 40-43: Recno: fixed-length record length. */
1N/A u_int32_t re_pad; /* 44-47: Recno: fixed-length record pad. */
1N/A /* 48-67: Unique file ID. */
1N/A u_int8_t uid[DB_FILE_ID_LEN];
1N/A} BTMETA;
1N/A
1N/A/************************************************************************
1N/A HASH METADATA PAGE LAYOUT
1N/A ************************************************************************/
1N/A
1N/A/*
1N/A * Hash metadata page layout:
1N/A */
1N/A/* Hash Table Information */
1N/Atypedef struct hashhdr { /* Disk resident portion */
1N/A DB_LSN lsn; /* 00-07: LSN of the header page */
1N/A db_pgno_t pgno; /* 08-11: Page number (btree compatibility). */
1N/A u_int32_t magic; /* 12-15: Magic NO for hash tables */
1N/A u_int32_t version; /* 16-19: Version ID */
1N/A u_int32_t pagesize; /* 20-23: Bucket/Page Size */
1N/A u_int32_t ovfl_point; /* 24-27: Overflow page allocation location */
1N/A u_int32_t last_freed; /* 28-31: Last freed overflow page pgno */
1N/A u_int32_t max_bucket; /* 32-35: ID of Maximum bucket in use */
1N/A u_int32_t high_mask; /* 36-39: Modulo mask into table */
1N/A u_int32_t low_mask; /* 40-43: Modulo mask into table lower half */
1N/A u_int32_t ffactor; /* 44-47: Fill factor */
1N/A u_int32_t nelem; /* 48-51: Number of keys in hash table */
1N/A u_int32_t h_charkey; /* 52-55: Value of hash(CHARKEY) */
1N/A#define DB_HASH_DUP 0x01
1N/A u_int32_t flags; /* 56-59: Allow duplicates. */
1N/A#define NCACHED 32 /* number of spare points */
1N/A /* 60-187: Spare pages for overflow */
1N/A u_int32_t spares[NCACHED];
1N/A /* 188-207: Unique file ID. */
1N/A u_int8_t uid[DB_FILE_ID_LEN];
1N/A
1N/A /*
1N/A * Minimum page size is 256.
1N/A */
1N/A} HASHHDR;
1N/A
1N/A/************************************************************************
1N/A MAIN PAGE LAYOUT
1N/A ************************************************************************/
1N/A
1N/A/*
1N/A * +-----------------------------------+
1N/A * | lsn | pgno | prev pgno |
1N/A * +-----------------------------------+
1N/A * | next pgno | entries | hf offset |
1N/A * +-----------------------------------+
1N/A * | level | type | index |
1N/A * +-----------------------------------+
1N/A * | index | free --> |
1N/A * +-----------+-----------------------+
1N/A * | F R E E A R E A |
1N/A * +-----------------------------------+
1N/A * | <-- free | item |
1N/A * +-----------------------------------+
1N/A * | item | item | item |
1N/A * +-----------------------------------+
1N/A *
1N/A * sizeof(PAGE) == 26 bytes, and the following indices are guaranteed to be
1N/A * two-byte aligned.
1N/A *
1N/A * For hash and btree leaf pages, index items are paired, e.g., inp[0] is the
1N/A * key for inp[1]'s data. All other types of pages only contain single items.
1N/A */
1N/Atypedef struct _db_page {
1N/A DB_LSN lsn; /* 00-07: Log sequence number. */
1N/A db_pgno_t pgno; /* 08-11: Current page number. */
1N/A db_pgno_t prev_pgno; /* 12-15: Previous page number. */
1N/A db_pgno_t next_pgno; /* 16-19: Next page number. */
1N/A db_indx_t entries; /* 20-21: Number of item pairs on the page. */
1N/A db_indx_t hf_offset; /* 22-23: High free byte page offset. */
1N/A
1N/A /*
1N/A * The btree levels are numbered from the leaf to the root, starting
1N/A * with 1, so the leaf is level 1, its parent is level 2, and so on.
1N/A * We maintain this level on all btree pages, but the only place that
1N/A * we actually need it is on the root page. It would not be difficult
1N/A * to hide the byte on the root page once it becomes an internal page,
1N/A * so we could get this byte back if we needed it for something else.
1N/A */
1N/A#define LEAFLEVEL 1
1N/A#define MAXBTREELEVEL 255
1N/A u_int8_t level; /* 24: Btree tree level. */
1N/A
1N/A#define P_INVALID 0 /* Invalid page type. */
1N/A#define P_DUPLICATE 1 /* Duplicate. */
1N/A#define P_HASH 2 /* Hash. */
1N/A#define P_IBTREE 3 /* Btree internal. */
1N/A#define P_IRECNO 4 /* Recno internal. */
1N/A#define P_LBTREE 5 /* Btree leaf. */
1N/A#define P_LRECNO 6 /* Recno leaf. */
1N/A#define P_OVERFLOW 7 /* Overflow. */
1N/A u_int8_t type; /* 25: Page type. */
1N/A db_indx_t inp[1]; /* Variable length index of items. */
1N/A} PAGE;
1N/A
1N/A/* Element macros. */
1N/A#define LSN(p) (((PAGE *)p)->lsn)
1N/A#define PGNO(p) (((PAGE *)p)->pgno)
1N/A#define PREV_PGNO(p) (((PAGE *)p)->prev_pgno)
1N/A#define NEXT_PGNO(p) (((PAGE *)p)->next_pgno)
1N/A#define NUM_ENT(p) (((PAGE *)p)->entries)
1N/A#define HOFFSET(p) (((PAGE *)p)->hf_offset)
1N/A#define LEVEL(p) (((PAGE *)p)->level)
1N/A#define TYPE(p) (((PAGE *)p)->type)
1N/A
1N/A/*
1N/A * !!!
1N/A * The next_pgno and prev_pgno fields are not maintained for btree and recno
1N/A * internal pages. It's a minor performance improvement, and more, it's
1N/A * hard to do when deleting internal pages, and it decreases the chance of
1N/A * deadlock during deletes and splits.
1N/A *
1N/A * !!!
1N/A * The btree/recno access method needs db_recno_t bytes of space on the root
1N/A * page to specify how many records are stored in the tree. (The alternative
1N/A * is to store the number of records in the meta-data page, which will create
1N/A * a second hot spot in trees being actively modified, or recalculate it from
1N/A * the BINTERNAL fields on each access.) Overload the prev_pgno field.
1N/A */
1N/A#define RE_NREC(p) \
1N/A (TYPE(p) == P_LBTREE ? NUM_ENT(p) / 2 : \
1N/A TYPE(p) == P_LRECNO ? NUM_ENT(p) : PREV_PGNO(p))
1N/A#define RE_NREC_ADJ(p, adj) \
1N/A PREV_PGNO(p) += adj;
1N/A#define RE_NREC_SET(p, num) \
1N/A PREV_PGNO(p) = num;
1N/A
1N/A/*
1N/A * Initialize a page.
1N/A *
1N/A * !!!
1N/A * Don't modify the page's LSN, code depends on it being unchanged after a
1N/A * P_INIT call.
1N/A */
1N/A#define P_INIT(pg, pg_size, n, pg_prev, pg_next, btl, pg_type) do { \
1N/A PGNO(pg) = n; \
1N/A PREV_PGNO(pg) = pg_prev; \
1N/A NEXT_PGNO(pg) = pg_next; \
1N/A NUM_ENT(pg) = 0; \
1N/A HOFFSET(pg) = pg_size; \
1N/A LEVEL(pg) = btl; \
1N/A TYPE(pg) = pg_type; \
1N/A} while (0)
1N/A
1N/A/* Page header length (offset to first index). */
1N/A#define P_OVERHEAD (SSZA(PAGE, inp))
1N/A
1N/A/* First free byte. */
1N/A#define LOFFSET(pg) (P_OVERHEAD + NUM_ENT(pg) * sizeof(db_indx_t))
1N/A
1N/A/* Free space on the page. */
1N/A#define P_FREESPACE(pg) (HOFFSET(pg) - LOFFSET(pg))
1N/A
1N/A/* Get a pointer to the bytes at a specific index. */
1N/A#define P_ENTRY(pg, indx) ((u_int8_t *)pg + ((PAGE *)pg)->inp[indx])
1N/A
1N/A/************************************************************************
1N/A OVERFLOW PAGE LAYOUT
1N/A ************************************************************************/
1N/A
1N/A/*
1N/A * Overflow items are referenced by HOFFPAGE and BOVERFLOW structures, which
1N/A * store a page number (the first page of the overflow item) and a length
1N/A * (the total length of the overflow item). The overflow item consists of
1N/A * some number of overflow pages, linked by the next_pgno field of the page.
1N/A * A next_pgno field of PGNO_INVALID flags the end of the overflow item.
1N/A *
1N/A * Overflow page overloads:
1N/A * The amount of overflow data stored on each page is stored in the
1N/A * hf_offset field.
1N/A *
1N/A * The implementation reference counts overflow items as it's possible
1N/A * for them to be promoted onto btree internal pages. The reference
1N/A * count is stored in the entries field.
1N/A */
1N/A#define OV_LEN(p) (((PAGE *)p)->hf_offset)
1N/A#define OV_REF(p) (((PAGE *)p)->entries)
1N/A
1N/A/* Maximum number of bytes that you can put on an overflow page. */
1N/A#define P_MAXSPACE(psize) ((psize) - P_OVERHEAD)
1N/A
1N/A/************************************************************************
1N/A HASH PAGE LAYOUT
1N/A ************************************************************************/
1N/A
1N/A/* Each index references a group of bytes on the page. */
1N/A#define H_KEYDATA 1 /* Key/data item. */
1N/A#define H_DUPLICATE 2 /* Duplicate key/data item. */
1N/A#define H_OFFPAGE 3 /* Overflow key/data item. */
1N/A#define H_OFFDUP 4 /* Overflow page of duplicates. */
1N/A
1N/A/*
1N/A * !!!
1N/A * Items on hash pages are (potentially) unaligned, so we can never cast the
1N/A * (page + offset) pointer to an HKEYDATA, HOFFPAGE or HOFFDUP structure, as
1N/A * we do with B+tree on-page structures. Because we frequently want the type
1N/A * field, it requires no alignment, and it's in the same location in all three
1N/A * structures, there's a pair of macros.
1N/A */
1N/A#define HPAGE_PTYPE(p) (*(u_int8_t *)p)
1N/A#define HPAGE_TYPE(pg, indx) (*P_ENTRY(pg, indx))
1N/A
1N/A/*
1N/A * The first and second types are H_KEYDATA and H_DUPLICATE, represented
1N/A * by the HKEYDATA structure:
1N/A *
1N/A * +-----------------------------------+
1N/A * | type | key/data ... |
1N/A * +-----------------------------------+
1N/A *
1N/A * For duplicates, the data field encodes duplicate elements in the data
1N/A * field:
1N/A *
1N/A * +---------------------------------------------------------------+
1N/A * | type | len1 | element1 | len1 | len2 | element2 | len2 |
1N/A * +---------------------------------------------------------------+
1N/A *
1N/A * Thus, by keeping track of the offset in the element, we can do both
1N/A * backward and forward traversal.
1N/A */
1N/Atypedef struct _hkeydata {
1N/A u_int8_t type; /* 00: Page type. */
1N/A u_int8_t data[1]; /* Variable length key/data item. */
1N/A} HKEYDATA;
1N/A#define HKEYDATA_DATA(p) (((u_int8_t *)p) + SSZA(HKEYDATA, data))
1N/A
1N/A/*
1N/A * The length of any HKEYDATA item. Note that indx is an element index,
1N/A * not a PAIR index.
1N/A */
1N/A#define LEN_HITEM(pg, pgsize, indx) \
1N/A (((indx) == 0 ? pgsize : pg->inp[indx - 1]) - pg->inp[indx])
1N/A
1N/A#define LEN_HKEYDATA(pg, psize, indx) \
1N/A (((indx) == 0 ? psize : pg->inp[indx - 1]) - \
1N/A pg->inp[indx] - HKEYDATA_SIZE(0))
1N/A
1N/A/*
1N/A * Page space required to add a new HKEYDATA item to the page, with and
1N/A * without the index value.
1N/A */
1N/A#define HKEYDATA_SIZE(len) \
1N/A ((len) + SSZA(HKEYDATA, data))
1N/A#define HKEYDATA_PSIZE(len) \
1N/A (HKEYDATA_SIZE(len) + sizeof(db_indx_t))
1N/A
1N/A/* Put a HKEYDATA item at the location referenced by a page entry. */
1N/A#define PUT_HKEYDATA(pe, kd, len, type) { \
1N/A ((HKEYDATA *)pe)->type = type; \
1N/A memcpy((u_int8_t *)pe + sizeof(u_int8_t), kd, len); \
1N/A}
1N/A
1N/A/*
1N/A * Macros the describe the page layout in terms of key-data pairs.
1N/A * The use of "pindex" indicates that the argument is the index
1N/A * expressed in pairs instead of individual elements.
1N/A */
1N/A#define H_NUMPAIRS(pg) (NUM_ENT(pg) / 2)
1N/A#define H_KEYINDEX(pindx) (2 * (pindx))
1N/A#define H_DATAINDEX(pindx) ((2 * (pindx)) + 1)
1N/A#define H_PAIRKEY(pg, pindx) P_ENTRY(pg, H_KEYINDEX(pindx))
1N/A#define H_PAIRDATA(pg, pindx) P_ENTRY(pg, H_DATAINDEX(pindx))
1N/A#define H_PAIRSIZE(pg, psize, pindx) \
1N/A (LEN_HITEM(pg, psize, H_KEYINDEX(pindx)) + \
1N/A LEN_HITEM(pg, psize, H_DATAINDEX(pindx)))
1N/A#define LEN_HDATA(p, psize, pindx) LEN_HKEYDATA(p, psize, H_DATAINDEX(pindx))
1N/A#define LEN_HKEY(p, psize, pindx) LEN_HKEYDATA(p, psize, H_KEYINDEX(pindx))
1N/A
1N/A/*
1N/A * The third type is the H_OFFPAGE, represented by the HOFFPAGE structure:
1N/A */
1N/Atypedef struct _hoffpage {
1N/A u_int8_t type; /* 00: Page type and delete flag. */
1N/A u_int8_t unused[3]; /* 01-03: Padding, unused. */
1N/A db_pgno_t pgno; /* 04-07: Offpage page number. */
1N/A u_int32_t tlen; /* 08-11: Total length of item. */
1N/A} HOFFPAGE;
1N/A
1N/A#define HOFFPAGE_PGNO(p) (((u_int8_t *)p) + SSZ(HOFFPAGE, pgno))
1N/A#define HOFFPAGE_TLEN(p) (((u_int8_t *)p) + SSZ(HOFFPAGE, tlen))
1N/A
1N/A/*
1N/A * Page space required to add a new HOFFPAGE item to the page, with and
1N/A * without the index value.
1N/A */
1N/A#define HOFFPAGE_SIZE (sizeof(HOFFPAGE))
1N/A#define HOFFPAGE_PSIZE (HOFFPAGE_SIZE + sizeof(db_indx_t))
1N/A
1N/A/*
1N/A * The fourth type is H_OFFDUP represented by the HOFFDUP structure:
1N/A */
1N/Atypedef struct _hoffdup {
1N/A u_int8_t type; /* 00: Page type and delete flag. */
1N/A u_int8_t unused[3]; /* 01-03: Padding, unused. */
1N/A db_pgno_t pgno; /* 04-07: Offpage page number. */
1N/A} HOFFDUP;
1N/A#define HOFFDUP_PGNO(p) (((u_int8_t *)p) + SSZ(HOFFDUP, pgno))
1N/A
1N/A/*
1N/A * Page space required to add a new HOFFDUP item to the page, with and
1N/A * without the index value.
1N/A */
1N/A#define HOFFDUP_SIZE (sizeof(HOFFDUP))
1N/A#define HOFFDUP_PSIZE (HOFFDUP_SIZE + sizeof(db_indx_t))
1N/A
1N/A/************************************************************************
1N/A BTREE PAGE LAYOUT
1N/A ************************************************************************/
1N/A
1N/A/* Each index references a group of bytes on the page. */
1N/A#define B_KEYDATA 1 /* Key/data item. */
1N/A#define B_DUPLICATE 2 /* Duplicate key/data item. */
1N/A#define B_OVERFLOW 3 /* Overflow key/data item. */
1N/A
1N/A/*
1N/A * We have to store a deleted entry flag in the page. The reason is complex,
1N/A * but the simple version is that we can't delete on-page items referenced by
1N/A * a cursor -- the return order of subsequent insertions might be wrong. The
1N/A * delete flag is an overload of the top bit of the type byte.
1N/A */
1N/A#define B_DELETE (0x80)
1N/A#define B_DCLR(t) (t) &= ~B_DELETE
1N/A#define B_DSET(t) (t) |= B_DELETE
1N/A#define B_DISSET(t) ((t) & B_DELETE)
1N/A
1N/A#define B_TYPE(t) ((t) & ~B_DELETE)
1N/A#define B_TSET(t, type, deleted) { \
1N/A (t) = (type); \
1N/A if (deleted) \
1N/A B_DSET(t); \
1N/A}
1N/A
1N/A/*
1N/A * The first type is B_KEYDATA, represented by the BKEYDATA structure:
1N/A */
1N/Atypedef struct _bkeydata {
1N/A db_indx_t len; /* 00-01: Key/data item length. */
1N/A u_int8_t type; /* 02: Page type AND DELETE FLAG. */
1N/A u_int8_t data[1]; /* Variable length key/data item. */
1N/A} BKEYDATA;
1N/A
1N/A/* Get a BKEYDATA item for a specific index. */
1N/A#define GET_BKEYDATA(pg, indx) \
1N/A ((BKEYDATA *)P_ENTRY(pg, indx))
1N/A
1N/A/*
1N/A * Page space required to add a new BKEYDATA item to the page, with and
1N/A * without the index value.
1N/A */
1N/A#define BKEYDATA_SIZE(len) \
1N/A ALIGN((len) + SSZA(BKEYDATA, data), 4)
1N/A#define BKEYDATA_PSIZE(len) \
1N/A (BKEYDATA_SIZE(len) + sizeof(db_indx_t))
1N/A
1N/A/*
1N/A * The second and third types are B_DUPLICATE and B_OVERFLOW, represented
1N/A * by the BOVERFLOW structure.
1N/A */
1N/Atypedef struct _boverflow {
1N/A db_indx_t unused1; /* 00-01: Padding, unused. */
1N/A u_int8_t type; /* 02: Page type AND DELETE FLAG. */
1N/A u_int8_t unused2; /* 03: Padding, unused. */
1N/A db_pgno_t pgno; /* 04-07: Next page number. */
1N/A u_int32_t tlen; /* 08-11: Total length of item. */
1N/A} BOVERFLOW;
1N/A
1N/A/* Get a BOVERFLOW item for a specific index. */
1N/A#define GET_BOVERFLOW(pg, indx) \
1N/A ((BOVERFLOW *)P_ENTRY(pg, indx))
1N/A
1N/A/*
1N/A * Page space required to add a new BOVERFLOW item to the page, with and
1N/A * without the index value.
1N/A */
1N/A#define BOVERFLOW_SIZE \
1N/A ALIGN(sizeof(BOVERFLOW), 4)
1N/A#define BOVERFLOW_PSIZE \
1N/A (BOVERFLOW_SIZE + sizeof(db_indx_t))
1N/A
1N/A/*
1N/A * Btree leaf and hash page layouts group indices in sets of two, one
1N/A * for the key and one for the data. Everything else does it in sets
1N/A * of one to save space. I use the following macros so that it's real
1N/A * obvious what's going on...
1N/A */
1N/A#define O_INDX 1
1N/A#define P_INDX 2
1N/A
1N/A/************************************************************************
1N/A BTREE INTERNAL PAGE LAYOUT
1N/A ************************************************************************/
1N/A
1N/A/*
1N/A * Btree internal entry.
1N/A */
1N/Atypedef struct _binternal {
1N/A db_indx_t len; /* 00-01: Key/data item length. */
1N/A u_int8_t type; /* 02: Page type AND DELETE FLAG. */
1N/A u_int8_t unused; /* 03: Padding, unused. */
1N/A db_pgno_t pgno; /* 04-07: Page number of referenced page. */
1N/A db_recno_t nrecs; /* 08-11: Subtree record count. */
1N/A u_int8_t data[1]; /* Variable length key item. */
1N/A} BINTERNAL;
1N/A
1N/A/* Get a BINTERNAL item for a specific index. */
1N/A#define GET_BINTERNAL(pg, indx) \
1N/A ((BINTERNAL *)P_ENTRY(pg, indx))
1N/A
1N/A/*
1N/A * Page space required to add a new BINTERNAL item to the page, with and
1N/A * without the index value.
1N/A */
1N/A#define BINTERNAL_SIZE(len) \
1N/A ALIGN((len) + SSZA(BINTERNAL, data), 4)
1N/A#define BINTERNAL_PSIZE(len) \
1N/A (BINTERNAL_SIZE(len) + sizeof(db_indx_t))
1N/A
1N/A/************************************************************************
1N/A RECNO INTERNAL PAGE LAYOUT
1N/A ************************************************************************/
1N/A
1N/A/*
1N/A * The recno internal entry.
1N/A *
1N/A * XXX
1N/A * Why not fold this into the db_indx_t structure, it's fixed length?
1N/A */
1N/Atypedef struct _rinternal {
1N/A db_pgno_t pgno; /* 00-03: Page number of referenced page. */
1N/A db_recno_t nrecs; /* 04-07: Subtree record count. */
1N/A} RINTERNAL;
1N/A
1N/A/* Get a RINTERNAL item for a specific index. */
1N/A#define GET_RINTERNAL(pg, indx) \
1N/A ((RINTERNAL *)P_ENTRY(pg, indx))
1N/A
1N/A/*
1N/A * Page space required to add a new RINTERNAL item to the page, with and
1N/A * without the index value.
1N/A */
1N/A#define RINTERNAL_SIZE \
1N/A ALIGN(sizeof(RINTERNAL), 4)
1N/A#define RINTERNAL_PSIZE \
1N/A (RINTERNAL_SIZE + sizeof(db_indx_t))
1N/A#endif /* _DB_PAGE_H_ */