diff options
author | danielk1977 <danielk1977@noemail.net> | 2006-01-05 14:22:33 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2006-01-05 14:22:33 +0000 |
commit | ad68cb6b6943f288d5f6221dc482a12e8ee8b4cb (patch) | |
tree | cbf92a6674955066dd786f38f8f52eff1ce57ade /src | |
parent | 441b09ae55b6d105bc30463dd31139457b0db1f1 (diff) | |
download | sqlite-ad68cb6b6943f288d5f6221dc482a12e8ee8b4cb.tar.gz sqlite-ad68cb6b6943f288d5f6221dc482a12e8ee8b4cb.zip |
Fix for ticket #1582 (Double delete of invalid LIMIT clause Expr* applied to a UNION ALL query). (CVS 2861)
FossilOrigin-Name: 5dec3a392ba3c249bbca899c12e99c26cc1b8cdb
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/select.c b/src/select.c index 20f07d4db..af19681c5 100644 --- a/src/select.c +++ b/src/select.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** -** $Id: select.c,v 1.284 2006/01/05 11:34:34 danielk1977 Exp $ +** $Id: select.c,v 1.285 2006/01/05 14:22:34 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -1548,14 +1548,14 @@ static int multiSelect( pPrior->pLimit = p->pLimit; pPrior->pOffset = p->pOffset; rc = sqlite3Select(pParse, pPrior, eDest, iParm, 0, 0, 0, aff); + p->pLimit = 0; + p->pOffset = 0; if( rc ){ goto multi_select_end; } p->pPrior = 0; p->iLimit = pPrior->iLimit; p->iOffset = pPrior->iOffset; - p->pLimit = 0; - p->pOffset = 0; if( p->iLimit>=0 ){ addr = sqlite3VdbeAddOp(v, OP_IfMemZero, p->iLimit, 0); VdbeComment((v, "# Jump ahead if LIMIT reached")); |