Ignore COLLATE operators when determining whether the result of a subexpression
should be shallow-copied or deep-copied. FossilOrigin-Name: 34ae36a45e814bed7c8340412c7ef3fc849b82357656d0eb5f0f805e59d846d0
This commit is contained in:
+4
-2
@@ -5326,8 +5326,10 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr, int target){
|
||||
inReg = sqlite3ExprCodeTarget(pParse, pExpr, target);
|
||||
if( inReg!=target ){
|
||||
u8 op;
|
||||
if( ALWAYS(pExpr)
|
||||
&& (ExprHasProperty(pExpr,EP_Subquery) || pExpr->op==TK_REGISTER)
|
||||
Expr *pX = sqlite3ExprSkipCollateAndLikely(pExpr);
|
||||
testcase( pX!=pExpr );
|
||||
if( ALWAYS(pX)
|
||||
&& (ExprHasProperty(pX,EP_Subquery) || pX->op==TK_REGISTER)
|
||||
){
|
||||
op = OP_Copy;
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user