1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Get the "omit ORDER BY in FROM-clause subqueries" optimization working for the

core test cases.

FossilOrigin-Name: e31c5888659ffd4c6d8b68627123df3bbb84bb010b7766b0a74877bf3ba1e52b
This commit is contained in:
drh
2021-07-16 01:19:19 +00:00
parent bb30123178
commit 0fb78f0cca
4 changed files with 20 additions and 14 deletions

View File

@@ -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);