This commit is contained in:
Hongze Cheng 2022-02-16 08:48:48 +00:00
parent cada7c3912
commit c1e556e7e1
1 changed files with 15 additions and 0 deletions

View File

@ -107,6 +107,21 @@ SPage *pgFileFetch(SPgFile *pPgFile, pgno_t pgno) {
SPage * pPage;
pgid_t pgid;
// 1. Fetch from the page cache
// pgCacheFetch(pPgCache, pgid);
// 2. If only get a page frame, no content, maybe
// need to load from the file
if (1 /*page not initialized*/) {
if (pgno < pPgFile->fsize) {
// load the page content from the disk
// ?? How about the freed pages ??
} else {
// zero the page, make the page as a empty
// page with zero records.
}
}
#if 0
pPgCache = pPgFile->pPgCache;
pPage = NULL;