diff options
author | drh <> | 2023-10-19 19:19:59 +0000 |
---|---|---|
committer | drh <> | 2023-10-19 19:19:59 +0000 |
commit | 5080397e67e16a5b72f0139274661ddd8f661bb4 (patch) | |
tree | a91947ca917bbefda9f935d98c87ed3a8378f169 /src/expr.c | |
parent | d8b840a4f4bdcadfe755c966f1ee583f506cad0f (diff) | |
download | sqlite-5080397e67e16a5b72f0139274661ddd8f661bb4.tar.gz sqlite-5080397e67e16a5b72f0139274661ddd8f661bb4.zip |
Fix an adverse interaction between the new aggregate ORDER BY logic and the
expression compressor.
FossilOrigin-Name: f371e4c0f8ea73aee9ea0645f396e3da20f1eb97be34c83de9d94c9cbb959934
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/expr.c b/src/expr.c index cc0b0dacc..2dcba6e52 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1572,7 +1572,7 @@ static Expr *exprDup(sqlite3 *db, const Expr *p, int dupFlags, u8 **pzBuffer){ staticFlag = EP_Static; assert( zAlloc!=0 ); }else{ - zAlloc = sqlite3DbMallocRawNN(db, dupedExprSize(p, dupFlags)); + zAlloc = sqlite3DbMallocRawNN(db, dupedExprSize(p, dupFlags)*5); staticFlag = 0; } pNew = (Expr *)zAlloc; @@ -1622,7 +1622,8 @@ static Expr *exprDup(sqlite3 *db, const Expr *p, int dupFlags, u8 **pzBuffer){ if( ExprUseXSelect(p) ){ pNew->x.pSelect = sqlite3SelectDup(db, p->x.pSelect, dupFlags); }else{ - pNew->x.pList = sqlite3ExprListDup(db, p->x.pList, dupFlags); + pNew->x.pList = sqlite3ExprListDup(db, p->x.pList, + p->op!=TK_ORDER ? dupFlags : 0); } } |