Fixing Broken MySQL Reset on Debian.

wq
wq
This commit is contained in:
Debian
2021-12-01 23:25:59 +00:00
committed by stephb9959
parent e9d72ebc61
commit 760b0d4e77
2 changed files with 7 additions and 1 deletions

View File

@@ -61,6 +61,10 @@ include(GNUInstallDirs)
# Include some common macros to simpilfy the Poco CMake files
include(PocoMacros)
if(BROKEN_MYSQL_RESET)
add_definitions(-DBROKEN_MYSQL_RESET=1)
endif()
if(POCO_STATIC)
message(WARNING "POCO_STATIC has been deprecated. Please use BUILD_SHARED_LIBS=NO to build static libraries.")
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)

View File

@@ -183,7 +183,9 @@ void SessionHandle::rollback()
void SessionHandle::reset()
{
#if ((defined (MYSQL_VERSION_ID)) && (MYSQL_VERSION_ID >= 50700)) || ((defined (MARIADB_PACKAGE_VERSION_ID)) && (MARIADB_PACKAGE_VERSION_ID >= 30000))
#if (defined(BROKEN_MYSQL_RESET))
if (mysql_refresh(_pHandle, REFRESH_TABLES | REFRESH_STATUS | REFRESH_THREADS | REFRESH_READ_LOCK) != 0)
#elif ((defined (MYSQL_VERSION_ID)) && (MYSQL_VERSION_ID >= 50700)) || ((defined (MARIADB_PACKAGE_VERSION_ID)) && (MARIADB_PACKAGE_VERSION_ID >= 30000))
if (mysql_reset_connection(_pHandle) != 0)
#else
if (mysql_refresh(_pHandle, REFRESH_TABLES | REFRESH_STATUS | REFRESH_THREADS | REFRESH_READ_LOCK) != 0)