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

Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä
2024-03-12 09:19:57 +02:00
80 changed files with 2667 additions and 617 deletions

View File

@@ -1217,8 +1217,12 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
(derived->alias.str ? derived->alias.str : "<NULL>"),
derived->get_unit()));
if (unit->executed && !unit->uncacheable && !unit->describe &&
!derived_is_recursive)
/*
Only fill derived tables once, unless the derived table is dependent in
which case we will delete all of its rows and refill it below.
*/
if (unit->executed && !(unit->uncacheable & UNCACHEABLE_DEPENDENT) &&
!unit->describe && !derived_is_recursive)
DBUG_RETURN(FALSE);
/*check that table creation passed without problems. */
DBUG_ASSERT(derived->table && derived->table->is_created());
@@ -1277,6 +1281,7 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
}
else
{
DBUG_ASSERT(!unit->executed || (unit->uncacheable & UNCACHEABLE_DEPENDENT));
SELECT_LEX *first_select= unit->first_select();
unit->set_limit(unit->global_parameters());
if (unit->lim.is_unlimited())