aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
authordrh <>2021-10-07 23:04:50 +0000
committerdrh <>2021-10-07 23:04:50 +0000
commitdbfbb5a0c53d19d38249d1562a0f48286d697fb1 (patch)
tree14e84c347b8f9b982e0d99df15efe3d94136b39a /src/select.c
parent477572b9f1afc0d4f377554b64ad2c2c9e3146ac (diff)
downloadsqlite-dbfbb5a0c53d19d38249d1562a0f48286d697fb1.tar.gz
sqlite-dbfbb5a0c53d19d38249d1562a0f48286d697fb1.zip
New assert() statements to protect the u1 and u2 unions of SrcList.
FossilOrigin-Name: 9b91fbcfcc14048f7d0755d47d9b7f9212fa2eaa6f3c04f417fa16c3a47943bf
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/select.c b/src/select.c
index e846a0220..13ed20f6c 100644
--- a/src/select.c
+++ b/src/select.c
@@ -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++;