mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
New assert() statements to protect the u1 and u2 unions of SrcList.
FossilOrigin-Name: 9b91fbcfcc14048f7d0755d47d9b7f9212fa2eaa6f3c04f417fa16c3a47943bf
This commit is contained in:
@@ -4995,6 +4995,7 @@ int sqlite3IndexedByLookup(Parse *pParse, SrcItem *pFrom){
|
||||
pParse->checkSchema = 1;
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
assert( pFrom->fg.isCte==0 );
|
||||
pFrom->u2.pIBIndex = pIdx;
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -5252,6 +5253,7 @@ static int resolveFromTermToCte(
|
||||
if( db->mallocFailed ) return 2;
|
||||
pFrom->pSelect->selFlags |= SF_CopyCte;
|
||||
assert( pFrom->pSelect );
|
||||
assert( pFrom->fg.isIndexedBy==0 ); /* Prevent collision in union u2 */
|
||||
pFrom->fg.isCte = 1;
|
||||
pFrom->u2.pCteUse = pCteUse;
|
||||
pCteUse->nUse++;
|
||||
|
||||
Reference in New Issue
Block a user