diff options
author | drh <> | 2023-04-05 02:21:57 +0000 |
---|---|---|
committer | drh <> | 2023-04-05 02:21:57 +0000 |
commit | 8907cb2f88be0528092661a9d40fc57911027e9b (patch) | |
tree | 70197bd73017d125d3b6e389288cccccd732c797 /src/expr.c | |
parent | c6c4bae80aa5caa68225048646cb6d5eaf561f70 (diff) | |
download | sqlite-8907cb2f88be0528092661a9d40fc57911027e9b.tar.gz sqlite-8907cb2f88be0528092661a9d40fc57911027e9b.zip |
Fix the function that determines the collating function for an expression
tree to handle new cases that arise as a result of the recently added
ability to use indexed expressions in aggregate queries.
[forum/forumpost/0713a16a44|Forum post 0713a16a44].
FossilOrigin-Name: cc5041f3f067cf610adffb868b4e2d1b5d248dc5a0ecc551339b670800ecb0ff
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/expr.c b/src/expr.c index 47cfba223..f1ce6ba4a 100644 --- a/src/expr.c +++ b/src/expr.c @@ -278,9 +278,8 @@ CollSeq *sqlite3ExprCollSeq(Parse *pParse, const Expr *pExpr){ }else{ Expr *pNext = p->pRight; /* The Expr.x union is never used at the same time as Expr.pRight */ - assert( ExprUseXList(p) ); - assert( p->x.pList==0 || p->pRight==0 ); - if( p->x.pList!=0 && !db->mallocFailed ){ + assert( !ExprUseXList(p) || p->x.pList==0 || p->pRight==0 ); + if( ExprUseXList(p) && p->x.pList!=0 && !db->mallocFailed ){ int i; for(i=0; ALWAYS(i<p->x.pList->nExpr); i++){ if( ExprHasProperty(p->x.pList->a[i].pExpr, EP_Collate) ){ |