From c9992b3cbfa15a73a61e32005cd45b6f88f89904 Mon Sep 17 00:00:00 2001 From: "D. Richard Hipp" Date: Thu, 28 Sep 2017 17:29:24 +0000 Subject: [PATCH] Remove the (undocumented) query-planner control that prevents a "SELECT ALL" subquery in FROM clause from being implemented as a co-routine. This control was added by [a29e117d7ec], where it was called a "stop-gap". --- src/select.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/select.c b/src/select.c index 2c670ab6e3..a5f04767bf 100644 --- a/src/select.c +++ b/src/select.c @@ -5317,9 +5317,7 @@ int sqlite3Select( ** The subquery is implemented as a co-routine if all of these are true: ** (1) The subquery is guaranteed to be the outer loop (so that it ** does not need to be computed more than once) - ** (2) The ALL keyword after SELECT is omitted. (Applications are - ** allowed to say "SELECT ALL" instead of just "SELECT" to disable - ** the use of co-routines.) + ** (2) REMOVED (2017-09-28): The ALL keyword after SELECT is omitted. ** (3) Co-routines are not disabled using sqlite3_test_control() ** with SQLITE_TESTCTRL_OPTIMIZATIONS. ** @@ -5329,7 +5327,7 @@ int sqlite3Select( if( i==0 && (pTabList->nSrc==1 || (pTabList->a[1].fg.jointype&(JT_LEFT|JT_CROSS))!=0) /* (1) */ - && (p->selFlags & SF_All)==0 /* (2) */ + /*** constraint removed: && (p->selFlags & SF_All)==0 (2) */ && OptimizationEnabled(db, SQLITE_SubqCoroutine) /* (3) */ ){ /* Implement a co-routine that will return a single row of the result -- 2.11.4.GIT