aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2009-03-02 14:24:21 +0000
committerdrh <drh@noemail.net>2009-03-02 14:24:21 +0000
commit18209cd6e286ca1ccde3eab4efb7ee46fc3b74c4 (patch)
tree236dd6026ecd057e6dd80d60dd8ae4791d63f5b9 /src
parentd742bb78f82cd8b5436056dd30eefeaea5ac85e0 (diff)
downloadsqlite-18209cd6e286ca1ccde3eab4efb7ee46fc3b74c4.tar.gz
sqlite-18209cd6e286ca1ccde3eab4efb7ee46fc3b74c4.zip
Fix the SQLITE_ENABLE_UPDATE_DELETE_LIMIT option for the new Expr compression
logic of check-in (6305). Bug discovered during regression testing. (CVS 6333) FossilOrigin-Name: 91969edac737adf087e35e10aa0a732b3303afd5
Diffstat (limited to 'src')
-rw-r--r--src/delete.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/delete.c b/src/delete.c
index a9988044d..03ff06a1a 100644
--- a/src/delete.c
+++ b/src/delete.c
@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** in order to generate code for DELETE FROM statements.
**
-** $Id: delete.c,v 1.196 2009/02/28 10:47:42 danielk1977 Exp $
+** $Id: delete.c,v 1.197 2009/03/02 14:24:21 drh Exp $
*/
#include "sqliteInt.h"
@@ -181,7 +181,8 @@ Expr *sqlite3LimitWhere(
}
/* generate the SELECT expression tree. */
- pSelect = sqlite3SelectNew(pParse,pEList,pSelectSrc,pWhere,0,0,pOrderBy,0,pLimit,pOffset);
+ pSelect = sqlite3SelectNew(pParse,pEList,pSelectSrc,pWhere,0,0,
+ pOrderBy,0,pLimit,pOffset);
if( pSelect == 0 ) return 0;
/* now generate the new WHERE rowid IN clause for the DELETE/UDPATE */
@@ -190,7 +191,8 @@ Expr *sqlite3LimitWhere(
pInClause = sqlite3PExpr(pParse, TK_IN, pWhereRowid, 0, 0);
if( pInClause == 0 ) goto limit_where_cleanup_1;
- pInClause->pSelect = pSelect;
+ pInClause->x.pSelect = pSelect;
+ pInClause->flags |= EP_xIsSelect;
sqlite3ExprSetHeight(pParse, pInClause);
return pInClause;