mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Merge
This commit is contained in:
parent
874f665ffd
commit
ac2f8dfb13
@ -30,7 +30,27 @@ static void executeCreateQuery(const String & query, Context & context, const St
|
||||
ast_create_query.attach = true;
|
||||
ast_create_query.database = database;
|
||||
|
||||
InterpreterCreateQuery(ast, context).executeLoadExisting();
|
||||
try
|
||||
{
|
||||
InterpreterCreateQuery(ast, context).executeLoadExisting();
|
||||
}
|
||||
catch (const Exception & e)
|
||||
{
|
||||
/// Исправление для ChunkMerger.
|
||||
if (e.code() == ErrorCodes::TABLE_ALREADY_EXISTS)
|
||||
{
|
||||
if (const auto id = dynamic_cast<const ASTIdentifier *>(ast_create_query.storage.get()))
|
||||
{
|
||||
if (id->name == "TinyLog")
|
||||
{
|
||||
tryLogCurrentException(__PRETTY_FUNCTION__);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user