aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <Dan Kennedy>2025-05-31 18:16:21 +0000
committerdan <Dan Kennedy>2025-05-31 18:16:21 +0000
commit51e3f855b88835139bddf7367b6df4d488fcaee6 (patch)
treed9cde1232ee2540e71d56714c1ecabab549d741c /src
parent52486939249c1104572b8c45563de19f600e7f96 (diff)
downloadsqlite-51e3f855b88835139bddf7367b6df4d488fcaee6.tar.gz
sqlite-51e3f855b88835139bddf7367b6df4d488fcaee6.zip
Fix an affinity problem caused by a USING or NATURAL JOIN on the LHS of a FULL JOIN. [forum:/forumpost/5028c785b6|Forum post 5028c785b6].
FossilOrigin-Name: 8d393ca07fe09f48d77adb517e2e4baaa58a9251422de62a0504999205d3ea1d
Diffstat (limited to 'src')
-rw-r--r--src/select.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/select.c b/src/select.c
index 8eaf5e2b6..1525a4640 100644
--- a/src/select.c
+++ b/src/select.c
@@ -630,6 +630,9 @@ static int sqlite3ProcessJoin(Parse *pParse, Select *p){
if( pFuncArgs ){
pFuncArgs = sqlite3ExprListAppend(pParse, pFuncArgs, pE1);
pE1 = sqlite3ExprFunction(pParse, pFuncArgs, &tkCoalesce, 0);
+ if( pE1 ){
+ pE1->affExpr = sqlite3ExprAffinity(pFuncArgs->a[0].pExpr);
+ }
}
}else if( (pSrc->a[i+1].fg.jointype & JT_LEFT)!=0 && pParse->nErr==0 ){
assert( pE1!=0 );