TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DBUpdaterUtil Class Reference

#include <DBUpdater.h>

Static Public Member Functions

static std::string GetCorrectedMySQLExecutable ()
 
static bool CheckExecutable ()
 

Static Private Member Functions

static std::string & corrected_path ()
 

Member Function Documentation

bool DBUpdaterUtil::CheckExecutable ( )
static
48 {
49  boost::filesystem::path exe(GetCorrectedMySQLExecutable());
50  if (!exists(exe))
51  {
52  exe.clear();
53 
54  try
55  {
56  exe = search_path("mysql");
57  }
58  catch (std::runtime_error&)
59  {
60  }
61 
62  if (!exe.empty() && exists(exe))
63  {
64  // Correct the path to the cli
65  corrected_path() = absolute(exe).generic_string();
66  return true;
67  }
68 
69  TC_LOG_FATAL("sql.updates", "Didn't find executeable mysql binary at \'%s\' or in path, correct the path in the *.conf (\"Updates.MySqlCLIPath\").",
70  absolute(exe).generic_string().c_str());
71 
72  return false;
73  }
74  return true;
75 }
static std::string GetCorrectedMySQLExecutable()
Definition: DBUpdater.cpp:39
#define TC_LOG_FATAL(filterType__,...)
Definition: Log.h:210
static std::string & corrected_path()
Definition: DBUpdater.cpp:77

+ Here is the caller graph for this function:

std::string & DBUpdaterUtil::corrected_path ( )
staticprivate
78 {
79  static std::string path;
80  return path;
81 }
std::string DBUpdaterUtil::GetCorrectedMySQLExecutable ( )
static
40 {
41  if (!corrected_path().empty())
42  return corrected_path();
43  else
45 }
TC_COMMON_API std::string GetMySQLExecutable()
Definition: BuiltInConfig.cpp:48
static std::string & corrected_path()
Definition: DBUpdater.cpp:77

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: