summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Petrunia <sergey@mariadb.com>2022-05-05 18:58:00 +0300
committerSergei Petrunia <sergey@mariadb.com>2022-05-05 18:58:25 +0300
commit84e32eff5b050b69649db942de5a74f1b3d24e6d (patch)
tree6b8f8f87c2914b3b8c329315bc2941592aa0bb87
parent8dbfaa2aa4d6158f81bba3f5a46d683912b06868 (diff)
downloadmariadb-git-84e32eff5b050b69649db942de5a74f1b3d24e6d.tar.gz
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)
-rw-r--r--sql/sql_lex.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 8e718f2a942..6191e174298 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -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();