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

When creating a trigger on a main database table when there is a TEMP table

with the same name, make sure the trigger is bound to the main table.
Ticket [985771e11612].

FossilOrigin-Name: ec914af32675e472694270d46f3ba2214eb2fe90
This commit is contained in:
drh
2010-02-15 16:54:55 +00:00
parent a8c62df904
commit 622d288790
4 changed files with 61 additions and 12 deletions

View File

@@ -126,7 +126,8 @@ void sqlite3BeginTrigger(
goto trigger_cleanup;
}
pTab = sqlite3SrcListLookup(pParse, pTableName);
if( pName2->n==0 && pTab && pTab->pSchema==db->aDb[1].pSchema ){
if( db->init.busy==0 && pName2->n==0 && pTab
&& pTab->pSchema==db->aDb[1].pSchema ){
iDb = 1;
}