From 3a418a0bbc8e155e5395595c5e25c038d3c7c773 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 11 May 2017 22:29:51 +0200 Subject: Core/Common: Include cleanup --- src/server/database/Updater/DBUpdater.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/server/database/Updater/DBUpdater.cpp') diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp index 63257571177..117c3097478 100644 --- a/src/server/database/Updater/DBUpdater.cpp +++ b/src/server/database/Updater/DBUpdater.cpp @@ -41,18 +41,12 @@ bool DBUpdaterUtil::CheckExecutable() boost::filesystem::path exe(GetCorrectedMySQLExecutable()); if (!exists(exe)) { - exe.clear(); - - if (auto path = Trinity::SearchExecutableInPath("mysql")) + exe = Trinity::SearchExecutableInPath("mysql"); + if (!exe.empty() && exists(exe)) { - exe = std::move(*path); - - if (!exe.empty() && exists(exe)) - { - // Correct the path to the cli - corrected_path() = absolute(exe).generic_string(); - return true; - } + // Correct the path to the cli + corrected_path() = absolute(exe).generic_string(); + return true; } TC_LOG_FATAL("sql.updates", "Didn't find any executable MySQL binary at \'%s\' or in path, correct the path in the *.conf (\"MySQLExecutable\").", @@ -347,7 +341,7 @@ bool DBUpdater::Populate(DatabaseWorkerPool& pool) template QueryResult DBUpdater::Retrieve(DatabaseWorkerPool& pool, std::string const& query) { - return pool.PQuery(query.c_str()); + return pool.Query(query.c_str()); } template -- cgit v1.2.3