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/sqliteInt.h b/src/sqliteInt.h
index ceb54c7..465f6af 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.193 2003/06/23 11:06:02 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.194 2003/07/20 01:16:47 drh Exp $
 */
 #include "config.h"
 #include "sqlite.h"
@@ -778,16 +778,17 @@
 ** in the VDBE that record the limit and offset counters.
 */
 struct Select {
-  int isDistinct;        /* True if the DISTINCT keyword is present */
   ExprList *pEList;      /* The fields of the result */
+  u8 op;                 /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */
+  u8 isDistinct;         /* True if the DISTINCT keyword is present */
   SrcList *pSrc;         /* The FROM clause */
   Expr *pWhere;          /* The WHERE clause */
   ExprList *pGroupBy;    /* The GROUP BY clause */
   Expr *pHaving;         /* The HAVING clause */
   ExprList *pOrderBy;    /* The ORDER BY clause */
-  int op;                /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */
   Select *pPrior;        /* Prior select in a compound select statement */
   int nLimit, nOffset;   /* LIMIT and OFFSET values.  -1 means not used */
+  int iLimit, iOffset;   /* Memory registers holding LIMIT & OFFSET counters */
   char *zSelect;         /* Complete text of the SELECT command */
 };