aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <>2021-04-12 23:18:18 +0000
committerdrh <>2021-04-12 23:18:18 +0000
commit5cc9daf8a27bbe6655695b443b19fc585c8c5721 (patch)
tree1ee2b19909b071d2a71e01a3441bf450cc97c2d4 /src/expr.c
parent4aab6fae5715b247638e27691a978c869582437a (diff)
downloadsqlite-5cc9daf8a27bbe6655695b443b19fc585c8c5721.tar.gz
sqlite-5cc9daf8a27bbe6655695b443b19fc585c8c5721.zip
Fix a faulty assert() inside sqlite3ExprDup().
FossilOrigin-Name: 59812e7ef705226c801f95ec7f78cc931f9957ffb66715607d63874813b280cb
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c
index 4d7258959..acc144bea 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1402,7 +1402,8 @@ static Expr *exprDup(sqlite3 *db, Expr *p, int dupFlags, u8 **pzBuffer){
if( pNew->op==TK_SELECT_COLUMN ){
pNew->pLeft = p->pLeft;
assert( p->iColumn==0 || p->pRight==0 );
- assert( p->pRight==0 || p->pRight==p->pLeft );
+ assert( p->pRight==0 || p->pRight==p->pLeft
+ || ExprHasProperty(p->pLeft, EP_Subquery) );
}else{
pNew->pLeft = sqlite3ExprDup(db, p->pLeft, 0);
}