1
0
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:
drh
2013-11-20 00:59:02 +00:00
parent 707f1c560a
commit 83b301b0af
3 changed files with 17 additions and 15 deletions

View File

@@ -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;
}