diff options
author | drh <drh@noemail.net> | 2003-01-12 18:02:16 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2003-01-12 18:02:16 +0000 |
commit | ed6c8671b342e9b3793e2603e7f098ba4fc092a4 (patch) | |
tree | 1243d500342286b978543d20e5c88264cedfa2e5 /src/delete.c | |
parent | 49f0936ec79dcbdbd80134151658615726643fa1 (diff) | |
download | sqlite-ed6c8671b342e9b3793e2603e7f098ba4fc092a4.tar.gz sqlite-ed6c8671b342e9b3793e2603e7f098ba4fc092a4.zip |
Initial check-in of the code for the new sqlite_set_authorizer() API function.
The code is mostly untested at this point. (CVS 827)
FossilOrigin-Name: 52d5007f64d0af5286b2a0e1f0b9e53c86bece3f
Diffstat (limited to 'src/delete.c')
-rw-r--r-- | src/delete.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/delete.c b/src/delete.c index bfcf2e4e2..5c5582433 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.43 2003/01/11 13:30:57 drh Exp $ +** $Id: delete.c,v 1.44 2003/01/12 18:02:18 drh Exp $ */ #include "sqliteInt.h" @@ -88,7 +88,8 @@ void sqliteDeleteFrom( int row_triggers_exist = 0; int oldIdx = -1; - if( pParse->nErr || sqlite_malloc_failed ){ + if( pParse->nErr || sqlite_malloc_failed + || sqliteAuthCommand(pParse,"DELETE",0) ){ pTabList = 0; goto delete_from_cleanup; } @@ -125,6 +126,7 @@ void sqliteDeleteFrom( assert( pTabList->nSrc==1 ); pTab = pTabList->a[0].pTab; assert( pTab->pSelect==0 ); /* This table is not a view */ + if( sqliteAuthDelete(pParse, pTab->zName, 0) ) goto delete_from_cleanup; /* Allocate a cursor used to store the old.* data for a trigger. */ |