mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Use OP_Copy instead of OP_SCopy to move the results of a scalar subquery.
FossilOrigin-Name: 435c272dcf6ed5f3acb564b8f959557145f117b869547b670258cf5a1908ab6b
This commit is contained in:
@@ -4492,7 +4492,13 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr, int target){
|
||||
inReg = sqlite3ExprCodeTarget(pParse, pExpr, target);
|
||||
assert( pParse->pVdbe!=0 || pParse->db->mallocFailed );
|
||||
if( inReg!=target && pParse->pVdbe ){
|
||||
sqlite3VdbeAddOp2(pParse->pVdbe, OP_SCopy, inReg, target);
|
||||
u8 op;
|
||||
if( ExprHasProperty(pExpr,EP_Subquery) ){
|
||||
op = OP_Copy;
|
||||
}else{
|
||||
op = OP_SCopy;
|
||||
}
|
||||
sqlite3VdbeAddOp2(pParse->pVdbe, op, inReg, target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user