“a05b148e6fe31d3d16c72dbd158bc8f93b3b6376”上不存在“projects/restify/imports.yml”
提交 7b331135 编写于 作者: M Minglei Jin

fix(tdb/ofp): upgrade ofp cell with large key

上级 6fccf849
......@@ -1316,11 +1316,11 @@ static int tdbBtreeDecodePayload(SPage *pPage, const SCell *pCell, int nHeader,
}
TDB_CELLDECODER_SET_FREE_KEY(pDecoder);
memcpy(pDecoder->pKey, pCell + nHeader, nLocal - 4);
nLeft -= nLocal - 4;
nLeftKey -= nLocal - 4;
memcpy(pDecoder->pKey, pCell + nHeader, nLocal - nHeader - sizeof(pgno));
nLeft -= nLocal - nHeader - sizeof(pgno);
nLeftKey -= nLocal - nHeader - sizeof(pgno);
memcpy(&pgno, pCell + nHeader + nLocal - 4, sizeof(pgno));
memcpy(&pgno, pCell + nLocal - sizeof(pgno), sizeof(pgno));
int lastKeyPageSpace = 0;
// load left key & val to ovpages
......@@ -1346,9 +1346,11 @@ static int tdbBtreeDecodePayload(SPage *pPage, const SCell *pCell, int nHeader,
if (lastKeyPage) {
if (lastKeyPageSpace >= vLen) {
if (vLen > 0) {
pDecoder->pVal = ofpCell + kLen - nLeftKey;
nLeft -= vLen;
}
pgno = 0;
} else {
// read partial val to local
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册