mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
merge patch from http://www.sqlite.org/cvstrac/chngview?cn=1953
bug led to PHP exiting on queries with unknown columns
This commit is contained in:
parent
52ffca0b27
commit
9fa1ee360b
1 changed files with 4 additions and 4 deletions
|
@ -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 && iSrc<pTabList->nSrc ){
|
||||
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 ){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue