diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-11-14 19:10:21 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-11-14 19:10:21 +0100 |
commit | 2437674291f31c91869a74eb6ebd9f03dc52bd43 (patch) | |
tree | d0439dbe936ca5c5757010769ec45f07f4aa6bde /sql/sql_lex.cc | |
parent | d186cb180e424fb4e166959145b3bccb5e7f5164 (diff) | |
parent | 695f20f1b55949ae5e4870805cf0b056457ec932 (diff) | |
download | mariadb-git-2437674291f31c91869a74eb6ebd9f03dc52bd43.tar.gz |
Merge branch '10.10' into 10.11mariadb-10.11.1
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index ea4e68634a0..99ba600dfe8 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -11921,9 +11921,18 @@ bool SELECT_LEX_UNIT::explainable() const false; } +/* + Determines whether the derived table was eliminated during + the call of eliminate_tables(JOIN *) made at the optimization stage + or completely optimized out (for such degenerate statements like + "SELECT 1", for example) +*/ + bool SELECT_LEX_UNIT::is_derived_eliminated() const { if (!derived) return false; + if (!derived->table) + return true; return derived->table->map & outer_select()->join->eliminated_tables; } |