Commit 84e32eff authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-28437: Assertion `!eliminated' failed: Part #2

In SELECT_LEX::update_used_tables(),
do not run the loop setting tl->table->maybe_null
when tl is an eliminated table

(Rationale: First, with current table elimination, tl already
 has maybe_null=1. Second, one should not care what flags
 eliminated tables had)
parent 8dbfaa2a
......@@ -4219,16 +4219,20 @@ 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 && !is_eliminated_table(join->eliminated_tables, tl))
{
tl->on_expr->update_used_tables();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment