Add missing "return"s in Ido*Connection::Reconnect

This commit is contained in:
Gunnar Beutner 2015-03-05 15:57:46 +01:00
parent fd9dc32a3d
commit bb4beefca9
2 changed files with 10 additions and 0 deletions

View File

@ -226,6 +226,7 @@ void IdoMysqlConnection::Reconnect(void)
Log(LogCritical, "IdoMysqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
Application::RequestShutdown(EXIT_FAILURE);
return;
}
DiscardRows(result);
@ -238,6 +239,7 @@ void IdoMysqlConnection::Reconnect(void)
<< SCHEMA_VERSION << "'! Please check the upgrade documentation.";
Application::RequestShutdown(EXIT_FAILURE);
return;
}
String instanceName = GetInstanceName();

View File

@ -223,19 +223,27 @@ void IdoPgsqlConnection::Reconnect(void)
Dictionary::Ptr row = FetchRow(result, 0);
if (!row) {
PQfinish(m_Connection);
m_Connection = NULL;
Log(LogCritical, "IdoPgsqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
Application::RequestShutdown(EXIT_FAILURE);
return;
}
String version = row->Get("version");
if (Utility::CompareVersion(SCHEMA_VERSION, version) < 0) {
PQfinish(m_Connection);
m_Connection = NULL;
Log(LogCritical, "IdoPgsqlConnection")
<< "Schema version '" << version << "' does not match the required version '"
<< SCHEMA_VERSION << "'! Please check the upgrade documentation.";
Application::RequestShutdown(EXIT_FAILURE);
return;
}
String instanceName = GetInstanceName();