mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
New test-control that returns the number of calls to
sqlite3BtreeMovetoUnpacked() on the main database and then resets the counter. This only works for SQLITE_DEBUG builds. FossilOrigin-Name: dca5b91926431768babac28a6faf7674a5014db95caba727995b470e92b3182a
This commit is contained in:
15
src/btree.c
15
src/btree.c
@@ -112,6 +112,17 @@ int sqlite3_enable_shared_cache(int enable){
|
||||
#define hasReadConflicts(a, b) 0
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_DEBUG
|
||||
/*
|
||||
** Return an reset the seek counter for a Btree object.
|
||||
*/
|
||||
sqlite3_uint64 sqlite3BtreeSeekCount(Btree *pBt){
|
||||
u64 n = pBt->nSeek;
|
||||
pBt->nSeek = 0;
|
||||
return n;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Implementation of the SQLITE_CORRUPT_PAGE() macro. Takes a single
|
||||
** (MemPage*) as an argument. The (MemPage*) must not be NULL.
|
||||
@@ -5459,6 +5470,10 @@ int sqlite3BtreeMovetoUnpacked(
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SQLITE_DEBUG
|
||||
pCur->pBtree->nSeek++; /* Performance measurement during testing */
|
||||
#endif
|
||||
|
||||
if( pIdxKey ){
|
||||
xRecordCompare = sqlite3VdbeFindCompare(pIdxKey);
|
||||
pIdxKey->errCode = 0;
|
||||
|
Reference in New Issue
Block a user