mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Improve the accuracy of affinity and collating sequence analysis for
NATURAL JOINs to the left of RIGHT JOINs where source tables are views or subqueries. Initial problem report in [forum:/forumpost/829306db47|forum post 829306db47]. FossilOrigin-Name: f184d1d236e47962658a4639d9533f67a525b74cfe0f06c93e9b85fdcd02a15f
This commit is contained in:
@@ -73,7 +73,9 @@ char sqlite3ExprAffinity(const Expr *pExpr){
|
||||
pExpr->pLeft->x.pSelect->pEList->a[pExpr->iColumn].pExpr
|
||||
);
|
||||
}
|
||||
if( op==TK_VECTOR ){
|
||||
if( op==TK_VECTOR
|
||||
|| (op==TK_FUNCTION && pExpr->affExpr==SQLITE_AFF_DEFER)
|
||||
){
|
||||
assert( ExprUseXList(pExpr) );
|
||||
return sqlite3ExprAffinity(pExpr->x.pList->a[0].pExpr);
|
||||
}
|
||||
@@ -266,7 +268,9 @@ CollSeq *sqlite3ExprCollSeq(Parse *pParse, const Expr *pExpr){
|
||||
p = p->pLeft;
|
||||
continue;
|
||||
}
|
||||
if( op==TK_VECTOR ){
|
||||
if( op==TK_VECTOR
|
||||
|| (op==TK_FUNCTION && p->affExpr==SQLITE_AFF_DEFER)
|
||||
){
|
||||
assert( ExprUseXList(p) );
|
||||
p = p->x.pList->a[0].pExpr;
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user