1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.4 into 10.5

This commit is contained in:
Marko Mäkelä
2019-12-16 07:47:17 +02:00
376 changed files with 6928 additions and 5364 deletions

View File

@ -1986,7 +1986,20 @@ JOIN::optimize_inner()
}
}
conds= optimize_cond(this, conds, join_list, FALSE,
bool ignore_on_expr= false;
/*
PS/SP note: on_expr of versioned table can not be reallocated
(see build_equal_items() below) because it can be not rebuilt
at second invocation.
*/
if (!thd->stmt_arena->is_conventional() && thd->mem_root != thd->stmt_arena->mem_root)
for (TABLE_LIST *tbl= tables_list; tbl; tbl= tbl->next_local)
if (tbl->table && tbl->on_expr && tbl->table->versioned())
{
ignore_on_expr= true;
break;
}
conds= optimize_cond(this, conds, join_list, ignore_on_expr,
&cond_value, &cond_equal, OPT_LINK_EQUAL_FIELDS);
if (thd->is_error())
@ -18520,7 +18533,7 @@ bool Create_tmp_table::finalize(THD *thd,
/*
Test if there is a default field value. The test for ->ptr is to skip
'offset' fields generated by initalize_tables
'offset' fields generated by initialize_tables
*/
if (m_default_field[i] && m_default_field[i]->ptr)
{
@ -21373,7 +21386,7 @@ join_read_last(JOIN_TAB *tab)
{
TABLE *table=tab->table;
int error= 0;
DBUG_ENTER("join_read_first");
DBUG_ENTER("join_read_last");
DBUG_ASSERT(table->no_keyread ||
!table->covering_keys.is_set(tab->index) ||