more TDB
This commit is contained in:
parent
bea00d9146
commit
7defb86ab7
|
@ -267,7 +267,7 @@ static int tdbBtCursorMoveTo(SBtCursor *pCur, const void *pKey, int kLen, int *p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
// Move downward or break
|
||||||
u16 flags = TDB_PAGE_FLAGS(pPage);
|
u16 flags = TDB_PAGE_FLAGS(pPage);
|
||||||
u8 leaf = TDB_BTREE_PAGE_IS_LEAF(flags);
|
u8 leaf = TDB_BTREE_PAGE_IS_LEAF(flags);
|
||||||
if (leaf) {
|
if (leaf) {
|
||||||
|
@ -292,7 +292,6 @@ static int tdbBtCursorMoveTo(SBtCursor *pCur, const void *pKey, int kLen, int *p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -869,6 +868,13 @@ static int tdbBtreeDecodeCell(SPage *pPage, const SCell *pCell, SCellDecoder *pD
|
||||||
flags = TDB_PAGE_FLAGS(pPage);
|
flags = TDB_PAGE_FLAGS(pPage);
|
||||||
leaf = TDB_BTREE_PAGE_IS_LEAF(flags);
|
leaf = TDB_BTREE_PAGE_IS_LEAF(flags);
|
||||||
|
|
||||||
|
// Clear the state of decoder
|
||||||
|
pDecoder->kLen = -1;
|
||||||
|
pDecoder->pKey = NULL;
|
||||||
|
pDecoder->vLen = -1;
|
||||||
|
pDecoder->pVal = NULL;
|
||||||
|
pDecoder->pgno = 0;
|
||||||
|
|
||||||
// 1. Decode header part
|
// 1. Decode header part
|
||||||
if (pPage->kLen == TDB_VARIANT_LEN) {
|
if (pPage->kLen == TDB_VARIANT_LEN) {
|
||||||
nHeader += tdbGetVarInt(pCell + nHeader, &(pDecoder->kLen));
|
nHeader += tdbGetVarInt(pCell + nHeader, &(pDecoder->kLen));
|
||||||
|
|
Loading…
Reference in New Issue