mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-26 19:50:51 +00:00
fix empty table name
This commit is contained in:
parent
54a75269cb
commit
a1ff29b7e6
@ -622,8 +622,13 @@ void DDLWorker::processTask(DDLTask & task, const ZooKeeperPtr & zookeeper)
|
||||
|
||||
if (auto query_with_table = dynamic_cast<ASTQueryWithTableAndOutput *>(rewritten_ast.get()); query_with_table)
|
||||
{
|
||||
StoragePtr storage;
|
||||
if (!query_with_table->table.empty())
|
||||
{
|
||||
/// It's not CREATE DATABASE
|
||||
String database = query_with_table->database.empty() ? context.getCurrentDatabase() : query_with_table->database;
|
||||
StoragePtr storage = context.tryGetTable(database, query_with_table->table);
|
||||
storage = context.tryGetTable(database, query_with_table->table);
|
||||
}
|
||||
|
||||
/// For some reason we check consistency of cluster definition only
|
||||
/// in case of ALTER query, but not in case of CREATE/DROP etc.
|
||||
|
@ -50,7 +50,7 @@ struct StorageID
|
||||
{
|
||||
assertNotEmpty();
|
||||
return (database_name.empty() ? "" : backQuoteIfNeed(database_name) + ".") + backQuoteIfNeed(table_name)
|
||||
+ (hasUUID() ? "" : " (UUID " + toString(uuid) + ")");
|
||||
+ (hasUUID() ? " (UUID " + toString(uuid) + ")" : "");
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
|
Loading…
Reference in New Issue
Block a user