Merge pull request #37585 from Vxider/fix-temp-table-drop

Flush and shutdown temporary table before drop
This commit is contained in:
Kseniia Sumarokova 2022-06-02 12:07:50 +02:00 committed by GitHub
commit b24f34dd93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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