]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Previous change to the OP_ForceInt opcode did not work correctly when the
authordrh <drh@noemail.net>
Thu, 11 Dec 2008 20:03:22 +0000 (20:03 +0000)
committerdrh <drh@noemail.net>
Thu, 11 Dec 2008 20:03:22 +0000 (20:03 +0000)
input is a negative floating point value.  This change is the fix.
Ticket #3536. (CVS 6023)

FossilOrigin-Name: f6c50f357c302907a5398c551a5c596f7d305031

manifest
manifest.uuid
src/vdbe.c

index 1d28cf9cc4b55cee0993472d9610c1df71eded9f..e82f3283a4d07c7d3c66bf269230ac9010807203 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Make\ssure\sthe\sOP_ForceInt\svdbe\sopcode\sdoes\snot\scause\sa\srowid\soverflow.\nTicket\s#3536.\s\sTests\sto\sverify\sthis\schange\swill\sbe\schecked\sin\sseparately.\s(CVS\s6022)
-D 2008-12-11T19:50:19
+C Previous\schange\sto\sthe\sOP_ForceInt\sopcode\sdid\snot\swork\scorrectly\swhen\sthe\ninput\sis\sa\snegative\sfloating\spoint\svalue.\s\sThis\schange\sis\sthe\sfix.\nTicket\s#3536.\s(CVS\s6023)
+D 2008-12-11T20:03:22
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in f7e4c81c347b04f7b0f1c1b081a168645d7b8af7
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -194,7 +194,7 @@ F src/update.c 080889d241e4dcd1c545c8051eb6de86f4939295
 F src/utf.c 1da9c832dba0fa8f865b5b902d93f420a1ee4245
 F src/util.c ea62608f66f33a7e8322de83024ae37c415c0c7f
 F src/vacuum.c 383d6297bddc011ab04a9eed110db6eaf523e8e9
-F src/vdbe.c 78e24995434444af5e70954bc2a3c11b7df8ce09
+F src/vdbe.c 0f9f19520c0b9ac474115b242d07ce5a2e8573d2
 F src/vdbe.h 03516f28bf5aca00a53c4dccd6c313f96adb94f6
 F src/vdbeInt.h e6e80a99ce634983b7cc2498843b4d2e5540900a
 F src/vdbeapi.c 85c33cfbfa56249cbe627831610afafba754477d
@@ -664,7 +664,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P da2ec96422b1f9de2e47d3b8c19ed20579742a9b
-R c7952d9cca38bcb28b7004a2d09f78ae
+P 6a049c6595550c123e77199cf7f3898bfcf40c86
+R 30f4db4022dbc33bbe241ed05b40d603
 U drh
-Z e33e580283d52f7544ecf69dc34e2327
+Z 34043079a7476d69b5d19a3b388c9c6e
index c7b6b314506c8a1edc759a4bd6548abda59ef39f..d2731f00366daa99c8e9e4fbcc9000438ea39a7e 100644 (file)
@@ -1 +1 @@
-6a049c6595550c123e77199cf7f3898bfcf40c86
\ No newline at end of file
+f6c50f357c302907a5398c551a5c596f7d305031
\ No newline at end of file
index 738f1170542a5f1aadb25b7d1fe466655b0a330b..0a36b50f2035e2ea64170e5df83d5c4c0a6e01e1 100644 (file)
@@ -43,7 +43,7 @@
 ** in this file for details.  If in doubt, do not deviate from existing
 ** commenting and indentation practices when changing or adding code.
 **
-** $Id: vdbe.c,v 1.800 2008/12/11 19:50:19 drh Exp $
+** $Id: vdbe.c,v 1.801 2008/12/11 20:03:22 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -1466,9 +1466,7 @@ case OP_ForceInt: {            /* jump, in1 */
   }else{
     assert( pIn1->flags & MEM_Real );
     v = (sqlite3_int64)pIn1->r;
-    if( pIn1->r>(double)v ){
-      incrV = 1;
-    }
+    incrV = pIn1->r>(double)v ?1:0;
   }
   if( incrV ){
     if( v==LARGEST_INT64 ){