mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Make a hard copy of the results of a subquery lest the result of the
subquery be referenced after a change to the table that generated the subquery result. FossilOrigin-Name: 9c0d80907b4dee8ee8f205c2ebdb759f5ba1d771
This commit is contained in:
@@ -713,8 +713,13 @@ static void selectInnerLoop(
|
||||
/* If the destination is an EXISTS(...) expression, the actual
|
||||
** values returned by the SELECT are not required.
|
||||
*/
|
||||
sqlite3ExprCodeExprList(pParse, pEList, regResult,
|
||||
(eDest==SRT_Output||eDest==SRT_Coroutine)?SQLITE_ECEL_DUP:0);
|
||||
u8 ecelFlags;
|
||||
if( eDest==SRT_Mem || eDest==SRT_Output || eDest==SRT_Coroutine ){
|
||||
ecelFlags = SQLITE_ECEL_DUP;
|
||||
}else{
|
||||
ecelFlags = 0;
|
||||
}
|
||||
sqlite3ExprCodeExprList(pParse, pEList, regResult, ecelFlags);
|
||||
}
|
||||
|
||||
/* If the DISTINCT keyword was present on the SELECT statement
|
||||
|
||||
Reference in New Issue
Block a user