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

Avoid an assert() failure that could occur in SQLITE_ENABLE_UPDATE_DELETE_LIMIT builds when a WITH clause attached to an UPDATE or DELETE statement created a CTE of the same name as the table being modified.

FossilOrigin-Name: 8edf56d1698c3db38250db3b25864f658488414efb3a6b3e1443283b6affd26d
This commit is contained in:
dan
2023-05-17 11:31:51 +00:00
parent 010bd47b98
commit 32a5feb53e
5 changed files with 42 additions and 11 deletions

View File

@@ -35,6 +35,7 @@ Table *sqlite3SrcListLookup(Parse *pParse, SrcList *pSrc){
pTab = sqlite3LocateTableItem(pParse, 0, pItem);
sqlite3DeleteTable(pParse->db, pItem->pTab);
pItem->pTab = pTab;
pItem->fg.notCte = 1;
if( pTab ){
pTab->nTabRef++;
if( pItem->fg.isIndexedBy && sqlite3IndexedByLookup(pParse, pItem) ){