diff --git a/src/Storages/System/StorageSystemDatabases.cpp b/src/Storages/System/StorageSystemDatabases.cpp index 4765c892fa8..a73559c2c10 100644 --- a/src/Storages/System/StorageSystemDatabases.cpp +++ b/src/Storages/System/StorageSystemDatabases.cpp @@ -47,6 +47,8 @@ static String getEngineFull(const DatabasePtr & database) /// Database was dropped if (!locked_database && name == database->getDatabaseName()) return {}; + + guard.reset(); } ASTPtr ast = database->getCreateDatabaseQuery();