diff options
author | drh <> | 2021-07-16 01:19:19 +0000 |
---|---|---|
committer | drh <> | 2021-07-16 01:19:19 +0000 |
commit | 0fb78f0cca4eedc1f2e68fc7fa3395ab6d46576a (patch) | |
tree | ac60df55a740dad98a806b97836f970719705c38 /src/update.c | |
parent | bb301231788a7ca2292005ecf8d924dbf122f2d2 (diff) | |
download | sqlite-0fb78f0cca4eedc1f2e68fc7fa3395ab6d46576a.tar.gz sqlite-0fb78f0cca4eedc1f2e68fc7fa3395ab6d46576a.zip |
Get the "omit ORDER BY in FROM-clause subqueries" optimization working for the
core test cases.
FossilOrigin-Name: e31c5888659ffd4c6d8b68627123df3bbb84bb010b7766b0a74877bf3ba1e52b
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/update.c b/src/update.c index 45f332bf3..c5a01f896 100644 --- a/src/update.c +++ b/src/update.c @@ -261,6 +261,7 @@ static void updateFromSelect( pSelect = sqlite3SelectNew(pParse, pList, pSrc, pWhere2, pGrp, 0, pOrderBy2, SF_UFSrcCheck|SF_IncludeHidden, pLimit2 ); + if( pSelect ) pSelect->selFlags |= SF_OrderByReqd; sqlite3SelectDestInit(&dest, eDest, iEph); dest.iSDParm2 = (pPk ? pPk->nKeyCol : -1); sqlite3Select(pParse, pSelect, &dest); |