mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Do not convert an expression node that is already TK_REGISTER into a
new TK_REGISTER. This is a follow-up to [663f5dd32d9db832] that fixes a bug discovered by dbsqlfuzz. FossilOrigin-Name: fcb669cfaa8a59ca710504d5aaa1936f65a6da8ff13473ad84458f97a6fd1f49
This commit is contained in:
@ -8336,7 +8336,10 @@ int sqlite3Select(
|
||||
if( iOrderByCol ){
|
||||
Expr *pX = p->pEList->a[iOrderByCol-1].pExpr;
|
||||
Expr *pBase = sqlite3ExprSkipCollateAndLikely(pX);
|
||||
if( ALWAYS(pBase!=0) && pBase->op!=TK_AGG_COLUMN ){
|
||||
if( ALWAYS(pBase!=0)
|
||||
&& pBase->op!=TK_AGG_COLUMN
|
||||
&& pBase->op!=TK_REGISTER
|
||||
){
|
||||
sqlite3ExprToRegister(pX, iAMem+j);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user