diff options
author | Oleg Smirnov <olernov@gmail.com> | 2022-06-27 12:37:59 +0700 |
---|---|---|
committer | Oleg Smirnov <olernov@gmail.com> | 2022-07-04 21:19:35 +0700 |
commit | 3485ad9fd5436c7d5aa0947a141550414b3a312d (patch) | |
tree | 5c422e2fefab87ef3ea8ba223563591fae200fa8 /sql/sql_lex.cc | |
parent | f332260c9872a428f68e0461329bb5fa29461592 (diff) | |
download | mariadb-git-bb-10.10-MDEV-28869.tar.gz |
MDEV-28869 Eliminated tables are not shown in EXPLAINbb-10.10-MDEV-28869
Show tables that have been eliminated during optimization stage
in the output of EXPLAIN/ANALYZE [FORMAT=JSON] commands. Show both
regular and derived tables.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 3db784ce61d..4590804437d 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -11917,7 +11917,7 @@ bool SELECT_LEX_UNIT::explainable() const EXPLAIN/ANALYZE unit, when: (1) if it's a subquery - it's not part of eliminated WHERE/ON clause. (2) if it's a CTE - it's not hanging (needed for execution) - (3) if it's a derived - it's not merged or eliminated + (3) if it's a derived - it's not merged if it's not 1/2/3 - it's some weird internal thing, ignore it */ @@ -11927,12 +11927,12 @@ bool SELECT_LEX_UNIT::explainable() const derived && derived->derived_result && !with_element->is_hanging_recursive(): // (2) derived ? - derived->is_materialized_derived() && // (3) - !is_derived_eliminated() : + derived->is_materialized_derived() : // (3) false; } -bool SELECT_LEX_UNIT::is_derived_eliminated() const + +bool SELECT_LEX_UNIT::is_eliminated() const { if (!derived) return false; |