diff --git a/source/libs/tdb/src/db/tdbBtree.c b/source/libs/tdb/src/db/tdbBtree.c index 8eafbe5f8aabef588a982f0ca2ac77ba029830da..c12f9a601eea9884a87546b0885af05173ab3a8e 100644 --- a/source/libs/tdb/src/db/tdbBtree.c +++ b/source/libs/tdb/src/db/tdbBtree.c @@ -28,11 +28,11 @@ struct SBtCursor { int8_t iPage; }; -typedef struct SBPage { +typedef struct SMemPage { u8 isInit; u8 isLeaf; SPgno pgno; -} SBPage; +} SMemPage; int tdbBtreeOpen(SPgno root, SBTree **ppBt) { *ppBt = NULL; diff --git a/source/libs/tdb/src/db/tdbPFile.c b/source/libs/tdb/src/db/tdbPFile.c index 1c6e5e32fde5abe690692abf2a8e24b3ad5363d3..a0274c6e659ad42459396088c05ae7a4f3962621 100644 --- a/source/libs/tdb/src/db/tdbPFile.c +++ b/source/libs/tdb/src/db/tdbPFile.c @@ -77,6 +77,9 @@ SPgHdr *tdbPFileGet(SPFile *pFile, SPgno pgno) { SPgid pgid; SPgHdr *pPage; + memcpy(pgid.fileid, pFile->fid, TDB_FILE_ID_LEN); + pgid.pgno = pgno; + pPage = tdbPCacheFetch(pFile->pCache, &pgid, 1); if (pPage == NULL) { // TODO