1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Defer checking for null in the comparison operators, since that is an

uncommon case.

FossilOrigin-Name: 5684525613961fed9db6a4d10dbe25521201b24f08e011df3a20ac895316957d
This commit is contained in:
drh
2017-04-17 23:23:17 +00:00
parent e2bc6552fe
commit cfcca02765
3 changed files with 9 additions and 8 deletions

View File

@@ -1495,7 +1495,6 @@ case OP_Remainder: { /* same as TK_REM, in1, in2, out3 */
type2 = numericType(pIn2);
pOut = &aMem[pOp->p3];
flags = pIn1->flags | pIn2->flags;
if( (flags & MEM_Null)!=0 ) goto arithmetic_result_is_null;
if( (type1 & type2 & MEM_Int)!=0 ){
iA = pIn1->u.i;
iB = pIn2->u.i;
@@ -1519,6 +1518,8 @@ case OP_Remainder: { /* same as TK_REM, in1, in2, out3 */
}
pOut->u.i = iB;
MemSetTypeFlag(pOut, MEM_Int);
}else if( (flags & MEM_Null)!=0 ){
goto arithmetic_result_is_null;
}else{
bIntint = 0;
fp_math: