aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2009-03-24 15:08:09 +0000
committerdrh <drh@noemail.net>2009-03-24 15:08:09 +0000
commitd9da78a2c89341d2507ff43c1732821c80ca1664 (patch)
tree56a14f20c1d1acc86755290f55d943013f9d8e42 /src/select.c
parent4be64691468e95abb6ddc33ea89333b4a63e2e08 (diff)
downloadsqlite-d9da78a2c89341d2507ff43c1732821c80ca1664.tar.gz
sqlite-d9da78a2c89341d2507ff43c1732821c80ca1664.zip
Changes to insure that lookaside memory allocations are never used to hold
schema content. Ticket #3743. (CVS 6377) FossilOrigin-Name: ea74d8dc62f5784089aa8ef098e97c505a79b176
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/select.c b/src/select.c
index 6c5c232e7..86c0c8c9f 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.504 2009/02/25 08:56:47 danielk1977 Exp $
+** $Id: select.c,v 1.505 2009/03/24 15:08:10 drh Exp $
*/
#include "sqliteInt.h"
@@ -1284,7 +1284,7 @@ Table *sqlite3ResultSetOfSelect(Parse *pParse, Select *pSelect){
if( pTab==0 ){
return 0;
}
- pTab->db = db;
+ pTab->dbMem = db->lookaside.bEnabled ? db : 0;
pTab->nRef = 1;
pTab->zName = 0;
selectColumnsFromExprList(pParse, pSelect->pEList, &pTab->nCol, &pTab->aCol);
@@ -3080,7 +3080,7 @@ static int selectExpander(Walker *pWalker, Select *p){
sqlite3WalkSelect(pWalker, pSel);
pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
if( pTab==0 ) return WRC_Abort;
- pTab->db = db;
+ pTab->dbMem = db->lookaside.bEnabled ? db : 0;
pTab->nRef = 1;
pTab->zName = sqlite3MPrintf(db, "sqlite_subquery_%p_", (void*)pTab);
while( pSel->pPrior ){ pSel = pSel->pPrior; }