1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Do not allow triggers on shadow tables under defensive mode.

FossilOrigin-Name: 44b932ff16e35814febd842d11215cf243393f173aade33ceded473598221e88
This commit is contained in:
drh
2023-10-13 18:29:18 +00:00
parent d7cdfe74f6
commit 6f12e51313
3 changed files with 12 additions and 8 deletions

View File

@@ -183,6 +183,10 @@ void sqlite3BeginTrigger(
sqlite3ErrorMsg(pParse, "cannot create triggers on virtual tables");
goto trigger_orphan_error;
}
if( (pTab->tabFlags & TF_Shadow)!=0 && sqlite3ReadOnlyShadowTables(db) ){
sqlite3ErrorMsg(pParse, "cannot create triggers on shadow tables");
goto trigger_orphan_error;
}
/* Check that the trigger name is not reserved and that no trigger of the
** specified name exists */