**Describe the bug**

Can't rename distributed table and move it from Ordinary to Atomic database

**How to reproduce**

```
CREATE DATABASE atomic_database ON CLUSTER cluster_name ENGINE = Atomic
```
```
CREATE DATABASE ordinary_database ON CLUSTER cluster_name ENGINE = Ordinary
```

```
CREATE TABLE ordinary_database.t ON CLUSTER cluster_name
...
ENGINE = ReplicatedMergeTree(...)
...
```

```
CREATE TABLE ordinary_database.distributed_table ON CLUSTER cluster_name AS ordinary_database.t 
ENGINE = Distributed(cluster_name, ordinary_database, t)
```

```
RENAME TABLE ordinary_database.distributed_table TO atomic_database.distributed_table

Query id: 7bd2101e-f78a-4584-8374-6e44a0bbf23f


0 rows in set. Elapsed: 0.011 sec.

Received exception from server (version 21.5.6):
Code: 1000. DB::Exception: Received from clickhouse-server:9000. DB::Exception: File not found: /var/lib/clickhouse/data/ordinary_database/distributed_table.
```
But 
```
ls -lh /var/lib/clickhouse/data/ordinary_database
total 0
drwxr-x---  2 ...  staff    64B Jun  4 18:19 distributed_table
drwxr-x---  4 ...  staff   128B Jun  4 18:18 t
```

**Does it reproduce on recent release?**
Checked on 21.5.6.6 version


**Expected behavior**

For example, renaming _Views_ works perfectly. I expect the same from the _Distributed_ table

formatReadableSizeWithBinarySuffix(distributed_settings.bytes_to_throw_insert));
    }
    if (distributed_settings.bytes_to_delay_insert && total_bytes > distributed_settings.bytes_to_delay_insert)
    {
        
        
        const size_t step_ms = std::min<double>(1., double(distributed_settings.max_delay_to_insert) * 1'000 * 0.05);
        UInt64 delayed_ms = 0;
        do {
            delayed_ms += step_ms;
            std::this_thread::sleep_for(std::chrono::milliseconds(step_ms));
        } while (*totalBytes(getContext()->getSettingsRef()) > distributed_settings.bytes_to_delay_insert && delayed_ms < distributed_settings.max_delay_to_insert*1000);
        ProfileEvents::increment(ProfileEvents::DistributedDelayedInserts);
        ProfileEvents::increment(ProfileEvents::DistributedDelayedInsertsMilliseconds, delayed_ms);
        UInt64 new_total_bytes = *totalBytes(getContext()->getSettingsRef());
        LOG_INFO(log, "Too many bytes pending for async INSERT: was {}, now {}, INSERT was delayed to {} ms",
            formatReadableSizeWithBinarySuffix(total_bytes),
            formatReadableSizeWithBinarySuffix(new_total_bytes),
            delayed_ms);
        if (new_total_bytes > distributed_settings.bytes_to_delay_insert)
        {
            ProfileEvents::increment(ProfileEvents::DistributedRejectedInserts);
            throw Exception(ErrorCodes::DISTRIBUTED_TOO_MANY_PENDING_BYTES,
                "Too many bytes pending for async INSERT: {} (bytes_to_delay_insert={})",
                formatReadableSizeWithBinarySuffix(new_total_bytes),
                formatReadableSizeWithBinarySuffix(distributed_settings.bytes_to_delay_insert));
        }
    }
}
void registerStorageDistributed(StorageFactory & factory)