mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
ISSUES-2482 fix crash when on cluster
This commit is contained in:
parent
3be0b6ca6d
commit
f8d7cf17a7
@ -517,9 +517,9 @@ bool DDLWorker::tryExecuteQuery(const String & query, const DDLTask & task, Exec
|
||||
|
||||
try
|
||||
{
|
||||
Context local_context(context);
|
||||
local_context.setCurrentQueryId(""); // generate random query_id
|
||||
executeQuery(istr, ostr, false, local_context, nullptr);
|
||||
current_context = std::make_unique<Context>(context);
|
||||
current_context->setCurrentQueryId(""); // generate random query_id
|
||||
executeQuery(istr, ostr, false, *current_context, nullptr);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
@ -70,6 +70,7 @@ private:
|
||||
private:
|
||||
Context & context;
|
||||
Logger * log;
|
||||
std::unique_ptr<Context> current_context;
|
||||
|
||||
std::string host_fqdn; /// current host domain name
|
||||
std::string host_fqdn_id; /// host_name:port
|
||||
|
Loading…
Reference in New Issue
Block a user