-C Performance\simprovements\sin\smoveToChild()\sby\sshifting\ssome\swork\sover\nto\sgetAndInitPage().\s\sNet\simprovement\sis\sabout\s800K\scycles\sat\scost\sof\s30\sbytes.
-D 2015-06-27T19:45:03.070
+C Enhancements\sto\sthe\sprevious\scheck-in\sto\smake\sit\sa\slittle\ssmaller\sand\sfaster.
+D 2015-06-27T20:55:00.648
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 285a0a234ed7610d431d91671c136098c2bd86a9
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/backup.c ff743689c4d6c5cb55ad42ed9d174b2b3e71f1e3
F src/bitvec.c 5eb7958c3bf65210211cbcfc44eff86d0ded7c9d
F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79
-F src/btree.c b1ba9f65eba193ecae9519be29cce63bc1daef4c
+F src/btree.c a6b0259834076783c7a22a0963bd91abcf27ef0f
F src/btree.h 969adc948e89e449220ff0ff724c94bb2a52e9f1
F src/btreeInt.h 30f611b87ff873f47a28ce0bf66dd778c3274d9a
F src/build.c b3f15255d5b16e42dafeaa638fd4f8a47c94ed70
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 7f65b96b4017413bd19624570efe8fb2b0f7b991
-R 4df1944eb9c633cad9fdc689344e2d7e
+P 1956a4ce8eca650d98a7f68fd2d82eb8a3d6069f
+R 72a9a3c8bf73162e5f9bead1ad9abb3a
U drh
-Z 093d236679649777c7df295c5a4c84ba
+Z d1566e69624f823fa39952a25235aa04
/*
** Get a page from the pager and initialize it.
**
-** If pCur!=0 then the page acquired will be added to that cursor.
-** If the fetch fails, this routine must decrement pCur->iPage.
+** If pCur!=0 then the page is being fetched as part of a moveToChild()
+** call. Do additional sanity checking on the page in this case.
+** And if the fetch fails, this routine must decrement pCur->iPage.
**
** The page is fetched as read-write unless pCur is not NULL and is
** a read-only cursor.
assert( sqlite3_mutex_held(pBt->mutex) );
assert( pCur==0 || ppPage==&pCur->apPage[pCur->iPage] );
assert( pCur==0 || bReadOnly==pCur->curPagerFlags );
+ assert( pCur==0 || pCur->iPage>0 );
if( pgno>btreePagecount(pBt) ){
rc = SQLITE_CORRUPT_BKPT;
}
}
- /* If obtaining a page for a cursor, we must verify that the page is
- ** compatible with the cursor */
- if( pCur && pCur->iPage>0
+ /* If obtaining a child page for a cursor, we must verify that the page is
+ ** compatible with the root page. */
+ if( pCur
&& ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->apPage[0]->intKey)
){
rc = SQLITE_CORRUPT_BKPT;
return SQLITE_OK;
}else{
assert( pCur->iPage==(-1) );
- pCur->iPage = 0;
rc = getAndInitPage(pCur->pBtree->pBt, pCur->pgnoRoot, &pCur->apPage[0],
- pCur, pCur->curPagerFlags);
+ 0, pCur->curPagerFlags);
if( rc!=SQLITE_OK ){
pCur->eState = CURSOR_INVALID;
return rc;