Remove unused code from OP_IdxLt and OP_IdxGE. (CVS 5030)

FossilOrigin-Name: df02175ec0f28d57942b8275b540ff855dfbeb09
This commit is contained in:
danielk1977 2008-04-18 11:31:12 +00:00
parent b790c6c596
commit 61dd58391f
3 changed files with 33 additions and 45 deletions

View File

@ -1,5 +1,5 @@
C Combine\scases\s3\sand\s4\sin\swhere.c,\ssince\scase\s4\sis\snow\sa\sspecial\scase\sof\scase\s3.\s(CVS\s5029)
D 2008-04-18T10:25:24
C Remove\sunused\scode\sfrom\sOP_IdxLt\sand\sOP_IdxGE.\s(CVS\s5030)
D 2008-04-18T11:31:13
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in 25b3282a4ac39388632c2fb0e044ff494d490952
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -174,7 +174,7 @@ F src/update.c 57282dae1ffffaf4aedc3201ed77f8ef09be4f45
F src/utf.c 8c94fa10efc78c2568d08d436acc59df4df7191b
F src/util.c 943caa4071488b20ed90588f0704c6825f91836b
F src/vacuum.c 3524411bfb58aac0d87eadd3e5b7cd532772af30
F src/vdbe.c 892a871879c80a905eaa0d1f7bd24e0221bad56d
F src/vdbe.c e0cc1de84b470acd90e6d62a833d09aa531e11d7
F src/vdbe.h bfd84bda447f39cb599302c7ec85067dae20453c
F src/vdbeInt.h 05316345da487b0cf540482576f9ae3337d133cd
F src/vdbeapi.c 0e1b5a808bb0e556f2a975eb7d11fd3153e922bf
@ -631,7 +631,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P c448f15aa5ed3dec511426775e893efea324faa1
R 2fd8586df4700418bc96607c52d60fc1
P 9a976819246eb558ba43429f8889972c4a4bce9d
R 73a8c0b2a0e2ae4a89b1181d0864ddcb
U danielk1977
Z 63b2d6660f8e65e3dba8e17623deefd8
Z 9ff8963d8d921ad836977fc03939b1dc

View File

@ -1 +1 @@
9a976819246eb558ba43429f8889972c4a4bce9d
df02175ec0f28d57942b8275b540ff855dfbeb09

View File

@ -43,7 +43,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.732 2008/04/18 10:25:24 danielk1977 Exp $
** $Id: vdbe.c,v 1.733 2008/04/18 11:31:13 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -3832,34 +3832,31 @@ case OP_IdxRowid: { /* out2-prerelease */
break;
}
/* Opcode: IdxGE P1 P2 P3 * P5
/* Opcode: IdxGE P1 P2 P3 P4 P5
**
** The value in register P3 is an index entry that omits the ROWID. Compare
** this value against the index that P1 is currently pointing to.
** Ignore the ROWID on the P1 index.
** The P4 register values beginning with P3 form an unpacked index
** key that omits the ROWID. Compare this key value against the index
** that P1 is currently pointing to, ignoring the ROWID on the P1 index.
**
** If the P1 index entry is greater than or equal to the value in
** register P3 then jump to P2. Otherwise fall through to the next
** instruction.
** If the P1 index entry is greater than or equal to the key value
** then jump to P2. Otherwise fall through to the next instruction.
**
** If P5 is non-zero then the value in register P3 is temporarily
** increased by an epsilon prior to the comparison. This make the opcode work
** like IdxGT except that if the key from register P3 is a prefix of
** the key in the cursor, the result is false whereas it would be
** true with IdxGT.
** If P5 is non-zero then the key value is increased by an epsilon
** prior to the comparison. This make the opcode work like IdxGT except
** that if the key from register P3 is a prefix of the key in the cursor,
** the result is false whereas it would be true with IdxGT.
*/
/* Opcode: IdxLT P1 P2 P3 * P5
**
** The value in register P3 is an index entry that omits the ROWID. Compare
** the this value against the index that P1 is currently pointing to.
** Ignore the ROWID on the P1 index.
** The P4 register values beginning with P3 form an unpacked index
** key that omits the ROWID. Compare this key value against the index
** that P1 is currently pointing to, ignoring the ROWID on the P1 index.
**
** If the P1 index entry is less than the register P3 value
** then jump to P2. Otherwise fall through to the next instruction.
** If the P1 index entry is less than the key value then jump to P2.
** Otherwise fall through to the next instruction.
**
** If P5 is non-zero then the index taken from register P3 is temporarily
** increased by an epsilon prior to the comparison. This makes the opcode
** work like IdxLE.
** If P5 is non-zero then the key value is increased by an epsilon prior
** to the comparison. This makes the opcode work like IdxLE.
*/
case OP_IdxLT: /* jump, in3 */
case OP_IdxGE: { /* jump, in3 */
@ -3870,27 +3867,18 @@ case OP_IdxGE: { /* jump, in3 */
assert( p->apCsr[i]!=0 );
if( (pC = p->apCsr[i])->pCursor!=0 ){
int res;
UnpackedRecord r;
assert( pC->deferredMoveto==0 );
assert( pOp->p5==0 || pOp->p5==1 );
assert( pOp->p4type==P4_INT32 );
r.pKeyInfo = pC->pKeyInfo;
r.nField = pOp->p4.i;
r.needFree = 0;
r.needDestroy = 0;
r.aMem = &p->aMem[pOp->p3];
*pC->pIncrKey = pOp->p5;
if( pOp->p4type!=P4_INT32 || pOp->p4.i==0 ){
assert( pIn3->flags & MEM_Blob ); /* Created using OP_MakeRecord */
ExpandBlob(pIn3);
rc = sqlite3VdbeIdxKeyCompare(pC, 0, pIn3->n, (u8*)pIn3->z, &res);
}else{
UnpackedRecord r;
r.pKeyInfo = pC->pKeyInfo;
r.nField = pOp->p4.i;
r.needFree = 0;
r.needDestroy = 0;
r.aMem = &p->aMem[pOp->p3];
rc = sqlite3VdbeIdxKeyCompare(pC, &r, 0, 0, &res);
}
rc = sqlite3VdbeIdxKeyCompare(pC, &r, 0, 0, &res);
*pC->pIncrKey = 0;
if( rc!=SQLITE_OK ){
break;
}
if( pOp->opcode==OP_IdxLT ){
res = -res;
}else{