mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Enable bloom filters for the right table of a LEFT JOIN. Fix unreachable
branches. FossilOrigin-Name: d342ab722de1fc3f34219c9755253db9d88eb50a6fa5cc257207008b00e7fc03
This commit is contained in:
@@ -5000,15 +5000,15 @@ static SQLITE_NOINLINE void whereCheckIfBloomFilterIsUseful(
|
||||
WhereLoop *pLoop = pWInfo->a[i].pWLoop;
|
||||
const int reqFlags = (WHERE_SELFCULL|WHERE_COLUMN_EQ);
|
||||
if( (pLoop->wsFlags & reqFlags)==reqFlags
|
||||
&& (pLoop->wsFlags & (WHERE_IPK|WHERE_INDEXED))!=0
|
||||
&& ALWAYS((pLoop->wsFlags & (WHERE_IPK|WHERE_INDEXED))!=0)
|
||||
){
|
||||
SrcItem *pItem = &pWInfo->pTabList->a[pLoop->iTab];
|
||||
Table *pTab = pItem->pTab;
|
||||
pTab->tabFlags |= TF_StatsUsed;
|
||||
if( nSearch > pTab->nRowLogEst
|
||||
&& (pItem->fg.jointype & JT_LEFT)==0
|
||||
&& (pTab->tabFlags & TF_HasStat1)!=0
|
||||
){
|
||||
testcase( pItem->fg.jointype & JT_LEFT );
|
||||
pLoop->wsFlags |= WHERE_BLOOMFILTER;
|
||||
pLoop->wsFlags &= ~WHERE_IDX_ONLY;
|
||||
WHERETRACE(0xffff, (
|
||||
|
||||
Reference in New Issue
Block a user