| 13849 | |
| 13850 | |
| 13851 | bool 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 |
no test coverage detected