MySQL 9.1.0
Source Code Documentation
|
RelationalExpression objects in the same companion set are those that are inner-joined against each other; we use this to see in what parts of the graph we allow cycles. More...
#include <relational_expression.h>
Classes | |
struct | EqualTerm |
This represents equality between a set of fields, i.e. More... | |
Public Member Functions | |
CompanionSet ()=default | |
CompanionSet (THD *thd) | |
CompanionSet (const CompanionSet &)=delete | |
No copying. More... | |
CompanionSet & | operator= (const CompanionSet &)=delete |
void | AddEquijoinCondition (THD *thd, const Item_func_eq &eq) |
Add the set of equal fields specified by 'func_eq'. More... | |
table_map | GetEqualityMap (const Field &field) const |
If 'field' is part of an equijoin predicate in this CompanionSet, return a table_map of the tables involved in that predicate. More... | |
std::string | ToString () const |
For tracing and debugging. More... | |
Private Types | |
using | FieldArray = Mem_root_array< const Field * > |
Private Attributes | |
Mem_root_array< EqualTerm > | m_equal_terms |
The set of sets of fields in equijoin predicates in this companion set. More... | |
RelationalExpression objects in the same companion set are those that are inner-joined against each other; we use this to see in what parts of the graph we allow cycles.
(Within companion sets, we are also allowed to add Cartesian products if we deem that an advantage, but we don't do it currently.) Tables may be alone in their companion sets. Companion sets are also used when calculating selectivity for equijoin predicates using multi-field indexes,
|
private |
|
default |
|
inlineexplicit |
|
delete |
No copying.
void CompanionSet::AddEquijoinCondition | ( | THD * | thd, |
const Item_func_eq & | eq | ||
) |
Add the set of equal fields specified by 'func_eq'.
If 'field' is part of an equijoin predicate in this CompanionSet, return a table_map of the tables involved in that predicate.
Otherwise, return 0.
|
delete |
std::string CompanionSet::ToString | ( | ) | const |
For tracing and debugging.
|
private |
The set of sets of fields in equijoin predicates in this companion set.
(
SELECT ... FROM t1, t2, t3 WHERE t1.x=t2.x AND t2.x=t3.x AND t2.y=t3.y
m_equal_terms will contain:
{{t1.x, t2.x, t3.x}, {t2.y, t3.y}}