diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp index 3b42b828b..fcaaa6b37 100644 --- a/lib/db_ido_mysql/idomysqlconnection.cpp +++ b/lib/db_ido_mysql/idomysqlconnection.cpp @@ -167,6 +167,7 @@ void IdoMysqlConnection::Reconnect(void) CONTEXT("Reconnecting to MySQL IDO database '" + GetName() + "'"); + double startTime = Utility::GetTime(); m_SessionToken = static_cast(Utility::GetTime()); SetShouldConnect(true); @@ -386,6 +387,9 @@ void IdoMysqlConnection::Reconnect(void) ClearCustomVarTable("customvariables"); ClearCustomVarTable("customvariablestatus"); + Log(LogInformation, "IdoMysqlConnection") + << "Finished reconnecting to MySQL IDO database in " << std::setw(2) << Utility::GetTime() - startTime << " second(s)."; + Query("COMMIT"); Query("BEGIN"); } diff --git a/lib/db_ido_pgsql/idopgsqlconnection.cpp b/lib/db_ido_pgsql/idopgsqlconnection.cpp index 0bc4f5eb0..fc4828902 100644 --- a/lib/db_ido_pgsql/idopgsqlconnection.cpp +++ b/lib/db_ido_pgsql/idopgsqlconnection.cpp @@ -164,6 +164,7 @@ void IdoPgsqlConnection::Reconnect(void) CONTEXT("Reconnecting to PostgreSQL IDO database '" + GetName() + "'"); + double startTime = Utility::GetTime(); m_SessionToken = static_cast(Utility::GetTime()); SetShouldConnect(true); @@ -376,6 +377,9 @@ void IdoPgsqlConnection::Reconnect(void) ClearCustomVarTable("customvariables"); ClearCustomVarTable("customvariablestatus"); + Log(LogInformation, "IdoPgsqlConnection") + << "Finished reconnecting to PostgreSQL IDO database in " << std::setw(2) << Utility::GetTime() - startTime << " second(s)."; + Query("COMMIT"); Query("BEGIN"); }