diff options
author | drh <> | 2024-11-20 14:59:32 +0000 |
---|---|---|
committer | drh <> | 2024-11-20 14:59:32 +0000 |
commit | 2722e2e822a26eb62cdf0e12683de1c5f61bf2b9 (patch) | |
tree | fcf3c4c61979d39337318f3130beb9f4817d6dc9 /src/wherecode.c | |
parent | d4a65cfc51c5dffebc23d29a91cd369c36943f4c (diff) | |
download | sqlite-2722e2e822a26eb62cdf0e12683de1c5f61bf2b9.tar.gz sqlite-2722e2e822a26eb62cdf0e12683de1c5f61bf2b9.zip |
Bug fix in the SubrtnSig logic from [c9a3498113074bbc], if a subquery is
copied and then changes are made to the copy, be sure to give the copy
a unique Select.selId value so that the original will not be substituted
in place of the modified copy.
[forum:/forumpost/0b9ded2f8428ac00|Forum post 0b9ded2f8428ac00].
FossilOrigin-Name: 19d1bede5654bcfa9f7a151b9b2616a3d10873b8e3f8cf54a3a7e810da08f844
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index 0bd1733b7..045653aac 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -615,6 +615,7 @@ static Expr *removeUnindexableInClauseTerms( pNew->pLeft->x.pList = pLhs; } pSelect->pEList = pRhs; + pSelect->selId = ++pParse->nSelect; /* Req'd for SubrtnSig validity */ if( pLhs && pLhs->nExpr==1 ){ /* Take care here not to generate a TK_VECTOR containing only a ** single value. Since the parser never creates such a vector, some |