stas Mon Jan 3 06:29:27 2005 EDT
Modified files:
/php-src/ext/sqlite/libsqlite/src auth.c
Log:
merge patch from http://www.sqlite.org/cvstrac/chngview?cn=1953
bug led to PHP exiting on queries with unknown columns
http://cvs.php.net/diff.php/php-src/ext/sqlite/libsqlite/src/auth.c?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/sqlite/libsqlite/src/auth.c
diff -u php-src/ext/sqlite/libsqlite/src/auth.c:1.5
php-src/ext/sqlite/libsqlite/src/auth.c:1.6
--- php-src/ext/sqlite/libsqlite/src/auth.c:1.5 Sat Jul 10 08:27:51 2004
+++ php-src/ext/sqlite/libsqlite/src/auth.c Mon Jan 3 06:29:27 2005
@@ -14,7 +14,7 @@
** systems that do not need this facility may omit it by recompiling
** the library with -DSQLITE_OMIT_AUTHORIZATION=1
**
-** $Id: auth.c,v 1.5 2004/07/10 12:27:51 wez Exp $
+** $Id: auth.c,v 1.6 2005/01/03 11:29:27 stas Exp $
*/
#include "sqliteInt.h"
@@ -111,6 +111,7 @@
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 @@
}
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 ){
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php