diff options
author | drh <> | 2025-02-21 17:03:22 +0000 |
---|---|---|
committer | drh <> | 2025-02-21 17:03:22 +0000 |
commit | ce25007db8df01e3271486574d520d4dea4cf97a (patch) | |
tree | ba6a3d33af56c5a0d13d80ab8eb7447e69319ce6 /src/select.c | |
parent | 220260b8965eb264cab8cb5ee42baacb08ef1eb4 (diff) | |
download | sqlite-ce25007db8df01e3271486574d520d4dea4cf97a.tar.gz sqlite-ce25007db8df01e3271486574d520d4dea4cf97a.zip |
Detect when a UNIQUE or PRIMARY KEY on a WITHOUT ROWID table would need
to use more than SQLITE_LIMIT_COLUMN columns and raise an error.
Also include some unrelated compiler warning fixes.
FossilOrigin-Name: d7729dbbf231d57cbcaaa5004d0a9c4957f112dd6520052995b232aa521c0ca3
Diffstat (limited to 'src/select.c')
-rw-r--r-- | src/select.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/select.c b/src/select.c index e47a9b6be..e7db19533 100644 --- a/src/select.c +++ b/src/select.c @@ -5646,7 +5646,7 @@ static int convertCompoundSelectToSubquery(Walker *pWalker, Select *p){ #ifndef SQLITE_OMIT_WINDOWFUNC p->pWinDefn = 0; #endif - p->selFlags &= ~SF_Compound; + p->selFlags &= ~(u32)SF_Compound; assert( (p->selFlags & SF_Converted)==0 ); p->selFlags |= SF_Converted; assert( pNew->pPrior!=0 ); @@ -7252,7 +7252,7 @@ static int countOfViewOptimization(Parse *pParse, Select *p){ pSub->pPrior = 0; pSub->pNext = 0; pSub->selFlags |= SF_Aggregate; - pSub->selFlags &= ~SF_Compound; + pSub->selFlags &= ~(u32)SF_Compound; pSub->nSelectRow = 0; sqlite3ParserAddCleanup(pParse, sqlite3ExprListDeleteGeneric, pSub->pEList); pTerm = pPrior ? sqlite3ExprDup(db, pCount, 0) : pCount; @@ -7267,7 +7267,7 @@ static int countOfViewOptimization(Parse *pParse, Select *p){ pSub = pPrior; } p->pEList->a[0].pExpr = pExpr; - p->selFlags &= ~SF_Aggregate; + p->selFlags &= ~(u32)SF_Aggregate; #if TREETRACE_ENABLED if( sqlite3TreeTrace & 0x200 ){ @@ -7474,7 +7474,7 @@ int sqlite3Select( testcase( pParse->earlyCleanup ); p->pOrderBy = 0; } - p->selFlags &= ~SF_Distinct; + p->selFlags &= ~(u32)SF_Distinct; p->selFlags |= SF_NoopOrderBy; } sqlite3SelectPrep(pParse, p, 0); @@ -7513,7 +7513,7 @@ int sqlite3Select( ** and leaving this flag set can cause errors if a compound sub-query ** in p->pSrc is flattened into this query and this function called ** again as part of compound SELECT processing. */ - p->selFlags &= ~SF_UFSrcCheck; + p->selFlags &= ~(u32)SF_UFSrcCheck; } if( pDest->eDest==SRT_Output ){ @@ -8002,7 +8002,7 @@ int sqlite3Select( && p->pWin==0 #endif ){ - p->selFlags &= ~SF_Distinct; + p->selFlags &= ~(u32)SF_Distinct; pGroupBy = p->pGroupBy = sqlite3ExprListDup(db, pEList, 0); if( pGroupBy ){ for(i=0; i<pGroupBy->nExpr; i++){ |