aboutsummaryrefslogtreecommitdiff
path: root/src/server/database/Database/MySQLConnection.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-06-14 20:30:02 +0200
committerShauren <shauren.trinity@gmail.com>2023-08-15 22:02:39 +0200
commit4e6118c919bd1f3cd864526345c0b9b7abcbb2e4 (patch)
tree2e8253b3544f6ff5a79a555bd80874a0d686aa1d /src/server/database/Database/MySQLConnection.cpp
parent24fc0dcb1ee627cdec5ff5670a85050afc62d281 (diff)
Core/Misc: Replace std::abort with our ABORT macro
* libmysql is not a well behaved library on windows, it installs its own SIGABRT handler every time a new connection is opened, overriding our own (cherry picked from commit 09dea76fb5ede974d6765d40985b033db3fba6a3)
Diffstat (limited to 'src/server/database/Database/MySQLConnection.cpp')
-rw-r--r--src/server/database/Database/MySQLConnection.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/database/Database/MySQLConnection.cpp b/src/server/database/Database/MySQLConnection.cpp
index aa38d969a30..9460892256f 100644
--- a/src/server/database/Database/MySQLConnection.cpp
+++ b/src/server/database/Database/MySQLConnection.cpp
@@ -559,7 +559,7 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo, uint8 attempts /*= 5*/)
{
TC_LOG_FATAL("sql.sql", "Could not re-prepare statements!");
std::this_thread::sleep_for(std::chrono::seconds(10));
- std::abort();
+ ABORT();
}
TC_LOG_INFO("sql.sql", "Successfully reconnected to {} @{}:{} ({}).",
@@ -579,7 +579,7 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo, uint8 attempts /*= 5*/)
// We could also initiate a shutdown through using std::raise(SIGTERM)
std::this_thread::sleep_for(std::chrono::seconds(10));
- std::abort();
+ ABORT();
}
else
{
@@ -602,12 +602,12 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo, uint8 attempts /*= 5*/)
case ER_NO_SUCH_TABLE:
TC_LOG_ERROR("sql.sql", "Your database structure is not up to date. Please make sure you've executed all queries in the sql/updates folders.");
std::this_thread::sleep_for(std::chrono::seconds(10));
- std::abort();
+ ABORT();
return false;
case ER_PARSE_ERROR:
TC_LOG_ERROR("sql.sql", "Error while parsing SQL. Core fix required.");
std::this_thread::sleep_for(std::chrono::seconds(10));
- std::abort();
+ ABORT();
return false;
default:
TC_LOG_ERROR("sql.sql", "Unhandled MySQL errno {}. Unexpected behaviour possible.", errNo);