diff --git a/conf/config.cmake.dist b/conf/config.cmake.dist index 19e6c4c2a..b55332a37 100644 --- a/conf/config.cmake.dist +++ b/conf/config.cmake.dist @@ -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) diff --git a/src/cmake/showoptions.cmake b/src/cmake/showoptions.cmake index 1d0b4bcb6..eefd37679 100644 --- a/src/cmake/showoptions.cmake +++ b/src/cmake/showoptions.cmake @@ -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") diff --git a/src/common/Database/MySQLConnection.cpp b/src/common/Database/MySQLConnection.cpp index 15f1b2556..cb61f091d 100644 --- a/src/common/Database/MySQLConnection.cpp +++ b/src/common/Database/MySQLConnection.cpp @@ -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());