]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Work around an over-zealous optimization in GCC 4.3.3. See
authordrh <drh@noemail.net>
Fri, 14 Aug 2009 17:53:39 +0000 (17:53 +0000)
committerdrh <drh@noemail.net>
Fri, 14 Aug 2009 17:53:39 +0000 (17:53 +0000)
CVSTrac ticket #4027.

FossilOrigin-Name: 9cbe3654055a78c09ea1ecd5dc599bcd888b57e3

manifest
manifest.uuid
src/vdbemem.c

index 3972e5821cf8fa3d5eb5a1200cea791d46c57bdb..7e4ba89e058b92e2cb2db9a3b003cc9e5453ba16 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,8 @@
-C Fix\sa\scase\swhere\sSQLite\smay\swrite\spast\sthe\send\sof\sa\sbuffer\sas\sa\sresult\sof\sa\scorrupted\sdatabase\sfile.
-D 2009-08-14T17:01:22
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+C Work\saround\san\sover-zealous\soptimization\sin\sGCC\s4.3.3.\sSee\nCVSTrac\sticket\s#4027.
+D 2009-08-14T17:53:39
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 0f7761c5d1c62ae7a841e3393ffaff1fa0f5c00a
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -210,7 +213,7 @@ F src/vdbeInt.h 831c254a6eef237ef4664c8381a0137586567007
 F src/vdbeapi.c 0ab8ada7260b32031ca97f338caecf0812460624
 F src/vdbeaux.c 4956536a636468fd07284028c39aab65ea99777e
 F src/vdbeblob.c a3f3e0e877fc64ea50165eec2855f5ada4477611
-F src/vdbemem.c 364cfce843926224f917ab89ee476be958c864ed
+F src/vdbemem.c ff40efaa2772e7aa66cf7501bf4142fd1a44bf51
 F src/vtab.c aedd76e8670d5a5379f93804398d3ba960125547
 F src/walker.c 1edca756275f158b80f20eb6f104c8d3fcc96a04
 F src/where.c 7573120c1f2fe6d4c246f138f1e30fbcda3db241
@@ -743,7 +746,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P 34c21210eb03bd1230cde5d08039a8a656f35674
-R f46a5a69fe608d04233707dc2ffff1a9
-U dan
-Z baaa9683a6aa9b1a09c65002a4959fa5
+P 43321a556031942389ca11b033c1eae46ac6141b
+R eb2beaf54103dc01ac5b253ec6add39c
+U drh
+Z 9a01aa6fc3a050aa76e3a8e84bdd68fb
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFKhaSnoxKgR168RlERAjFRAJ9mnEDWyq0jZnL+V4BV6BYX1aQUPgCcDqZL
+lQjS60b3gaHbvLqqZPVoylo=
+=S0NM
+-----END PGP SIGNATURE-----
index 39a636dba2ad4dfc72098a0daf0e029f0e6c8c48..7615f8f0e28d998d84873e7079903c4ee6cb65ed 100644 (file)
@@ -1 +1 @@
-43321a556031942389ca11b033c1eae46ac6141b
\ No newline at end of file
+9cbe3654055a78c09ea1ecd5dc599bcd888b57e3
\ No newline at end of file
index e806db36342dda9ea0d632f90fa15d48564c3cf3..ef6ed8f9de42e4b35ea4000723035605d5686af0 100644 (file)
@@ -418,11 +418,14 @@ void sqlite3VdbeIntegerAffinity(Mem *pMem){
   **    (2) The integer is neither the largest nor the smallest
   **        possible integer (ticket #3922)
   **
-  ** The second term in the following conditional enforces the second
-  ** condition under the assumption that addition overflow causes
-  ** values to wrap around.
+  ** The second and third terms in the following conditional enforces
+  ** the second condition under the assumption that addition overflow causes
+  ** values to wrap around.  On x86 hardware, the third term is always
+  ** true and could be omitted.  But we leave it in because other
+  ** architectures might behave differently.
   */
-  if( pMem->r==(double)pMem->u.i && (pMem->u.i-1) < (pMem->u.i+1) ){
+  if( pMem->r==(double)pMem->u.i && pMem->u.i>SMALLEST_INT64
+      && ALWAYS(pMem->u.i<LARGEST_INT64) ){
     pMem->flags |= MEM_Int;
   }
 }