mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Fix for ticket #1582 (Double delete of invalid LIMIT clause Expr* applied to a UNION ALL query). (CVS 2861)
FossilOrigin-Name: 5dec3a392ba3c249bbca899c12e99c26cc1b8cdb
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user