```
select name, value, last_error_message from system.errors where name = 'FILE_DOESNT_EXIST';
0 rows in set. Elapsed: 0.001 sec.

select * from system.tables format Null;
select * from system.tables format Null;
select * from system.tables format Null;

select name, value, last_error_message from system.errors where name = 'FILE_DOESNT_EXIST';
┌─name──────────────┬─value─┬─last_error_message──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ FILE_DOESNT_EXIST │   198 │ Cannot open file /var/lib/clickhouse/store/bff/bff731ca-ed14-404b-bff7-31caed14904b/zeros_mt.sql, errno: 2, strerror: No such file or directory │
└───────────────────┴───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```
ContextPtr local_context,
    const String & table_name,
    const StoragePtr & table,
    const ASTPtr & query)
{
    const auto & settings = local_context->getSettingsRef();
    const auto & create = query->as<ASTCreateQuery &>();
    assert(table_name == create.table);
    
    
    /** The code is based on the assumption that all threads share the same order of operations
      * - creating the .sql.tmp file;
      * - adding a table to `tables`;
      * - rename .sql.tmp to .sql.
      */
    
    
    if (isTableExist(table_name, getContext()))
        throw Exception(
            ErrorCodes::TABLE_ALREADY_EXISTS, "Table {}.{} already exists", backQuote(getDatabaseName()), backQuote(table_name));
    String table_metadata_path = getObjectMetadataPath(table_name);
    if (create.attach_short_syntax)
    {
        
        removeDetachedPermanentlyFlag(local_context, table_name, table_metadata_path, true);
        attachTable(table_name, table, getTableDataPath(create));
        return;
    }