1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Fix a problem with renaming a table when a view or trigger within the schema uses a FILTER with an aggregate function that is not currently registered with the database.

FossilOrigin-Name: 2ac0e42f8ab7a9184c2a2efd13bd50ab51bc01f9f34e9e63591fd18db02dff54
This commit is contained in:
dan
2019-08-05 13:19:25 +00:00
parent 3cbbd195ca
commit 72d1eac673
4 changed files with 30 additions and 11 deletions

View File

@@ -934,8 +934,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
pExpr->op2++;
pNC2 = pNC2->pNext;
}
assert( pDef!=0 );
if( pNC2 ){
assert( pDef!=0 || IN_RENAME_OBJECT );
if( pNC2 && pDef ){
assert( SQLITE_FUNC_MINMAX==NC_MinMaxAgg );
testcase( (pDef->funcFlags & SQLITE_FUNC_MINMAX)!=0 );
pNC2->ncFlags |= NC_HasAgg | (pDef->funcFlags & SQLITE_FUNC_MINMAX);