1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge branch '10.6' into 10.8

This commit is contained in:
Oleksandr Byelkin
2023-05-04 19:13:56 +02:00
7 changed files with 118 additions and 4 deletions

View File

@@ -9515,8 +9515,13 @@ void TABLE_LIST::wrap_into_nested_join(List<TABLE_LIST> &join_list)
static inline bool derived_table_optimization_done(TABLE_LIST *table)
{
return table->derived &&
(table->derived->is_excluded() ||
SELECT_LEX_UNIT *derived= (table->derived ?
table->derived :
(table->view ?
&table->view->unit:
NULL));
return derived &&
(derived->is_excluded() ||
table->is_materialized_derived());
}
@@ -9578,8 +9583,7 @@ bool TABLE_LIST::init_derived(THD *thd, bool init_view)
set_derived();
}
if (is_view() ||
!derived_table_optimization_done(this))
if (!derived_table_optimization_done(this))
{
/* A subquery might be forced to be materialized due to a side-effect. */
if (!is_materialized_derived() && unit->can_be_merged() &&