mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-12 23:22:53 +03:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user