From: drh Date: Mon, 17 Apr 2017 23:23:17 +0000 (+0000) Subject: Defer checking for null in the comparison operators, since that is an X-Git-Tag: version-3.19.0~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cfcca0276503c33211e6f02bc6fe8c75319a8d53;p=thirdparty%2Fsqlite.git Defer checking for null in the comparison operators, since that is an uncommon case. FossilOrigin-Name: 5684525613961fed9db6a4d10dbe25521201b24f08e011df3a20ac895316957d --- diff --git a/manifest b/manifest index d198802313..e5b734be03 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Do\snot\sallow\sa\sMem\sobject\sto\sbe\sboth\sNULL\sand\ssome\sother\stype\sat\sthe\ssame\stime. -D 2017-04-17T20:50:34.840 +C Defer\schecking\sfor\snull\sin\sthe\scomparison\soperators,\ssince\sthat\sis\san\nuncommon\scase. +D 2017-04-17T23:23:17.393 F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 6a8c838220f7c00820e1fc0ac1bccaaa8e5676067e1dbfa1bafa7a4ffecf8ae6 @@ -469,7 +469,7 @@ F src/update.c c443935c652af9365e033f756550b5032d02e1b06eb2cb890ed7511ae0c051dc F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c F src/util.c ca8440ede81e155d15cff7c101654f60b55a9ae6 F src/vacuum.c 1fe4555cd8c9b263afb85b5b4ee3a4a4181ad569 -F src/vdbe.c 51c6e166aa208882f28647c2fe59b71326b401f5a45bd5a2f1d3054aa08b33fd +F src/vdbe.c 11604e6c5d350a2c3b820130246c894de5a97d675a16f9825e88839fb9282eb3 F src/vdbe.h f7d1456e28875c2dcb964056589b5b7149ab7edf39edeca801596a39bb3d3848 F src/vdbeInt.h c070bc5c8b913bda0ceaa995cd4d939ded5e4fc96cf7c3c1c602d41b871f8ade F src/vdbeapi.c 5b08d82592bcff4470601fe78aaabebd50837860 @@ -1575,7 +1575,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 69f51f838abcf57b35e41f7a10fbb45f56536f93825aac865debc3c8315930be -R 64888a299504d2f3a6ae0f4b59c9c8bb +P e698db1956bb3aba32cd3ec633ec20f5d19b1a10bc68d3772903bca3c87ee158 +R d9474093122e32538bb559c220a1d671 U drh -Z cefc6e2d5ac1cd873685a6b283e84cfc +Z 5309f4dbe4f5abfd0a4417ec6708da32 diff --git a/manifest.uuid b/manifest.uuid index 1d21d6cd2b..23a0f3fc6d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e698db1956bb3aba32cd3ec633ec20f5d19b1a10bc68d3772903bca3c87ee158 \ No newline at end of file +5684525613961fed9db6a4d10dbe25521201b24f08e011df3a20ac895316957d \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index ebd304ecb6..8f0777e69d 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -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: