summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 49396052cdd..84f929fa7a7 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -3817,7 +3817,7 @@ bool TABLE_SHARE::visit_subgraph(Wait_for_flush *wait_for_flush,
if (gvisitor->m_lock_open_count++ == 0)
mysql_mutex_lock(&LOCK_open);
- TABLE_list::Iterator tables_it(tdc.used_tables);
+ All_share_tables_list::Iterator tables_it(tdc.all_tables);
/*
In case of multiple searches running in parallel, avoid going
@@ -3835,7 +3835,7 @@ bool TABLE_SHARE::visit_subgraph(Wait_for_flush *wait_for_flush,
while ((table= tables_it++))
{
- if (gvisitor->inspect_edge(&table->in_use->mdl_context))
+ if (table->in_use && gvisitor->inspect_edge(&table->in_use->mdl_context))
{
goto end_leave_node;
}
@@ -3844,7 +3844,7 @@ bool TABLE_SHARE::visit_subgraph(Wait_for_flush *wait_for_flush,
tables_it.rewind();
while ((table= tables_it++))
{
- if (table->in_use->mdl_context.visit_subgraph(gvisitor))
+ if (table->in_use && table->in_use->mdl_context.visit_subgraph(gvisitor))
{
goto end_leave_node;
}