1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge branch '10.2' into 10.3

This commit is contained in:
Sergei Golubchik
2022-05-07 11:48:15 +02:00
31 changed files with 649 additions and 113 deletions

View File

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2019, Oracle and/or its affiliates.
Copyright (c) 2009, 2021, MariaDB Corporation.
Copyright (c) 2009, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -4492,17 +4492,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);
@ -4526,8 +4530,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;