diff options
author | drh <drh@noemail.net> | 2002-03-03 18:59:40 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2002-03-03 18:59:40 +0000 |
commit | 417be79cd19ae31f6d6c6bd26e3f0bda771913f8 (patch) | |
tree | 8af51bbb75875c2ee04cbeea430890648f828e02 /src/expr.c | |
parent | 75148a27b4da71f01de20279627405563eabe33f (diff) | |
download | sqlite-417be79cd19ae31f6d6c6bd26e3f0bda771913f8.tar.gz sqlite-417be79cd19ae31f6d6c6bd26e3f0bda771913f8.zip |
VIEWs are bound to tables when they are used, not when they are first
entered. This works around the problem of what to do if a table is deleted
that a view refers to. (CVS 415)
FossilOrigin-Name: 6121e5ab9328c90c64d40ade3de73ad11d4aaf4e
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index d48718823..9c16889db 100644 --- a/src/expr.c +++ b/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.53 2002/03/03 03:42:31 drh Exp $ +** $Id: expr.c,v 1.54 2002/03/03 18:59:41 drh Exp $ */ #include "sqliteInt.h" @@ -384,6 +384,7 @@ int sqliteExprResolveIds( int j; Table *pTab = pTabList->a[i].pTab; if( pTab==0 ) continue; + assert( pTab->nCol>0 ); for(j=0; j<pTab->nCol; j++){ if( sqliteStrICmp(pTab->aCol[j].zName, z)==0 ){ cnt++; @@ -459,6 +460,7 @@ int sqliteExprResolveIds( char *zTab; Table *pTab = pTabList->a[i].pTab; if( pTab==0 ) continue; + assert( pTab->nCol>0 ); if( pTabList->a[i].zAlias ){ zTab = pTabList->a[i].zAlias; }else{ |