mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Enable the index-on-expression optimization even when the expression is
used as an argument to an aggregate function. FossilOrigin-Name: 462b3c7f39724dc814f55e7a225e7d0c48f81c524cdda797a66e9e198c35ce58
This commit is contained in:
@@ -5618,7 +5618,13 @@ int sqlite3ExprCompare(
|
||||
if( pB->op==TK_COLLATE && sqlite3ExprCompare(pParse, pA,pB->pLeft,iTab)<2 ){
|
||||
return 1;
|
||||
}
|
||||
return 2;
|
||||
if( pA->op==TK_AGG_COLUMN && pB->op==TK_COLUMN
|
||||
&& pB->iTable<0 && pA->iTable==iTab
|
||||
){
|
||||
/* fall through */
|
||||
}else{
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
assert( !ExprHasProperty(pA, EP_IntValue) );
|
||||
assert( !ExprHasProperty(pB, EP_IntValue) );
|
||||
|
Reference in New Issue
Block a user