1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Defer deleting Table objects associated with flattened subqueries until

all code has been generated, in case some expression node still references
the Table object.  Ticket #3346. (CVS 5650)

FossilOrigin-Name: d04d70336727a0db959c672e6c22cdaa0505dce5
This commit is contained in:
drh
2008-09-01 15:52:10 +00:00
parent 865d4d4290
commit 588a9a1a1c
8 changed files with 83 additions and 20 deletions

View File

@@ -15,7 +15,7 @@
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
** $Id: tokenize.c,v 1.151 2008/08/29 02:14:03 drh Exp $
** $Id: tokenize.c,v 1.152 2008/09/01 15:52:11 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -504,6 +504,11 @@ abort_parse:
sqlite3DeleteTrigger(db, pParse->pNewTrigger);
sqlite3DbFree(db, pParse->apVarExpr);
sqlite3DbFree(db, pParse->aAlias);
while( pParse->pZombieTab ){
Table *p = pParse->pZombieTab;
pParse->pZombieTab = p->pNextZombie;
sqlite3DeleteTable(p);
}
if( nErr>0 && (pParse->rc==SQLITE_OK || pParse->rc==SQLITE_DONE) ){
pParse->rc = SQLITE_ERROR;
}