]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Simplify two conditionals and add testcase() macros to the affinity transform
authordrh <drh@noemail.net>
Fri, 19 Sep 2014 22:44:20 +0000 (22:44 +0000)
committerdrh <drh@noemail.net>
Fri, 19 Sep 2014 22:44:20 +0000 (22:44 +0000)
logic in the comparison operators.

FossilOrigin-Name: 544664cadfb4e504bc0b321c865d1ecb8a831e20

manifest
manifest.uuid
src/vdbe.c

index 6625f6c19ae93c136dabe752618c8c83c367fee8..fd932fa1b7a25e2f0c445603216f8909f0ac49ae 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Recognize\sthe\sinvariant\sthat\sa\sMem\sobject\scannot\sbe\sMEM_Dyn\sand\shave\s\na\snon-zero\sszMalloc\sat\sthe\ssame\stime.\s\sEnforce\sthis\swith\sassert()s\sand\nexploit\sit\sin\sthe\ssqlite3VdbeMemClearAndResize()\sroutine\sfor\sa\sperformance\nincrease.
-D 2014-09-19T22:30:49.809
+C Simplify\stwo\sconditionals\sand\sadd\stestcase()\smacros\sto\sthe\saffinity\stransform\nlogic\sin\sthe\scomparison\soperators.
+D 2014-09-19T22:44:20.033
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -288,7 +288,7 @@ F src/update.c 729f6f18fc27740591d085e1172cebe311144bf0
 F src/utf.c fc6b889ba0779b7722634cdeaa25f1930d93820c
 F src/util.c 4006c01772bd8d8ac4306d523bbcee41d3e392d8
 F src/vacuum.c 59f03f92bcff57faa6a8ca256eb29ccddfb0614a
-F src/vdbe.c 16efd1ae26d877827cd6669f5f19afd8d8903d08
+F src/vdbe.c de1af1795bebdad20c23e82bafa2f531e9893198
 F src/vdbe.h 09f5b4e3719fa454f252322b1cdab5cf1f361327
 F src/vdbeInt.h f177bed1ec8d4eb5c7089f012aeb95f374745735
 F src/vdbeapi.c e9e33b59834e3edc8790209765e069874c269d9d
@@ -1198,7 +1198,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P e996ca32cb643c558b616c0dd872f3351b6aa3ef
-R 5148a059197bc43e5fc9e398f77834ac
+P 3b21cf2b284048da4b728a5d6ec89e5c330144d4
+R c321e5b6443015b26d22f3eade4b771c
 U drh
-Z 24b5c2935cab55558784e01172e53731
+Z b0d83e95571a3002a17dc014110d23f5
index d94cacb1fd5168e81b79bc079d3cb94b4b2ebe7c..aee58dcbcbe1ab0996a4d5a61c52a5881cd2ae58 100644 (file)
@@ -1 +1 @@
-3b21cf2b284048da4b728a5d6ec89e5c330144d4
\ No newline at end of file
+544664cadfb4e504bc0b321c865d1ecb8a831e20
\ No newline at end of file
index 136b7abae16b791123298b6a1254accec17ffff0..26ca72b9f4efdf465a2ea58fe0b85e8e7325ba01 100644 (file)
@@ -1900,17 +1900,21 @@ case OP_Ge: {             /* same as TK_GE, jump, in1, in3 */
     /* Neither operand is NULL.  Do a comparison. */
     affinity = pOp->p5 & SQLITE_AFF_MASK;
     if( affinity>=SQLITE_AFF_NUMERIC ){
-      if( (pIn1->flags & (MEM_Int|MEM_Real))==0 && (pIn1->flags&MEM_Str)!=0 ){
+      if( (pIn1->flags & (MEM_Int|MEM_Real|MEM_Str))==MEM_Str ){
         applyNumericAffinity(pIn1,0);
       }
-      if( (pIn3->flags & (MEM_Int|MEM_Real))==0 && (pIn3->flags&MEM_Str)!=0 ){
+      if( (pIn3->flags & (MEM_Int|MEM_Real|MEM_Str))==MEM_Str ){
         applyNumericAffinity(pIn3,0);
       }
     }else if( affinity==SQLITE_AFF_TEXT ){
       if( (pIn1->flags & MEM_Str)==0 && (pIn1->flags & (MEM_Int|MEM_Real))!=0 ){
+        testcase( pIn1->flags & MEM_Int );
+        testcase( pIn1->flags & MEM_Real );
         sqlite3VdbeMemStringify(pIn1, encoding, 1);
       }
       if( (pIn3->flags & MEM_Str)==0 && (pIn3->flags & (MEM_Int|MEM_Real))!=0 ){
+        testcase( pIn3->flags & MEM_Int );
+        testcase( pIn3->flags & MEM_Real );
         sqlite3VdbeMemStringify(pIn3, encoding, 1);
       }
     }