diff options
author | drh <drh@noemail.net> | 2015-04-15 05:20:44 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-04-15 05:20:44 +0000 |
commit | 1978d171cb1f64765b18c81ad3d8bde62c2d434c (patch) | |
tree | 98a11c7ff69e45875466c11eb3a55466ced07026 /src/expr.c | |
parent | 0ec68f845c1ab87995f8956c2617c7017809a963 (diff) | |
download | sqlite-1978d171cb1f64765b18c81ad3d8bde62c2d434c.tar.gz sqlite-1978d171cb1f64765b18c81ad3d8bde62c2d434c.zip |
When adding the implied "LIMIT 1" to the end of a scalar subquery, make sure
that subquery is not a VALUES-only query as such queries cannot deal with
LIMIT clauses.
FossilOrigin-Name: 7c27310bdf6b4af44a0811a2787ed64966d720d2
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c index 6a30755aa..77eb35aa7 100644 --- a/src/expr.c +++ b/src/expr.c @@ -2016,6 +2016,7 @@ int sqlite3CodeSubselect( pSel->pLimit = sqlite3PExpr(pParse, TK_INTEGER, 0, 0, &sqlite3IntTokens[1]); pSel->iLimit = 0; + pSel->selFlags &= ~SF_AllValues; if( sqlite3Select(pParse, pSel, &dest) ){ return 0; } |