mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +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:
11
src/expr.c
11
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.193 2005/02/08 07:50:41 danielk1977 Exp $
|
||||
** $Id: expr.c,v 1.194 2005/02/12 08:59:57 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -473,7 +473,10 @@ SrcList *sqlite3SrcListDup(SrcList *p){
|
||||
pNewItem->zAlias = sqliteStrDup(pOldItem->zAlias);
|
||||
pNewItem->jointype = pOldItem->jointype;
|
||||
pNewItem->iCursor = pOldItem->iCursor;
|
||||
pNewItem->pTab = 0;
|
||||
pNewItem->pTab = pOldItem->pTab;
|
||||
if( pNewItem->pTab ){
|
||||
pNewItem->pTab->isTransient = 0;
|
||||
}
|
||||
pNewItem->pSelect = sqlite3SelectDup(pOldItem->pSelect);
|
||||
pNewItem->pOn = sqlite3ExprDup(pOldItem->pOn);
|
||||
pNewItem->pUsing = sqlite3IdListDup(pOldItem->pUsing);
|
||||
@@ -518,8 +521,8 @@ Select *sqlite3SelectDup(Select *p){
|
||||
pNew->iOffset = -1;
|
||||
pNew->ppOpenTemp = 0;
|
||||
pNew->pFetch = 0;
|
||||
pNew->isResolved = 0;
|
||||
pNew->isAgg = 0;
|
||||
pNew->isResolved = p->isResolved;
|
||||
pNew->isAgg = p->isAgg;
|
||||
return pNew;
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user