mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-11 12:22:51 +03:00
Change so that deleting an Expr structure requires only one frame per level in the expression tree, not two.
FossilOrigin-Name: a4380ab326e4b0de29271c824d041193e86b7139
This commit is contained in:
@@ -87,7 +87,13 @@ static void resolveAlias(
|
||||
pDup->pColl = pExpr->pColl;
|
||||
pDup->flags |= EP_ExpCollate;
|
||||
}
|
||||
sqlite3ExprClear(db, pExpr);
|
||||
|
||||
/* Before calling sqlite3ExprDelete(), set the EP_Static flag. This
|
||||
** prevents ExprDelete() from deleting the Expr structure itself,
|
||||
** allowing it to be repopulated by the memcpy() on the following line.
|
||||
*/
|
||||
ExprSetProperty(pExpr, EP_Static);
|
||||
sqlite3ExprDelete(db, pExpr);
|
||||
memcpy(pExpr, pDup, sizeof(*pExpr));
|
||||
sqlite3DbFree(db, pDup);
|
||||
}
|
||||
|
Reference in New Issue
Block a user