diff --git a/dbms/src/Interpreters/Context.cpp b/dbms/src/Interpreters/Context.cpp index 44d297ff057..60c95daf42f 100644 --- a/dbms/src/Interpreters/Context.cpp +++ b/dbms/src/Interpreters/Context.cpp @@ -224,9 +224,9 @@ struct ContextShared Context::Context() - : shared(new ContextShared), - quota(new QuotaForIntervals), - system_logs(new SystemLogs) + : shared(std::make_shared()), + quota(std::make_shared()), + system_logs(std::make_shared()) { } diff --git a/dbms/src/Interpreters/Context.h b/dbms/src/Interpreters/Context.h index 52c920fae41..f6f4527a0aa 100644 --- a/dbms/src/Interpreters/Context.h +++ b/dbms/src/Interpreters/Context.h @@ -105,6 +105,8 @@ private: Context * global_context = nullptr; /// Global context or nullptr. Could be equal to this. SystemLogsPtr system_logs; /// Used to log queries and operations on parts + UInt64 session_close_cycle = 0; + bool session_is_used = false; using DatabasePtr = std::shared_ptr; using Databases = std::map>;