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

Fix a segfault that can occur when the LHS of a LIKE operator has an

undefined collating sequence.  Ticket [1258875e07553].

FossilOrigin-Name: a82e6b4585b9ddba581204976cd5ea8704339185
This commit is contained in:
drh
2010-01-21 23:11:24 +00:00
parent 4b5db5ac9c
commit 5cb7434c72
3 changed files with 11 additions and 11 deletions

View File

@@ -653,7 +653,7 @@ static int isLikeOrGlob(
}
assert( pLeft->iColumn!=(-1) ); /* Because IPK never has AFF_TEXT */
pColl = sqlite3ExprCollSeq(pParse, pLeft);
assert( pColl!=0 ); /* Every non-IPK column has a collating sequence */
if( pColl==0 ) return 0; /* Happens when LHS has an undefined collation */
if( (pColl->type!=SQLITE_COLL_BINARY || *pnoCase) &&
(pColl->type!=SQLITE_COLL_NOCASE || !*pnoCase) ){
/* IMP: R-09003-32046 For the GLOB operator, the column must use the