1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Optimize the skipping of the payload size field when doing a binary search

for a rowid.

FossilOrigin-Name: 55e5bfa231dd52a7cf9ec982967da4963867b9e5
This commit is contained in:
drh
2013-11-25 16:52:59 +00:00
parent d2022b0118
commit 17566ee243
3 changed files with 8 additions and 10 deletions

View File

@@ -4664,14 +4664,12 @@ int sqlite3BtreeMovetoUnpacked(
upr = pPage->nCell-1;
idx = biasRight ? upr : upr/2;
pCur->aiIdx[pCur->iPage] = (u16)idx;
// pCur->info.nSize = 0;
if( pPage->intKey ){
for(;;){
i64 nCellKey;
pCell = findCell(pPage, idx) + pPage->childPtrSize;
if( pPage->hasData ){
u32 dummy;
pCell += getVarint32(pCell, dummy);
while( 0x80 <= *(pCell++) && pCell<pPage->aDataEnd ){}
}
getVarint(pCell, (u64*)&nCellKey);
if( nCellKey<intKey ){