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

Remove a case from BtreeMovetoUnpacked() that is unreachable as of (6881). (CVS 6885)

FossilOrigin-Name: 39ce2097da03176e256a2ff35bb857e578f3ca2d
This commit is contained in:
danielk1977
2009-07-13 07:30:52 +00:00
parent 3bcdfd25bd
commit 3fd7cf5aa1
3 changed files with 14 additions and 14 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.682 2009/07/12 02:32:22 drh Exp $
** $Id: btree.c,v 1.683 2009/07/13 07:30:53 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -4195,6 +4195,7 @@ int sqlite3BtreeMovetoUnpacked(
assert( cursorHoldsMutex(pCur) );
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
assert( pRes );
assert( (pIdxKey==0)==(pCur->pKeyInfo==0) );
/* If the cursor is already positioned at the point we are trying
** to move to, then just return without doing any work */
@@ -4233,14 +4234,13 @@ int sqlite3BtreeMovetoUnpacked(
/* pPage->nCell must be greater than zero. If this is the root-page
** the cursor would have been INVALID above and this for(;;) loop
** not run. If this is not the root-page, then the moveToChild() routine
** would have already detected db corruption. */
** would have already detected db corruption. Similarly, pPage must
** be the right kind (index or table) of b-tree page. Otherwise
** a moveToChild() or moveToRoot() call would have detected corruption. */
assert( pPage->nCell>0 );
assert( pPage->intKey==(pIdxKey==0) );
lwr = 0;
upr = pPage->nCell-1;
if( (!pPage->intKey && pIdxKey==0) ){
rc = SQLITE_CORRUPT_BKPT;
goto moveto_finish;
}
if( biasRight ){
pCur->aiIdx[pCur->iPage] = (u16)upr;
}else{