mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Fix a problem with sub-queries and the flattening optimization. Also handle an extra case of database corruption. (CVS 2324)
FossilOrigin-Name: f7858d8830cdd0f57b8f9bc73068d29a7062b8ac
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.240 2005/02/08 07:50:41 danielk1977 Exp $
|
||||
** $Id: select.c,v 1.241 2005/02/12 08:59:57 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -1835,6 +1835,8 @@ static void substExpr(Expr *pExpr, int iTable, ExprList *pEList){
|
||||
pExpr->iAgg = pNew->iAgg;
|
||||
sqlite3TokenCopy(&pExpr->token, &pNew->token);
|
||||
sqlite3TokenCopy(&pExpr->span, &pNew->span);
|
||||
pExpr->pSelect = sqlite3SelectDup(pNew->pSelect);
|
||||
pExpr->flags = pNew->flags;
|
||||
}
|
||||
}else{
|
||||
substExpr(pExpr->pLeft, iTable, pEList);
|
||||
|
||||
Reference in New Issue
Block a user