diff options
author | drh <drh@noemail.net> | 2003-04-22 20:30:37 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2003-04-22 20:30:37 +0000 |
commit | e22a334b782e5434cc1858eeb2f90c0148ff802d (patch) | |
tree | 6f4753183edc52c0c3c0259713c2e26da42c2863 /src/delete.c | |
parent | 383723795905cdc580dc04374b99f4539bfac1a6 (diff) | |
download | sqlite-e22a334b782e5434cc1858eeb2f90c0148ff802d.tar.gz sqlite-e22a334b782e5434cc1858eeb2f90c0148ff802d.zip |
Update the authorizer API so that it reports the database that table and
indices belong to and so that it reports when actions are taken in response
to a trigger. (CVS 928)
FossilOrigin-Name: c675a5504138f34cae6def782b5d3add2c67d2bc
Diffstat (limited to 'src/delete.c')
-rw-r--r-- | src/delete.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/delete.c b/src/delete.c index 9d88de4af..8899e717c 100644 --- a/src/delete.c +++ b/src/delete.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle DELETE FROM statements. ** -** $Id: delete.c,v 1.52 2003/04/17 22:57:53 drh Exp $ +** $Id: delete.c,v 1.53 2003/04/22 20:30:39 drh Exp $ */ #include "sqliteInt.h" @@ -58,6 +58,7 @@ void sqliteDeleteFrom( ){ Vdbe *v; /* The virtual database engine */ Table *pTab; /* The table from which records will be deleted */ + const char *zDb; /* Name of database holding pTab */ int end, addr; /* A couple addresses of generated code */ int i; /* Loop counter */ WhereInfo *pWInfo; /* Information about the WHERE clause */ @@ -97,7 +98,9 @@ void sqliteDeleteFrom( } if( sqliteIsReadOnly(pParse, pTab) ) goto delete_from_cleanup; assert( pTab->pSelect==0 ); /* This table is not a view */ - if( sqliteAuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0) ){ + assert( pTab->iDb<db->nDb ); + zDb = db->aDb[pTab->iDb].zName; + if( sqliteAuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb) ){ goto delete_from_cleanup; } |