mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Use sqlite3ParserAddCleanup() rather than pParse->pConstExpr to implement
sqlite3ExprDeferredDelete(). This is a better solution than check-in [c538d07535092722]. FossilOrigin-Name: 2a6f6971fa010219323b976ff53b2606e39fb43fd36c394837c3a8528bf3c425
This commit is contained in:
@@ -1270,8 +1270,9 @@ void sqlite3ClearOnOrUsing(sqlite3 *db, OnOrUsing *p){
|
||||
** pExpr to the pParse->pConstExpr list with a register number of 0.
|
||||
*/
|
||||
void sqlite3ExprDeferredDelete(Parse *pParse, Expr *pExpr){
|
||||
pParse->pConstExpr =
|
||||
sqlite3ExprListAppend(pParse, pParse->pConstExpr, pExpr);
|
||||
sqlite3ParserAddCleanup(pParse,
|
||||
(void(*)(sqlite3*,void*))sqlite3ExprDelete,
|
||||
pExpr);
|
||||
}
|
||||
|
||||
/* Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the
|
||||
@@ -4207,7 +4208,6 @@ expr_code_doover:
|
||||
int n;
|
||||
const char *z;
|
||||
char *zBlob;
|
||||
if( pParse->nErr ) return target;
|
||||
assert( !ExprHasProperty(pExpr, EP_IntValue) );
|
||||
assert( pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X' );
|
||||
assert( pExpr->u.zToken[1]=='\'' );
|
||||
|
Reference in New Issue
Block a user