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

Remove an unused parameter from the accessPayload() function in btree.c. (CVS 6882)

FossilOrigin-Name: 7deb6568d89335926b77336756837c6dc3985529
This commit is contained in:
drh
2009-07-11 18:26:28 +00:00
parent bd5969a268
commit fb1926837a
3 changed files with 13 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
C Fix\sa\scase\swhere\sdeleting\sa\srow\sfrom\sa\scorrupt\sdatabase\scould\scause\san\sassert\sto\sfail.\s(CVS\s6881) C Remove\san\sunused\sparameter\sfrom\sthe\saccessPayload()\sfunction\sin\sbtree.c.\s(CVS\s6882)
D 2009-07-11T17:39:42 D 2009-07-11T18:26:29
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 2604d94126c050559cd65eef2c8f257d9ca67358 F src/btree.c e1ad67c98aeaafdeba37aef45ce1fbbe9416dacf
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 618a83d65f973183d21245721dc656a35ff594a4 P 6994b41a94a60f6460cf9814767db321ab3851f7
R eb96100d6844858ed92c59e456fef299 R da8d0008fb07861a1469ffe34a7c142f
U danielk1977 U drh
Z da4642526cf31e5a9d82946419b45e5e Z bc5999a27b9e97e6525ec2bc92994493

View File

@@ -1 +1 @@
6994b41a94a60f6460cf9814767db321ab3851f7 7deb6568d89335926b77336756837c6dc3985529

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.680 2009/07/11 17:39:42 danielk1977 Exp $ ** $Id: btree.c,v 1.681 2009/07/11 18:26:29 drh 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.
@@ -3631,7 +3631,6 @@ static int accessPayload(
u32 offset, /* Begin reading this far into payload */ u32 offset, /* Begin reading this far into payload */
u32 amt, /* Read this many bytes */ u32 amt, /* Read this many bytes */
unsigned char *pBuf, /* Write the bytes into this buffer */ unsigned char *pBuf, /* Write the bytes into this buffer */
int skipKey, /* offset begins at data if this is true */
int eOp /* zero to read. non-zero to write. */ int eOp /* zero to read. non-zero to write. */
){ ){
unsigned char *aPayload; unsigned char *aPayload;
@@ -3650,9 +3649,6 @@ static int accessPayload(
aPayload = pCur->info.pCell + pCur->info.nHeader; aPayload = pCur->info.pCell + pCur->info.nHeader;
nKey = (pPage->intKey ? 0 : (int)pCur->info.nKey); nKey = (pPage->intKey ? 0 : (int)pCur->info.nKey);
if( skipKey ){
offset += nKey;
}
if( offset+amt > nKey+pCur->info.nData if( offset+amt > nKey+pCur->info.nData
|| &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] || &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize]
){ ){
@@ -3781,7 +3777,7 @@ int sqlite3BtreeKey(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
return SQLITE_CORRUPT_BKPT; return SQLITE_CORRUPT_BKPT;
} }
assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell ); assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
rc = accessPayload(pCur, offset, amt, (unsigned char*)pBuf, 0, 0); rc = accessPayload(pCur, offset, amt, (unsigned char*)pBuf, 0);
} }
return rc; return rc;
} }
@@ -3810,7 +3806,7 @@ int sqlite3BtreeData(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
assert( pCur->eState==CURSOR_VALID ); assert( pCur->eState==CURSOR_VALID );
assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] ); assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell ); assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
rc = accessPayload(pCur, offset, amt, pBuf, 1, 0); rc = accessPayload(pCur, offset, amt, pBuf, 0);
} }
return rc; return rc;
} }
@@ -4308,7 +4304,7 @@ int sqlite3BtreeMovetoUnpacked(
rc = SQLITE_NOMEM; rc = SQLITE_NOMEM;
goto moveto_finish; goto moveto_finish;
} }
rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0, 0); rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey); c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
sqlite3_free(pCellKey); sqlite3_free(pCellKey);
if( rc ) goto moveto_finish; if( rc ) goto moveto_finish;
@@ -7727,7 +7723,7 @@ int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){
assert( !hasReadConflicts(pCsr->pBtree, pCsr->pgnoRoot) ); assert( !hasReadConflicts(pCsr->pBtree, pCsr->pgnoRoot) );
assert( pCsr->apPage[pCsr->iPage]->intKey ); assert( pCsr->apPage[pCsr->iPage]->intKey );
return accessPayload(pCsr, offset, amt, (unsigned char *)z, 0, 1); return accessPayload(pCsr, offset, amt, (unsigned char *)z, 1);
} }
/* /*