Skip to content

Commit

Permalink
feat(Core/Misc): compatibility with 10.2+ versions of MariaDB library (
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoBorzi authored and BarbzYHOOL committed Feb 9, 2019
1 parent 0c71d0e commit 01c6d32
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions conf/config.cmake.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts"
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
option(WITH_WARNINGS "Show all warnings during compile" 0)
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
option(MARIADB "Compatibility with 10.2+ versions of MariaDB library" 0)
option(WITH_PERFTOOLS "Enable compilation with gperftools libraries included" 0)
option(WITH_MESHEXTRACTOR "Build meshextractor (alpha)" 0)
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
Expand Down
7 changes: 7 additions & 0 deletions src/cmake/showoptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ else()
message("* Use coreside debug : No (default)")
endif()

if( MARIADB )
message("* Enable MariaDB 10.2+ support : Yes")
add_definitions(-DMARIADB)
else()
message("* Enable MariaDB 10.2+ support : No (default)")
endif()

if ( UNIX )
if( WITH_PERFTOOLS )
message("* Use unix gperftools : Yes")
Expand Down
4 changes: 3 additions & 1 deletion src/common/Database/MySQLConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,10 @@ bool MySQLConnection::_HandleMySQLErrno(uint32 errNo)
{
case CR_SERVER_GONE_ERROR:
case CR_SERVER_LOST:
case CR_INVALID_CONN_HANDLE:
case CR_SERVER_LOST_EXTENDED:
#if !defined MARIADB
case CR_INVALID_CONN_HANDLE:
#endif
{
m_reconnecting = true;
uint64 oldThreadId = mysql_thread_id(GetHandle());
Expand Down

3 comments on commit 01c6d32

@FrancescoBorzi
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All credits to @Viste

@BarbzYHOOL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FrancescoBorzi
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BarbzYHOOL I did that: https://github.com/azerothcore/azerothcore-wotlk/pull/1437/commits

the problem is that the github squash overrides it and automatically set the co-author as the person who opened the PR.

Please sign in to comment.