mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.7' into 10.8
This commit is contained in:
@@ -745,7 +745,6 @@ init_lex_with_single_table(THD *thd, TABLE *table, LEX *lex)
|
||||
return TRUE;
|
||||
context->resolve_in_table_list_only(table_list);
|
||||
lex->use_only_table_context= TRUE;
|
||||
lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_VCOL_EXPR;
|
||||
select_lex->cur_pos_in_select_list= UNDEF_POS;
|
||||
table->map= 1; //To ensure correct calculation of const item
|
||||
table_list->table= table;
|
||||
@@ -1238,6 +1237,7 @@ void LEX::start(THD *thd_arg)
|
||||
context_stack.empty();
|
||||
//empty select_stack
|
||||
select_stack_top= 0;
|
||||
select_stack_outer_barrier= 0;
|
||||
unit.init_query();
|
||||
current_select_number= 0;
|
||||
curr_with_clause= 0;
|
||||
@@ -5322,17 +5322,21 @@ void SELECT_LEX::update_used_tables()
|
||||
while ((tl= ti++))
|
||||
{
|
||||
TABLE_LIST *embedding= tl;
|
||||
do
|
||||
if (!is_eliminated_table(join->eliminated_tables, tl))
|
||||
{
|
||||
bool maybe_null;
|
||||
if ((maybe_null= MY_TEST(embedding->outer_join)))
|
||||
do
|
||||
{
|
||||
tl->table->maybe_null= maybe_null;
|
||||
break;
|
||||
bool maybe_null;
|
||||
if ((maybe_null= MY_TEST(embedding->outer_join)))
|
||||
{
|
||||
tl->table->maybe_null= maybe_null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
while ((embedding= embedding->embedding));
|
||||
}
|
||||
while ((embedding= embedding->embedding));
|
||||
if (tl->on_expr)
|
||||
|
||||
if (tl->on_expr && !is_eliminated_table(join->eliminated_tables, tl))
|
||||
{
|
||||
tl->on_expr->update_used_tables();
|
||||
tl->on_expr->walk(&Item::eval_not_null_tables, 0, NULL);
|
||||
@@ -5359,8 +5363,11 @@ void SELECT_LEX::update_used_tables()
|
||||
if (embedding->on_expr &&
|
||||
embedding->nested_join->join_list.head() == tl)
|
||||
{
|
||||
embedding->on_expr->update_used_tables();
|
||||
embedding->on_expr->walk(&Item::eval_not_null_tables, 0, NULL);
|
||||
if (!is_eliminated_table(join->eliminated_tables, embedding))
|
||||
{
|
||||
embedding->on_expr->update_used_tables();
|
||||
embedding->on_expr->walk(&Item::eval_not_null_tables, 0, NULL);
|
||||
}
|
||||
}
|
||||
tl= embedding;
|
||||
embedding= tl->embedding;
|
||||
|
Reference in New Issue
Block a user