feat(Core/Misc): compatibility with 10.2+ versions of MariaDB library (#1284) (#1437)

This commit is contained in:
Francesco Borzì
2019-02-09 21:51:05 +01:00
committed by Barbz
parent 0c71d0e56e
commit 01c6d32ac9
3 changed files with 11 additions and 1 deletions

View File

@@ -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)

View File

@@ -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")

View File

@@ -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());