提交 a4cc355f 编写于 作者: H Hongze Cheng

more

上级 7be2d80b
...@@ -28,11 +28,11 @@ struct SBtCursor { ...@@ -28,11 +28,11 @@ struct SBtCursor {
int8_t iPage; int8_t iPage;
}; };
typedef struct SBPage { typedef struct SMemPage {
u8 isInit; u8 isInit;
u8 isLeaf; u8 isLeaf;
SPgno pgno; SPgno pgno;
} SBPage; } SMemPage;
int tdbBtreeOpen(SPgno root, SBTree **ppBt) { int tdbBtreeOpen(SPgno root, SBTree **ppBt) {
*ppBt = NULL; *ppBt = NULL;
......
...@@ -77,6 +77,9 @@ SPgHdr *tdbPFileGet(SPFile *pFile, SPgno pgno) { ...@@ -77,6 +77,9 @@ SPgHdr *tdbPFileGet(SPFile *pFile, SPgno pgno) {
SPgid pgid; SPgid pgid;
SPgHdr *pPage; SPgHdr *pPage;
memcpy(pgid.fileid, pFile->fid, TDB_FILE_ID_LEN);
pgid.pgno = pgno;
pPage = tdbPCacheFetch(pFile->pCache, &pgid, 1); pPage = tdbPCacheFetch(pFile->pCache, &pgid, 1);
if (pPage == NULL) { if (pPage == NULL) {
// TODO // TODO
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册