Include hidden columns of table valued functions that are constrained

by the function arguments in the colUsed bitmask.

FossilOrigin-Name: 8f8cab0d0e219f0c4bc2b8061c0013d90a2a5e598dd6cf420d302dfd1b7cbe11
This commit is contained in:
drh
2022-01-28 19:53:37 +00:00
parent d0c7baf505
commit cee5cb484d
3 changed files with 8 additions and 7 deletions
+1
View File
@@ -1824,6 +1824,7 @@ void sqlite3WhereTabFuncArgs(
pColRef->iColumn = k++;
assert( ExprUseYTab(pColRef) );
pColRef->y.pTab = pTab;
pItem->colUsed |= sqlite3ExprColUsed(pColRef);
pRhs = sqlite3PExpr(pParse, TK_UPLUS,
sqlite3ExprDup(pParse->db, pArgs->a[j].pExpr, 0), 0);
pTerm = sqlite3PExpr(pParse, TK_EQ, pColRef, pRhs);