mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Added code to INSERT, DELETE and UPDATE virtual tables. The new code is
mostly untested. (CVS 3248) FossilOrigin-Name: 32c97b884b104d120db3c0a87f5eab28f36851f8
This commit is contained in:
@@ -103,6 +103,10 @@ void sqlite3BeginTrigger(
|
||||
/* The table does not exist. */
|
||||
goto trigger_cleanup;
|
||||
}
|
||||
if( IsVirtual(pTab) ){
|
||||
sqlite3ErrorMsg(pParse, "cannot create triggers on virtual tables");
|
||||
goto trigger_cleanup;
|
||||
}
|
||||
|
||||
/* Check that the trigger name is not reserved and that no trigger of the
|
||||
** specified name exists */
|
||||
@@ -594,9 +598,10 @@ int sqlite3TriggersExist(
|
||||
int op, /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
|
||||
ExprList *pChanges /* Columns that change in an UPDATE statement */
|
||||
){
|
||||
Trigger *pTrigger = pTab->pTrigger;
|
||||
Trigger *pTrigger;
|
||||
int mask = 0;
|
||||
|
||||
pTrigger = IsVirtual(pTab) ? 0 : pTab->pTrigger;
|
||||
while( pTrigger ){
|
||||
if( pTrigger->op==op && checkColumnOverLap(pTrigger->pColumns, pChanges) ){
|
||||
mask |= pTrigger->tr_tm;
|
||||
|
Reference in New Issue
Block a user