```
$ ls -lR

.:
total 1645932
-rwxrwxr-x 1 milovidov milovidov 1685419984 июл  4 00:33 clickhouse
drwxrwxr-x 2 milovidov milovidov       4096 июл  4 00:36 lib
drwxrwxr-x 2 milovidov milovidov       4096 июл  4 00:36 lib64

./lib:
total 3536
-rwxr-xr-x 1 milovidov milovidov 2025032 июл  4 00:36 libc.so.6
-rw-r--r-- 1 milovidov milovidov   18816 июл  4 00:36 libdl.so.2
-rw-r--r-- 1 milovidov milovidov 1369352 июл  4 00:36 libm.so.6
-rwxr-xr-x 1 milovidov milovidov  158288 июл  4 00:36 libpthread.so.0
-rw-r--r-- 1 milovidov milovidov   40040 июл  4 00:36 librt.so.1

./lib64:
total 184
-rwxr-xr-x 1 milovidov milovidov 187376 июл  4 00:36 ld-linux-x86-64.so.2


$ sudo chroot . /clickhouse local --query "SELECT 1"
filesystem error: in temp_directory_path: path "/tmp" is not a directory: Not a directory
```
if (try_resolve(*this))
            return resolved_id;
        
        bool is_local_context = query_context && query_context != this;
        if (is_local_context && try_resolve(*query_context))
            return resolved_id;
        
        bool is_local_or_query_context = session_context && session_context != this;
        if (is_local_or_query_context && try_resolve(*session_context))
            return resolved_id;
    }
    
    if (in_current_database)
    {
        if (current_database.empty())
        {
            if (exception)
                exception->emplace("Default database is not selected", ErrorCodes::UNKNOWN_DATABASE);
            return StorageID::createEmpty();
        }
        storage_id.database_name = current_database;
        
        return storage_id;
    }
    if (exception)
        exception->emplace("Cannot resolve database name for table " + storage_id.getNameForLogs(), ErrorCodes::UNKNOWN_TABLE);
    return StorageID::createEmpty();
}
}