1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Changes to support recursive triggers.

FossilOrigin-Name: 9b9c19211593d5ff7b39254a29c284560a8bcedb
This commit is contained in:
dan
2009-08-28 18:53:45 +00:00
parent e408edac16
commit 165921a742
25 changed files with 889 additions and 581 deletions

View File

@@ -2733,9 +2733,10 @@ static int flattenSubquery(
*/
if( ALWAYS(pSubitem->pTab!=0) ){
Table *pTabToDel = pSubitem->pTab;
Parse *pRoot = (pParse->pRoot ? pParse->pRoot : pParse);
if( pTabToDel->nRef==1 ){
pTabToDel->pNextZombie = pParse->pZombieTab;
pParse->pZombieTab = pTabToDel;
pTabToDel->pNextZombie = pRoot->pZombieTab;
pRoot->pZombieTab = pTabToDel;
}else{
pTabToDel->nRef--;
}