From: Stanislav Malyshev Date: Mon, 3 Jan 2005 11:29:27 +0000 (+0000) Subject: merge patch from http://www.sqlite.org/cvstrac/chngview?cn=1953 X-Git-Tag: RELEASE_0_2~411 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9fa1ee360b03f057f3b41db43962dbbdd05e9e23;p=php merge patch from http://www.sqlite.org/cvstrac/chngview?cn=1953 bug led to PHP exiting on queries with unknown columns --- diff --git a/ext/sqlite/libsqlite/src/auth.c b/ext/sqlite/libsqlite/src/auth.c index 3f861c710d..040488077c 100644 --- a/ext/sqlite/libsqlite/src/auth.c +++ b/ext/sqlite/libsqlite/src/auth.c @@ -111,6 +111,7 @@ void sqliteAuthRead( const char *zCol; /* Name of the column of the table */ int iSrc; /* Index in pTabList->a[] of table being read */ const char *zDBase; /* Name of database being accessed */ + TriggerStack *pStack; /* The stack of current triggers */ if( db->xAuth==0 ) return; assert( pExpr->op==TK_COLUMN ); @@ -119,15 +120,14 @@ void sqliteAuthRead( } if( iSrc>=0 && iSrcnSrc ){ pTab = pTabList->a[iSrc].pTab; - }else{ + }else if( (pStack = pParse->trigStack)!=0 ){ /* This must be an attempt to read the NEW or OLD pseudo-tables ** of a trigger. */ - TriggerStack *pStack; /* The stack of current triggers */ - pStack = pParse->trigStack; - assert( pStack!=0 ); assert( pExpr->iTable==pStack->newIdx || pExpr->iTable==pStack->oldIdx ); pTab = pStack->pTab; + }else{ + return; } if( pTab==0 ) return; if( pExpr->iColumn>=0 ){