1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Fix a faulty assert() inside sqlite3ExprDup().

FossilOrigin-Name: 59812e7ef705226c801f95ec7f78cc931f9957ffb66715607d63874813b280cb
This commit is contained in:
drh
2021-04-12 23:18:18 +00:00
parent 4aab6fae57
commit 5cc9daf8a2
3 changed files with 9 additions and 8 deletions

View File

@@ -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);
}