mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Performance improvement for the OP_MustBeInt opcode in the VDBE.
FossilOrigin-Name: 96a65388e75fed96e2e73ef65726f6db88cc5ccd
This commit is contained in:
18
src/vdbe.c
18
src/vdbe.c
@@ -1662,17 +1662,19 @@ case OP_AddImm: { /* in1 */
|
||||
*/
|
||||
case OP_MustBeInt: { /* jump, in1 */
|
||||
pIn1 = &aMem[pOp->p1];
|
||||
applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);
|
||||
if( (pIn1->flags & MEM_Int)==0 ){
|
||||
if( pOp->p2==0 ){
|
||||
rc = SQLITE_MISMATCH;
|
||||
goto abort_due_to_error;
|
||||
}else{
|
||||
pc = pOp->p2 - 1;
|
||||
applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);
|
||||
if( (pIn1->flags & MEM_Int)==0 ){
|
||||
if( pOp->p2==0 ){
|
||||
rc = SQLITE_MISMATCH;
|
||||
goto abort_due_to_error;
|
||||
}else{
|
||||
pc = pOp->p2 - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
MemSetTypeFlag(pIn1, MEM_Int);
|
||||
}
|
||||
MemSetTypeFlag(pIn1, MEM_Int);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user