1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Fix a problem causing the affinity of sub-select row-value elements to be ignored in some contextes.

FossilOrigin-Name: 7d9bd22c0715ede2592ee1fa7ebc215aded1ca1b
This commit is contained in:
dan
2016-09-03 19:52:12 +00:00
parent 8f9d1ad8d5
commit 80aa545337
5 changed files with 105 additions and 33 deletions

View File

@@ -61,6 +61,12 @@ char sqlite3ExprAffinity(Expr *pExpr){
if( op==TK_AGG_COLUMN || op==TK_COLUMN ){
return sqlite3TableColumnAffinity(pExpr->pTab, pExpr->iColumn);
}
if( op==TK_SELECT_COLUMN ){
assert( pExpr->pLeft->flags&EP_xIsSelect );
return sqlite3ExprAffinity(
pExpr->pLeft->x.pSelect->pEList->a[pExpr->iColumn].pExpr
);
}
return pExpr->affinity;
}