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

Method explainable

sql/sql_lex.cc:13851–13870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13849
13850
13851bool SELECT_LEX_UNIT::explainable() const
13852{
13853 /*
13854 EXPLAIN/ANALYZE unit, when:
13855 (1) if it's a subquery - it's not part of eliminated WHERE/ON clause.
13856 (2) if it's a CTE - it's not hanging (needed for execution)
13857 (3) if it's a derived - it's not merged or eliminated
13858 if it's not 1/2/3 - it's some weird internal thing, ignore it
13859 */
13860
13861 return item ?
13862 !item->eliminated : // (1)
13863 with_element ?
13864 derived && derived->derived_result &&
13865 !with_element->is_hanging_recursive(): // (2)
13866 derived ?
13867 derived->is_materialized_derived() && // (3)
13868 !is_derived_eliminated() :
13869 false;
13870}
13871
13872/**
13873 Find the real table in prepared SELECT tree

Callers 5

save_insert_query_planFunction · 0.80
select_describeFunction · 0.80

Calls 2

is_hanging_recursiveMethod · 0.80

Tested by

no test coverage detected