
typedef struct _db_page {
DB_LSN lsn; // LSN (Log Sequence Number)
db_pgno_t pgno; // 頁號
db_pgno_t prev_pgno; // 前一頁頁號
db_pgno_t next_pgno; // 後一頁頁號
u_int32_t type; // 頁面類型
u_int32_t flags; // 標誌位
u_int32_t cnt; // 頁面上的項目計數
db_indx_t off; // 空閒空間偏移量
u_int8_t unused[2]; // 保留欄位
u_int8_t data[1]; // 實際資料區域(柔性陣列)
} DB_PAGE;
此結構為 BDB 存取方法(B-tree、Hash、Queue、Recno)共用的基礎頁面頭部,後續資料區域佈局依具體存取方法而定。