mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Additional steps to make sure calls to sqlite3ExprToRegister() are sane.
FossilOrigin-Name: 1c42d7176b228791f99bc9971d92a9ab67b1e2956ca4f8d934bd1a3e596d6c80
This commit is contained in:
12
src/expr.c
12
src/expr.c
@@ -4270,10 +4270,14 @@ void sqlite3ExprCodeMove(Parse *pParse, int iFrom, int iTo, int nReg){
|
||||
void sqlite3ExprToRegister(Expr *pExpr, int iReg){
|
||||
Expr *p = sqlite3ExprSkipCollateAndLikely(pExpr);
|
||||
if( NEVER(p==0) ) return;
|
||||
p->op2 = p->op;
|
||||
p->op = TK_REGISTER;
|
||||
p->iTable = iReg;
|
||||
ExprClearProperty(p, EP_Skip);
|
||||
if( p->op==TK_REGISTER ){
|
||||
assert( p->iTable==iReg );
|
||||
}else{
|
||||
p->op2 = p->op;
|
||||
p->op = TK_REGISTER;
|
||||
p->iTable = iReg;
|
||||
ExprClearProperty(p, EP_Skip);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user