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
diff --git a/src/expr.c b/src/expr.c
index 5b2d762..df2feb8 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 @@
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;