Remove an unused parameter from the accessPayload() function in btree.c. (CVS 6882)
FossilOrigin-Name: 7deb6568d89335926b77336756837c6dc3985529
This commit is contained in:
parent
bd5969a268
commit
fb1926837a
14
manifest
14
manifest
@ -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)
|
||||
D 2009-07-11T17:39:42
|
||||
C Remove\san\sunused\sparameter\sfrom\sthe\saccessPayload()\sfunction\sin\sbtree.c.\s(CVS\s6882)
|
||||
D 2009-07-11T18:26:29
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -106,7 +106,7 @@ F src/auth.c 802a9439dfa0b8c208b10055cba400e82ef18025
|
||||
F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3
|
||||
F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119
|
||||
F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
|
||||
F src/btree.c 2604d94126c050559cd65eef2c8f257d9ca67358
|
||||
F src/btree.c e1ad67c98aeaafdeba37aef45ce1fbbe9416dacf
|
||||
F src/btree.h e53a10fd31d16c60a86f03c9467a6f470aa3683b
|
||||
F src/btreeInt.h a568bf057aa249eb06fd31358b4393a5ac88c118
|
||||
F src/build.c 867028ee9f63f7bc8eb8d4a720bb98cf9b9a12b4
|
||||
@ -740,7 +740,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
|
||||
P 618a83d65f973183d21245721dc656a35ff594a4
|
||||
R eb96100d6844858ed92c59e456fef299
|
||||
U danielk1977
|
||||
Z da4642526cf31e5a9d82946419b45e5e
|
||||
P 6994b41a94a60f6460cf9814767db321ab3851f7
|
||||
R da8d0008fb07861a1469ffe34a7c142f
|
||||
U drh
|
||||
Z bc5999a27b9e97e6525ec2bc92994493
|
||||
|
@ -1 +1 @@
|
||||
6994b41a94a60f6460cf9814767db321ab3851f7
|
||||
7deb6568d89335926b77336756837c6dc3985529
|
14
src/btree.c
14
src/btree.c
@ -9,7 +9,7 @@
|
||||
** 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.
|
||||
** 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 amt, /* Read this many bytes */
|
||||
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. */
|
||||
){
|
||||
unsigned char *aPayload;
|
||||
@ -3650,9 +3649,6 @@ static int accessPayload(
|
||||
aPayload = pCur->info.pCell + pCur->info.nHeader;
|
||||
nKey = (pPage->intKey ? 0 : (int)pCur->info.nKey);
|
||||
|
||||
if( skipKey ){
|
||||
offset += nKey;
|
||||
}
|
||||
if( offset+amt > nKey+pCur->info.nData
|
||||
|| &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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
@ -3810,7 +3806,7 @@ int sqlite3BtreeData(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
|
||||
assert( pCur->eState==CURSOR_VALID );
|
||||
assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
|
||||
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;
|
||||
}
|
||||
@ -4308,7 +4304,7 @@ int sqlite3BtreeMovetoUnpacked(
|
||||
rc = SQLITE_NOMEM;
|
||||
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);
|
||||
sqlite3_free(pCellKey);
|
||||
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( pCsr->apPage[pCsr->iPage]->intKey );
|
||||
|
||||
return accessPayload(pCsr, offset, amt, (unsigned char *)z, 0, 1);
|
||||
return accessPayload(pCsr, offset, amt, (unsigned char *)z, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user