diff --git a/dbms/src/Interpreters/SystemLog.h b/dbms/src/Interpreters/SystemLog.h index 5c6071e647d986cbc82ec3d307307011bfd2b819..8e04076dc14f86a94563018dee916ff7f8f8f6ef 100644 --- a/dbms/src/Interpreters/SystemLog.h +++ b/dbms/src/Interpreters/SystemLog.h @@ -233,8 +233,7 @@ void SystemLog::flush() { LOG_TRACE(log, "Flushing system log"); - if (!is_prepared) /// BTW, flush method is called from single thread. - prepareTable(); + prepareTable(); Block block = LogElement::createBlock(); for (const LogElement & elem : data) @@ -311,7 +310,7 @@ void SystemLog::prepareTable() /// The required table will be created. table = nullptr; } - else + else if (!is_prepared) LOG_DEBUG(log, "Will use existing table " << description << " for " + LogElement::name()); }