MCPcopy Create free account
hub / github.com/MariaDB/server / ApplyFilter

Function ApplyFilter

storage/connect/filter.cpp:1735–1754  ·  view source on GitHub ↗

/ ApplyFilter: Apply filtering for a table (where or having clause). */ New algorithm: evaluate from the root a de-linearized filter so */ AND/OR clauses can be optimized throughout the whole tree. */ /

Source from the content-addressed store, hash-verified

1733/* AND/OR clauses can be optimized throughout the whole tree. */
1734/***********************************************************************/
1735DllExport bool ApplyFilter(PGLOBAL g, PFIL filp)
1736 {
1737 if (!filp)
1738 return TRUE;
1739
1740 // Must be done for null tables
1741 filp->Reset();
1742
1743//if (tdbp && tdbp->IsNull())
1744// return TRUE;
1745
1746 if (filp->Eval(g))
1747 throw (int)TYPE_FILTER;
1748
1749 if (trace(2))
1750 htrc("PlugFilter filp=%p result=%d\n",
1751 filp, filp->GetResult());
1752
1753 return filp->GetResult();
1754 } // end of ApplyFilter

Callers 2

CntReadNextFunction · 0.85
MakeMethod · 0.85

Calls 4

htrcFunction · 0.70
ResetMethod · 0.45
EvalMethod · 0.45
GetResultMethod · 0.45

Tested by

no test coverage detected