After such successful queries:

```sql
CREATE DATABASE testlazy ENGINE = Lazy(1);
CREATE TABLE testlazy.`таблица_со_странным_названием` (a UInt64, b UInt64) ENGINE = Log;
```
Server failed to restart with error:
```
<Error> Application: filesystem error: in posix_stat: failed to determine attributes for the specified path: File name too long [/home/avogar/tmp/server/metadata/testlazy/%25D1%2582%25D0%25B0%25D0%25B1%25D0%25BB%25D0%25B8%25D1%2586%25D0%25B0_%25D1%2581%25D0%25BE_%25D1%2581%25D1%2582%25D1%2580%25D0%25B0%25D0%25BD%25D0%25BD%25D1%258B%25D0%25BC_%25D0%25BD%25D0%25B0%25D0%25B7%25D0%25B2%25D0%25B0%25D0%25BD%25D0%25B8%25D0%25B5%25D0%25BC.sql]
```

Found in https://github.com/ClickHouse/ClickHouse/pull/27928
}
                metadata.total_dictionaries += create_query->is_dictionary;
            }
        }
        catch (Exception & e)
        {
            e.addMessage("Cannot parse definition from metadata file " + full_path.string());
            throw;
        }
    };
    iterateMetadataFiles(local_context, process_metadata);
    size_t objects_in_database = metadata.parsed_tables.size() - prev_tables_count;
    size_t dictionaries_in_database = metadata.total_dictionaries - prev_total_dictionaries;
    size_t tables_in_database = objects_in_database - dictionaries_in_database;
    LOG_INFO(log, "Metadata processed, database {} has {} tables and {} dictionaries in total.",
             database_name, tables_in_database, dictionaries_in_database);
}
void DatabaseOrdinary::loadTableFromMetadata(ContextMutablePtr local_context, const String & file_path, const QualifiedTableName & name, const ASTPtr & ast, bool force_restore)
{
    assert(name.database == database_name);
    const auto & create_query = ast->as<const ASTCreateQuery &>();
    tryAttachTable(
        local_context,
        create_query,
        *this,
        name.database,
        file_path,
        force_restore);
}
void DatabaseOrdinary::startupTables(ThreadPool & thread_pool, bool , bool )