MySQL 9.1.0
Source Code Documentation
derived_keys.h File Reference

Go to the source code of this file.

Functions

bool MakeDerivedKeys (THD *thd, JOIN *join)
 Collect the set fields of derived tables that are present in predicates like "derived_tab.field=function(other_tab.field)". More...
 
void FinalizeDerivedKeys (THD *thd, const Query_block &query_block, AccessPath *root_path)
 Remove any unused keys on derived tables. More...
 

Function Documentation

◆ FinalizeDerivedKeys()

void FinalizeDerivedKeys ( THD thd,
const Query_block query_block,
AccessPath root_path 
)

Remove any unused keys on derived tables.

Update the key number in any AccessPath that uses a key that gets shifted to a lower number due to those removals.

Parameters
thdThe current thread.
query_blockThe current Query_block.
root_pathThe root path of 'query_block'.

◆ MakeDerivedKeys()

bool MakeDerivedKeys ( THD thd,
JOIN join 
)

Collect the set fields of derived tables that are present in predicates like "derived_tab.field=function(other_tab.field)".

Generate keys for every derived_tab+other_tab pair in that set.

Parameters
thdThe current thread.
joinThe current join.