- page.h contains a detailed description of the page format.
-
- Normally, keys and data are accessed from offset tables in the
- top of each page which point to the beginning of the key and
- data. There are four flag values which may be stored in these
- offset tables which indicate the following:
-
- OVFLPAGE Rather than a key data pair, this pair contains
- the address of an overflow page. The format of
- the pair is:
- OVERFLOW_PAGE_NUMBER OVFLPAGE
-
- PARTIAL_KEY This must be the first key/data pair on a page
- and implies that page contains only a partial key.
- That is, the key is too big to fit on a single page
- so it starts on this page and continues on the next.
- The format of the page is:
- KEY_OFF PARTIAL_KEY OVFL_PAGENO OVFLPAGE
-
- KEY_OFF -- offset of the beginning of the key
- PARTIAL_KEY -- 1
- OVFL_PAGENO - page number of the next overflow page
- OVFLPAGE -- 0
- FULL_KEY This must be the first key/data pair on the page. It
- is used in two cases.
-
- Case 1:
- There is a complete key on the page but no data
- (because it wouldn't fit). The next page contains
- the data.
-
- Page format it:
- KEY_OFF FULL_KEY OVFL_PAGENO OVFL_PAGE
-
- KEY_OFF -- offset of the beginning of the key
- FULL_KEY -- 2
- OVFL_PAGENO - page number of the next overflow page
- OVFLPAGE -- 0
-
- Case 2:
- This page contains no key, but part of a large
- data field, which is continued on the next page.
-
- Page format it:
- DATA_OFF FULL_KEY OVFL_PAGENO OVFL_PAGE
-
- KEY_OFF -- offset of the beginning of the data on
- this page
- FULL_KEY -- 2
- OVFL_PAGENO - page number of the next overflow page
- OVFLPAGE -- 0
-
- FULL_KEY_DATA This must be the first key/data pair on the page.
- There are two cases:
-
- Case 1:
- This page contains a key and the beginning of the
- data field, but the data field is continued on the
- next page.
-
- Page format is:
- KEY_OFF FULL_KEY_DATA OVFL_PAGENO DATA_OFF
-
- KEY_OFF -- offset of the beginning of the key
- FULL_KEY_DATA -- 3
- OVFL_PAGENO - page number of the next overflow page
- DATA_OFF -- offset of the beginning of the data
-
- Case 2:
- This page contains the last page of a big data pair.
- There is no key, only the tail end of the data
- on this page.
-
- Page format is:
- DATA_OFF FULL_KEY_DATA <OVFL_PAGENO> <OVFLPAGE>
-
- DATA_OFF -- offset of the beginning of the data on
- this page
- FULL_KEY_DATA -- 3
- OVFL_PAGENO - page number of the next overflow page
- OVFLPAGE -- 0
-
- OVFL_PAGENO and OVFLPAGE are optional (they are
- not present if there is no next page).
-*/
+ * page.h contains a detailed description of the page format.
+ *
+ * Normally, keys and data are accessed from offset tables in the top of
+ * each page which point to the beginning of the key and data. There are
+ * four flag values which may be stored in these offset tables which indicate
+ * the following:
+ *
+ *
+ * OVFLPAGE Rather than a key data pair, this pair contains
+ * the address of an overflow page. The format of
+ * the pair is:
+ * OVERFLOW_PAGE_NUMBER OVFLPAGE
+ *
+ * PARTIAL_KEY This must be the first key/data pair on a page
+ * and implies that page contains only a partial key.
+ * That is, the key is too big to fit on a single page
+ * so it starts on this page and continues on the next.
+ * The format of the page is:
+ * KEY_OFF PARTIAL_KEY OVFL_PAGENO OVFLPAGE
+ *
+ * KEY_OFF -- offset of the beginning of the key
+ * PARTIAL_KEY -- 1
+ * OVFL_PAGENO - page number of the next overflow page
+ * OVFLPAGE -- 0
+ *
+ * FULL_KEY This must be the first key/data pair on the page. It
+ * is used in two cases.
+ *
+ * Case 1:
+ * There is a complete key on the page but no data
+ * (because it wouldn't fit). The next page contains
+ * the data.
+ *
+ * Page format it:
+ * KEY_OFF FULL_KEY OVFL_PAGENO OVFL_PAGE
+ *
+ * KEY_OFF -- offset of the beginning of the key
+ * FULL_KEY -- 2
+ * OVFL_PAGENO - page number of the next overflow page
+ * OVFLPAGE -- 0
+ *
+ * Case 2:
+ * This page contains no key, but part of a large
+ * data field, which is continued on the next page.
+ *
+ * Page format it:
+ * DATA_OFF FULL_KEY OVFL_PAGENO OVFL_PAGE
+ *
+ * KEY_OFF -- offset of the beginning of the data on
+ * this page
+ * FULL_KEY -- 2
+ * OVFL_PAGENO - page number of the next overflow page
+ * OVFLPAGE -- 0
+ *
+ * FULL_KEY_DATA
+ * This must be the first key/data pair on the page.
+ * There are two cases:
+ *
+ * Case 1:
+ * This page contains a key and the beginning of the
+ * data field, but the data field is continued on the
+ * next page.
+ *
+ * Page format is:
+ * KEY_OFF FULL_KEY_DATA OVFL_PAGENO DATA_OFF
+ *
+ * KEY_OFF -- offset of the beginning of the key
+ * FULL_KEY_DATA -- 3
+ * OVFL_PAGENO - page number of the next overflow page
+ * DATA_OFF -- offset of the beginning of the data
+ *
+ * Case 2:
+ * This page contains the last page of a big data pair.
+ * There is no key, only the tail end of the data
+ * on this page.
+ *
+ * Page format is:
+ * DATA_OFF FULL_KEY_DATA <OVFL_PAGENO> <OVFLPAGE>
+ *
+ * DATA_OFF -- offset of the beginning of the data on
+ * this page
+ * FULL_KEY_DATA -- 3
+ * OVFL_PAGENO - page number of the next overflow page
+ * OVFLPAGE -- 0
+ *
+ * OVFL_PAGENO and OVFLPAGE are optional (they are
+ * not present if there is no next page).
+ */