1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +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

@@ -1,5 +1,5 @@
C Simplifications\sto\sbtree.c\sto\shelp\sfacilitate\scoverage\stesting.\s(CVS\s6884) C Remove\sa\scase\sfrom\sBtreeMovetoUnpacked()\sthat\sis\sunreachable\sas\sof\s(6881).\s(CVS\s6885)
D 2009-07-12T02:32:22 D 2009-07-13T07:30:53
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -106,7 +106,7 @@ F src/auth.c 802a9439dfa0b8c208b10055cba400e82ef18025
F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3 F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3
F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119 F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119
F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
F src/btree.c 46f5eb09a9dc3af84d04c18f0feea3384fecca58 F src/btree.c 48825008514537420283ee9e51e0456263a39d2c
F src/btree.h e53a10fd31d16c60a86f03c9467a6f470aa3683b F src/btree.h e53a10fd31d16c60a86f03c9467a6f470aa3683b
F src/btreeInt.h a568bf057aa249eb06fd31358b4393a5ac88c118 F src/btreeInt.h a568bf057aa249eb06fd31358b4393a5ac88c118
F src/build.c 867028ee9f63f7bc8eb8d4a720bb98cf9b9a12b4 F src/build.c 867028ee9f63f7bc8eb8d4a720bb98cf9b9a12b4
@@ -740,7 +740,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746 F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
P d0964b93669123e228e7ce1890167447c56753b5 P dfb146ef003bae8ff216baf68cc43d7eb7855c68
R d0eba16ee5dd731fa989e1879da4fe61 R 7c7f4c4080ad2dff72d55dd2065d8da8
U drh U danielk1977
Z 9f7075b3d43334c92c2eb775093c9546 Z 6fc9b62a7a8b05ddc28addf8e5619108

View File

@@ -1 +1 @@
dfb146ef003bae8ff216baf68cc43d7eb7855c68 39ce2097da03176e256a2ff35bb857e578f3ca2d

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give. ** 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. ** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information. ** See the header comment on "btreeInt.h" for additional information.
@@ -4195,6 +4195,7 @@ int sqlite3BtreeMovetoUnpacked(
assert( cursorHoldsMutex(pCur) ); assert( cursorHoldsMutex(pCur) );
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) ); assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
assert( pRes ); assert( pRes );
assert( (pIdxKey==0)==(pCur->pKeyInfo==0) );
/* If the cursor is already positioned at the point we are trying /* If the cursor is already positioned at the point we are trying
** to move to, then just return without doing any work */ ** 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 /* pPage->nCell must be greater than zero. If this is the root-page
** the cursor would have been INVALID above and this for(;;) loop ** the cursor would have been INVALID above and this for(;;) loop
** not run. If this is not the root-page, then the moveToChild() routine ** 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->nCell>0 );
assert( pPage->intKey==(pIdxKey==0) );
lwr = 0; lwr = 0;
upr = pPage->nCell-1; upr = pPage->nCell-1;
if( (!pPage->intKey && pIdxKey==0) ){
rc = SQLITE_CORRUPT_BKPT;
goto moveto_finish;
}
if( biasRight ){ if( biasRight ){
pCur->aiIdx[pCur->iPage] = (u16)upr; pCur->aiIdx[pCur->iPage] = (u16)upr;
}else{ }else{