mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 18:32:29 +00:00
fix
This commit is contained in:
parent
01d283c24f
commit
d0b37a5a70
@ -281,6 +281,7 @@ void DatabaseOnDisk::renameTable(
|
||||
|
||||
/// Notify the table that it is renamed. It will move data to new path (if it stores data on disk) and update StorageID
|
||||
table->rename(to_database.getTableDataPath(create), to_database.getDatabaseName(), to_table_name, table_lock);
|
||||
table->resetStorageIDForTableFunction({create.database, create.table, create.uuid}); /// reset UUID
|
||||
}
|
||||
catch (const Exception &)
|
||||
{
|
||||
|
@ -76,8 +76,9 @@ BlockIO InterpreterDropQuery::executeToTable(
|
||||
auto table_id = context.resolveStorageID(table_id_, Context::ResolveOrdinary);
|
||||
|
||||
std::unique_ptr<DDLGuard> ddl_guard;
|
||||
if (DatabaseCatalog::instance().getDatabase(table_id.database_name)->getEngineName() != "Atomic")
|
||||
ddl_guard = (!query.no_ddl_lock ? DatabaseCatalog::instance().getDDLGuard(table_id.database_name, table_id.table_name) : nullptr);
|
||||
if (auto db = DatabaseCatalog::instance().tryGetDatabase(table_id.database_name)) //FIXME
|
||||
if (db->getEngineName() != "Atomic")
|
||||
ddl_guard = (!query.no_ddl_lock ? DatabaseCatalog::instance().getDDLGuard(table_id.database_name, table_id.table_name) : nullptr);
|
||||
|
||||
auto [database, table] = tryGetDatabaseAndTable(table_id.database_name, table_id.table_name, query.if_exists);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user