1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Yet another minor size reduction and performance increase in the b-tree

insert logic.

FossilOrigin-Name: 1dbaf7a119edc5150a5d4be1b72f652a574e5bc5
This commit is contained in:
drh
2016-05-21 12:29:04 +00:00
parent cb89f4aba8
commit 09a4e92c6d
3 changed files with 10 additions and 8 deletions

View File

@@ -8059,6 +8059,7 @@ int sqlite3BtreeInsert(
assert( pPage->leaf );
}
insertCell(pPage, idx, newCell, szNew, 0, 0, &rc);
assert( pPage->nOverflow==0 || rc==SQLITE_OK );
assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
/* If no error has occurred and pPage has an overflow cell, call balance()
@@ -8082,7 +8083,8 @@ int sqlite3BtreeInsert(
** row without seeking the cursor. This can be a big performance boost.
*/
pCur->info.nSize = 0;
if( rc==SQLITE_OK && pPage->nOverflow ){
if( pPage->nOverflow ){
assert( rc==SQLITE_OK );
pCur->curFlags &= ~(BTCF_ValidNKey);
rc = balance(pCur);