1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Convert an ALWAYS() into an assert() with an extra error term.

Dbsqlfuzz find, with test case in TH3.

FossilOrigin-Name: b473ad35c5ce355853e1805a5c0658bda1500775f22f59c6b6759ae990e65aca
This commit is contained in:
drh
2019-12-24 13:41:33 +00:00
parent 22c04f8199
commit 34da2a4806
3 changed files with 9 additions and 8 deletions

View File

@@ -801,7 +801,8 @@ static void constructAutomaticIndex(
idxCols |= cMask;
pIdx->aiColumn[n] = pTerm->u.leftColumn;
pColl = sqlite3ExprCompareCollSeq(pParse, pX);
pIdx->azColl[n] = ALWAYS(pColl) ? pColl->zName : sqlite3StrBINARY;
assert( pColl!=0 || pParse->nErr>0 ); /* TH3 collate01.800 */
pIdx->azColl[n] = pColl ? pColl->zName : sqlite3StrBINARY;
n++;
}
}