]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a && where & was intended. This is a real problem, but it would be
authordrh <drh@noemail.net>
Wed, 18 Apr 2007 17:07:57 +0000 (17:07 +0000)
committerdrh <drh@noemail.net>
Wed, 18 Apr 2007 17:07:57 +0000 (17:07 +0000)
very difficult to devise a test case where it might lead to an unexpected
result.  Ticket #2306. (CVS 3856)

FossilOrigin-Name: 7f9f0444ed1a85ed682b604fded535bff5be1535

manifest
manifest.uuid
src/expr.c

index 0a1e868efbf6ff0ff3a7155308d1f6ab065cbaf7..b795bc7eab18728cbe953211bf0cd2e703be8767 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Better\shandle\smalloc()\sfailures\sin\sthe\s"echo"\svirtual\stable\stest\smodule.\s(CVS\s3855)
-D 2007-04-18T17:04:01
+C Fix\sa\s&&\swhere\s&\swas\sintended.\s\sThis\sis\sa\sreal\sproblem,\sbut\sit\swould\sbe\nvery\sdifficult\sto\sdevise\sa\stest\scase\swhere\sit\smight\slead\sto\san\sunexpected\nresult.\s\sTicket\s#2306.\s(CVS\s3856)
+D 2007-04-18T17:07:58
 F Makefile.in 8cab54f7c9f5af8f22fd97ddf1ecfd1e1860de62
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -66,7 +66,7 @@ F src/complete.c 7d1a44be8f37de125fcafd3d3a018690b3799675
 F src/date.c 74b76691bddf58b634f6bf4a77c8c58234268c6e
 F src/delete.c 5c0d89b3ef7d48fe1f5124bfe8341f982747fe29
 F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
-F src/expr.c 2c32c546006627d70a7b941b318489980fd1912e
+F src/expr.c 2f0f9f89efe9170e5e6ca5d5e93a9d5896fff5ac
 F src/func.c 007d957c057bb42b0d37aa6ad4be0e1c67a8871b
 F src/hash.c 67b23e14f0257b69a3e8aa663e4eeadc1a2b6fd5
 F src/hash.h 1b3f7e2609141fd571f62199fc38687d262e9564
@@ -459,7 +459,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 165dc72d7024258e225c8a7d60118071282f0f44
-R 6e7465e910425674afda9738e811fde0
-U danielk1977
-Z d90521f72ea80e3e9d01ccd5613b499d
+P 6881f9212fea0e0a98045b0acc60151eeaf5839e
+R 4aa41510ccfc71c1b56ace69a3977ffc
+U drh
+Z 3ac8077c4e4ff67aa675c584eba3ee78
index a7b04ce4a925489078df7fa1674cc0a699545680..357a98fdeb0bed946bad310994d50db6b0ff57e1 100644 (file)
@@ -1 +1 @@
-6881f9212fea0e0a98045b0acc60151eeaf5839e
\ No newline at end of file
+7f9f0444ed1a85ed682b604fded535bff5be1535
\ No newline at end of file
index f4237b46afba7348a093c6fd847bb9f0f9b71ced..09bea6b7791c1a67ded1d544c38a7e3968d8eeab 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains routines used for analyzing expressions and
 ** for generating VDBE code that evaluates expressions in SQLite.
 **
-** $Id: expr.c,v 1.284 2007/04/13 16:06:33 drh Exp $
+** $Id: expr.c,v 1.285 2007/04/18 17:07:58 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -237,12 +237,12 @@ Expr *sqlite3Expr(int op, Expr *pLeft, Expr *pRight, const Token *pToken){
   }else if( pLeft ){
     if( pRight ){
       sqlite3ExprSpan(pNew, &pLeft->span, &pRight->span);
-      if( pRight->flags && EP_ExpCollate ){
+      if( pRight->flags & EP_ExpCollate ){
         pNew->flags |= EP_ExpCollate;
         pNew->pColl = pRight->pColl;
       }
     }
-    if( pLeft->flags && EP_ExpCollate ){
+    if( pLeft->flags & EP_ExpCollate ){
       pNew->flags |= EP_ExpCollate;
       pNew->pColl = pLeft->pColl;
     }