mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Allow the RHS of a row-value IN operator to use a compound query with
an ORDER BY clause. FossilOrigin-Name: eaf15d9bae6773058341d6219241f44ce728ad1cb9cf649f2efd4dddd81ec461
This commit is contained in:
@@ -2967,11 +2967,14 @@ static int generateOutputSubroutine(
|
||||
|
||||
/* If this is a scalar select that is part of an expression, then
|
||||
** store the results in the appropriate memory cell and break out
|
||||
** of the scan loop.
|
||||
** of the scan loop. Note that the select might return multiple columns
|
||||
** if it is the RHS of a row-value IN operator.
|
||||
*/
|
||||
case SRT_Mem: {
|
||||
assert( pIn->nSdst==1 || pParse->nErr>0 ); testcase( pIn->nSdst!=1 );
|
||||
sqlite3ExprCodeMove(pParse, pIn->iSdst, pDest->iSDParm, 1);
|
||||
if( pParse->nErr==0 ){
|
||||
testcase( pIn->nSdst>1 );
|
||||
sqlite3ExprCodeMove(pParse, pIn->iSdst, pDest->iSDParm, pIn->nSdst);
|
||||
}
|
||||
/* The LIMIT clause will jump out of the loop for us */
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user