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

Fix the subquery result column NULL-ifier so that it correctly handles

subquery columns past the 63rd column.

FossilOrigin-Name: 77b220a7240425fa83e142ceef78505208e6e38d797070e146b9f7d255f753c7
This commit is contained in:
drh
2023-02-15 19:53:08 +00:00
parent e3ec00ccb8
commit 6945ba787f
3 changed files with 9 additions and 12 deletions

View File

@@ -5272,8 +5272,8 @@ static int disableUnusedSubqueryResultColumns(SrcItem *pItem){
nCol = pTab->nCol;
for(j=0; j<nCol; j++){
Select *pX;
if( (MASKBIT(j) & pItem->colUsed)!=0 ) continue;
if( MASKBIT(j)==0 ) break;
Bitmask m = j<BMS-1 ? MASKBIT(j) : TOPBIT;
if( (m & pItem->colUsed)!=0 ) continue;
for(pX=pSub; pX; pX=pX->pPrior) {
Expr *pY = pX->pEList->a[j].pExpr;
if( pY->op==TK_NULL ) continue;