aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2006-03-02 04:44:23 +0000
committerdrh <drh@noemail.net>2006-03-02 04:44:23 +0000
commit41714d6f837ad0313b0aaa3f2813dcc5410bb0db (patch)
tree595e4b408e8dabbc20e1446d0b9c374217da22ee /src/expr.c
parentd589a92a26a7a74ee7c9770157f34e4ed7f0d774 (diff)
downloadsqlite-41714d6f837ad0313b0aaa3f2813dcc5410bb0db.tar.gz
sqlite-41714d6f837ad0313b0aaa3f2813dcc5410bb0db.zip
Allow WHERE clause terms on the left table of a LEFT OUTER JOIN to
contain aggregate subqueries. Ticket #1697. (CVS 3117) FossilOrigin-Name: a286e54e26f9a364127649eeea160d5fa8928faf
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c
index 5a05f513a..0edad9974 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.254 2006/02/10 07:07:15 danielk1977 Exp $
+** $Id: expr.c,v 1.255 2006/03/02 04:44:24 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1692,7 +1692,9 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
#ifndef SQLITE_OMIT_SUBQUERY
case TK_EXISTS:
case TK_SELECT: {
- sqlite3CodeSubselect(pParse, pExpr);
+ if( pExpr->iColumn==0 ){
+ sqlite3CodeSubselect(pParse, pExpr);
+ }
sqlite3VdbeAddOp(v, OP_MemLoad, pExpr->iColumn, 0);
VdbeComment((v, "# load subquery result"));
break;