Add try/catch in TemporaryTableHolder destructor

This commit is contained in:
Roman Vasin 2023-02-17 07:47:23 +00:00
parent 2524560779
commit fde8e7e858

View File

@ -120,11 +120,18 @@ TemporaryTableHolder & TemporaryTableHolder::operator=(TemporaryTableHolder && r
TemporaryTableHolder::~TemporaryTableHolder()
{
if (id != UUIDHelpers::Nil)
{
try
{
auto table = getTable();
table->flushAndShutdown();
temporary_tables->dropTable(getContext(), "_tmp_" + toString(id));
}
catch (...)
{
tryLogCurrentException("TemporaryTableHolder");
}
}
}
StorageID TemporaryTableHolder::getGlobalTableID() const