mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Minor performance improvements.
FossilOrigin-Name: f9950c6af1813f724dacd7455f472acec921b06a
This commit is contained in:
16
manifest
16
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Update\sevidence\smarks\son\sthe\sURI\sfilename\stests\sto\sconform\sto\sthe\slatest\ndocumentation.
|
C Minor\sperformance\simprovements.
|
||||||
D 2011-05-30T15:06:48.453
|
D 2011-05-30T23:42:16.233
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in 11dcc00a8d0e5202def00e81732784fb0cc4fe1d
|
F Makefile.in 11dcc00a8d0e5202def00e81732784fb0cc4fe1d
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -122,7 +122,7 @@ F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34
|
|||||||
F src/backup.c 986c15232757f2873dff35ee3b35cbf935fc573c
|
F src/backup.c 986c15232757f2873dff35ee3b35cbf935fc573c
|
||||||
F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef
|
F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef
|
||||||
F src/btmutex.c 976f45a12e37293e32cae0281b15a21d48a8aaa7
|
F src/btmutex.c 976f45a12e37293e32cae0281b15a21d48a8aaa7
|
||||||
F src/btree.c 975ad691a57eb1fb60f1ec76ad0b6571eace62f9
|
F src/btree.c 0d3b39dcb79565c053e35fc12713f12d8a74d6a9
|
||||||
F src/btree.h f5d775cd6cfc7ac32a2535b70e8d2af48ef5f2ce
|
F src/btree.h f5d775cd6cfc7ac32a2535b70e8d2af48ef5f2ce
|
||||||
F src/btreeInt.h 67978c014fa4f7cc874032dd3aacadd8db656bc3
|
F src/btreeInt.h 67978c014fa4f7cc874032dd3aacadd8db656bc3
|
||||||
F src/build.c 0132bc6631fa617a1d28ef805921f6dbac18a514
|
F src/build.c 0132bc6631fa617a1d28ef805921f6dbac18a514
|
||||||
@@ -236,11 +236,11 @@ F src/update.c 5bcb56e5c7380a2eecb0e71891dbd4ad7437748f
|
|||||||
F src/utf.c d83650c3ea08f7407bd9d0839d9885241c209c60
|
F src/utf.c d83650c3ea08f7407bd9d0839d9885241c209c60
|
||||||
F src/util.c 0f33bbbdfcc4a2d8cf20c3b2a16ffc3b57c58a70
|
F src/util.c 0f33bbbdfcc4a2d8cf20c3b2a16ffc3b57c58a70
|
||||||
F src/vacuum.c 05513dca036a1e7848fe18d5ed1265ac0b32365e
|
F src/vacuum.c 05513dca036a1e7848fe18d5ed1265ac0b32365e
|
||||||
F src/vdbe.c 380dddc404c1e4a9260a4194daa728b94ed102d7
|
F src/vdbe.c 103827f560cdc48b1d455ce4d4b3573dd88f9ab4
|
||||||
F src/vdbe.h 8a675fefdf7119441fe817c800a9a52440c2e797
|
F src/vdbe.h 8a675fefdf7119441fe817c800a9a52440c2e797
|
||||||
F src/vdbeInt.h fe8f58d305e629fff02f61f655aca1d299f1f6ae
|
F src/vdbeInt.h fe8f58d305e629fff02f61f655aca1d299f1f6ae
|
||||||
F src/vdbeapi.c e0e2672e0a96ae3f8575c8ecd02912a3e8a554a1
|
F src/vdbeapi.c e0e2672e0a96ae3f8575c8ecd02912a3e8a554a1
|
||||||
F src/vdbeaux.c 07a5226ae6e9c6e54b5fcd3c395b86e7ffdba3a4
|
F src/vdbeaux.c 99900868d18618a07ffaf780ecc41fd807834bde
|
||||||
F src/vdbeblob.c c3ccb7c8732858c680f442932e66ad06bb036562
|
F src/vdbeblob.c c3ccb7c8732858c680f442932e66ad06bb036562
|
||||||
F src/vdbemem.c 0498796b6ffbe45e32960d6a1f5adfb6e419883b
|
F src/vdbemem.c 0498796b6ffbe45e32960d6a1f5adfb6e419883b
|
||||||
F src/vdbetrace.c 5d0dc3d5fd54878cc8d6d28eb41deb8d5885b114
|
F src/vdbetrace.c 5d0dc3d5fd54878cc8d6d28eb41deb8d5885b114
|
||||||
@@ -938,7 +938,7 @@ F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
|||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
|
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
|
||||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||||
P e3350dbd9f472c27ea6bc872d85098ac89d874c7
|
P 1bab03c4811b5e5b3d15632bc2a3844891f9fad7
|
||||||
R 31eb4302622f868d251135572f646bae
|
R 7acb04adb38e3c88e3b1f83ed6f40a4e
|
||||||
U drh
|
U drh
|
||||||
Z 47e43c01cd8d7b7136f7bc52a005ac53
|
Z 9e474b54141fcb6c3097a32384090f3c
|
||||||
|
@@ -1 +1 @@
|
|||||||
1bab03c4811b5e5b3d15632bc2a3844891f9fad7
|
f9950c6af1813f724dacd7455f472acec921b06a
|
@@ -5390,10 +5390,10 @@ static int fillInCell(
|
|||||||
** "sz" must be the number of bytes in the cell.
|
** "sz" must be the number of bytes in the cell.
|
||||||
*/
|
*/
|
||||||
static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
|
static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
|
||||||
int i; /* Loop counter */
|
|
||||||
u32 pc; /* Offset to cell content of cell being deleted */
|
u32 pc; /* Offset to cell content of cell being deleted */
|
||||||
u8 *data; /* pPage->aData */
|
u8 *data; /* pPage->aData */
|
||||||
u8 *ptr; /* Used to move bytes around within data[] */
|
u8 *ptr; /* Used to move bytes around within data[] */
|
||||||
|
u8 *endPtr; /* End of loop */
|
||||||
int rc; /* The return code */
|
int rc; /* The return code */
|
||||||
int hdr; /* Beginning of the header. 0 most pages. 100 page 1 */
|
int hdr; /* Beginning of the header. 0 most pages. 100 page 1 */
|
||||||
|
|
||||||
@@ -5418,9 +5418,11 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
|
|||||||
*pRC = rc;
|
*pRC = rc;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for(i=idx+1; i<pPage->nCell; i++, ptr+=2){
|
endPtr = &data[pPage->cellOffset + 2*pPage->nCell - 2];
|
||||||
|
while( ptr<endPtr ){
|
||||||
ptr[0] = ptr[2];
|
ptr[0] = ptr[2];
|
||||||
ptr[1] = ptr[3];
|
ptr[1] = ptr[3];
|
||||||
|
ptr += 2;
|
||||||
}
|
}
|
||||||
pPage->nCell--;
|
pPage->nCell--;
|
||||||
put2byte(&data[hdr+3], pPage->nCell);
|
put2byte(&data[hdr+3], pPage->nCell);
|
||||||
|
28
src/vdbe.c
28
src/vdbe.c
@@ -1766,7 +1766,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */
|
|||||||
pIn3 = &aMem[pOp->p3];
|
pIn3 = &aMem[pOp->p3];
|
||||||
flags1 = pIn1->flags;
|
flags1 = pIn1->flags;
|
||||||
flags3 = pIn3->flags;
|
flags3 = pIn3->flags;
|
||||||
if( (pIn1->flags | pIn3->flags)&MEM_Null ){
|
if( (flags1 | flags3)&MEM_Null ){
|
||||||
/* One or both operands are NULL */
|
/* One or both operands are NULL */
|
||||||
if( pOp->p5 & SQLITE_NULLEQ ){
|
if( pOp->p5 & SQLITE_NULLEQ ){
|
||||||
/* If SQLITE_NULLEQ is set (which will only happen if the operator is
|
/* If SQLITE_NULLEQ is set (which will only happen if the operator is
|
||||||
@@ -1774,7 +1774,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */
|
|||||||
** or not both operands are null.
|
** or not both operands are null.
|
||||||
*/
|
*/
|
||||||
assert( pOp->opcode==OP_Eq || pOp->opcode==OP_Ne );
|
assert( pOp->opcode==OP_Eq || pOp->opcode==OP_Ne );
|
||||||
res = (pIn1->flags & pIn3->flags & MEM_Null)==0;
|
res = (flags1 & flags3 & MEM_Null)==0;
|
||||||
}else{
|
}else{
|
||||||
/* SQLITE_NULLEQ is clear and at least one operand is NULL,
|
/* SQLITE_NULLEQ is clear and at least one operand is NULL,
|
||||||
** then the result is always NULL.
|
** then the result is always NULL.
|
||||||
@@ -5882,20 +5882,20 @@ case OP_MaxPgcnt: { /* out2-prerelease */
|
|||||||
*/
|
*/
|
||||||
case OP_Trace: {
|
case OP_Trace: {
|
||||||
char *zTrace;
|
char *zTrace;
|
||||||
|
char *z;
|
||||||
|
|
||||||
zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql);
|
if( db->xTrace && (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0 ){
|
||||||
if( zTrace ){
|
z = sqlite3VdbeExpandSql(p, zTrace);
|
||||||
if( db->xTrace ){
|
db->xTrace(db->pTraceArg, z);
|
||||||
char *z = sqlite3VdbeExpandSql(p, zTrace);
|
sqlite3DbFree(db, z);
|
||||||
db->xTrace(db->pTraceArg, z);
|
|
||||||
sqlite3DbFree(db, z);
|
|
||||||
}
|
|
||||||
#ifdef SQLITE_DEBUG
|
|
||||||
if( (db->flags & SQLITE_SqlTrace)!=0 ){
|
|
||||||
sqlite3DebugPrintf("SQL-trace: %s\n", zTrace);
|
|
||||||
}
|
|
||||||
#endif /* SQLITE_DEBUG */
|
|
||||||
}
|
}
|
||||||
|
#ifdef SQLITE_DEBUG
|
||||||
|
if( (db->flags & SQLITE_SqlTrace)!=0
|
||||||
|
&& (zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql))!=0
|
||||||
|
){
|
||||||
|
sqlite3DebugPrintf("SQL-trace: %s\n", zTrace);
|
||||||
|
}
|
||||||
|
#endif /* SQLITE_DEBUG */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -2852,7 +2852,7 @@ UnpackedRecord *sqlite3VdbeRecordUnpack(
|
|||||||
idx += getVarint32(&aKey[idx], serial_type);
|
idx += getVarint32(&aKey[idx], serial_type);
|
||||||
pMem->enc = pKeyInfo->enc;
|
pMem->enc = pKeyInfo->enc;
|
||||||
pMem->db = pKeyInfo->db;
|
pMem->db = pKeyInfo->db;
|
||||||
pMem->flags = 0;
|
/* pMem->flags = 0; // sqlite3VdbeSerialGet() will set this for us */
|
||||||
pMem->zMalloc = 0;
|
pMem->zMalloc = 0;
|
||||||
d += sqlite3VdbeSerialGet(&aKey[d], serial_type, pMem);
|
d += sqlite3VdbeSerialGet(&aKey[d], serial_type, pMem);
|
||||||
pMem++;
|
pMem++;
|
||||||
@@ -2867,6 +2867,7 @@ UnpackedRecord *sqlite3VdbeRecordUnpack(
|
|||||||
** This routine destroys a UnpackedRecord object.
|
** This routine destroys a UnpackedRecord object.
|
||||||
*/
|
*/
|
||||||
void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord *p){
|
void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord *p){
|
||||||
|
#ifdef SQLITE_DEBUG
|
||||||
int i;
|
int i;
|
||||||
Mem *pMem;
|
Mem *pMem;
|
||||||
|
|
||||||
@@ -2880,6 +2881,7 @@ void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord *p){
|
|||||||
*/
|
*/
|
||||||
if( NEVER(pMem->zMalloc) ) sqlite3VdbeMemRelease(pMem);
|
if( NEVER(pMem->zMalloc) ) sqlite3VdbeMemRelease(pMem);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if( p->flags & UNPACKED_NEED_FREE ){
|
if( p->flags & UNPACKED_NEED_FREE ){
|
||||||
sqlite3DbFree(p->pKeyInfo->db, p);
|
sqlite3DbFree(p->pKeyInfo->db, p);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user