diff options
author | drh <drh@noemail.net> | 2002-07-02 13:05:04 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2002-07-02 13:05:04 +0000 |
commit | 2f2c01e51d09713efafb1e600e0136595acb77c4 (patch) | |
tree | 8e93e1799d1cc277e38e5226a345e1bbd9504083 /src/expr.c | |
parent | 1f66c57a9cce93fcc2f588ae35ae44281fd2b965 (diff) | |
download | sqlite-2f2c01e51d09713efafb1e600e0136595acb77c4.tar.gz sqlite-2f2c01e51d09713efafb1e600e0136595acb77c4.zip |
Fix for ticket #92: Correct the sqliteExprCompare() function so that is takes
into account the iTable and iColumn fields of the Expr structure. Otherwise,
"min(a)" and "min(b)" will compare equal to each other in views. (CVS 658)
FossilOrigin-Name: 85793a4f03250166c21007cab3525709592d0866
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index 5b2d762e6..df2feb873 100644 --- a/src/expr.c +++ b/src/expr.c @@ -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.76 2002/06/29 02:20:08 drh Exp $ +** $Id: expr.c,v 1.77 2002/07/02 13:05:05 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -1391,6 +1391,7 @@ int sqliteExprCompare(Expr *pA, Expr *pB){ return 0; } if( pA->pSelect || pB->pSelect ) return 0; + if( pA->iTable!=pB->iTable || pA->iColumn!=pB->iColumn ) return 0; if( pA->token.z ){ if( pB->token.z==0 ) return 0; if( pB->token.n!=pA->token.n ) return 0; |