Fix the LIMIT clause so that it applies to the entire query in a compound
query. Prior to this change LIMITs on compound queries did not work at
all. Ticket #393. (CVS 1058)
FossilOrigin-Name: 543479e3aed77976a0c689cf40811bf88353f706
diff --git a/src/expr.c b/src/expr.c
index d6b9b12..7f3f96f 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.96 2003/05/31 16:21:12 drh Exp $
+** $Id: expr.c,v 1.97 2003/07/20 01:16:47 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -235,6 +235,8 @@
pNew->nLimit = p->nLimit;
pNew->nOffset = p->nOffset;
pNew->zSelect = 0;
+ pNew->iLimit = -1;
+ pNew->iOffset = -1;
return pNew;
}