Skip to content

Commit 84e32ef

Browse files
committed
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)
1 parent 8dbfaa2 commit 84e32ef

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

sql/sql_lex.cc

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4219,16 +4219,20 @@ void SELECT_LEX::update_used_tables()
42194219
while ((tl= ti++))
42204220
{
42214221
TABLE_LIST *embedding= tl;
4222-
do
4222+
if (!is_eliminated_table(join->eliminated_tables, tl))
42234223
{
4224-
bool maybe_null;
4225-
if ((maybe_null= MY_TEST(embedding->outer_join)))
4224+
do
42264225
{
4227-
tl->table->maybe_null= maybe_null;
4228-
break;
4226+
bool maybe_null;
4227+
if ((maybe_null= MY_TEST(embedding->outer_join)))
4228+
{
4229+
tl->table->maybe_null= maybe_null;
4230+
break;
4231+
}
42294232
}
4233+
while ((embedding= embedding->embedding));
42304234
}
4231-
while ((embedding= embedding->embedding));
4235+
42324236
if (tl->on_expr && !is_eliminated_table(join->eliminated_tables, tl))
42334237
{
42344238
tl->on_expr->update_used_tables();

0 commit comments

Comments
 (0)