提交 2eb2e4cf 编写于 作者: A Alexander Kazakov

Added proper nullptr check

上级 d252c595
......@@ -239,20 +239,25 @@ protected:
StoragePtr table = nullptr;
TableStructureReadLockHolder lock;
try
if (need_lock_structure)
{
if (need_lock_structure)
table = tables_it->table();
if (table == nullptr)
{
// Table might have just been removed or detached for Lazy engine (see DatabaseLazy::tryGetTable())
continue;
}
try
{
table = tables_it->table();
lock = table->lockStructureForShare(
false, context.getCurrentQueryId(), context.getSettingsRef().lock_acquire_timeout);
}
}
catch (const Exception & e)
{
if (e.code() == ErrorCodes::TABLE_IS_DROPPED)
continue;
throw;
catch (const Exception & e)
{
if (e.code() == ErrorCodes::TABLE_IS_DROPPED)
continue;
throw;
}
}
++rows_count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册