mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Some mysql installations don't have mysql_reset_connection
This commit is contained in:
parent
033de17565
commit
318bcf10c5
11
vendor/POCO/Data/MySQL/CMakeLists.txt
vendored
11
vendor/POCO/Data/MySQL/CMakeLists.txt
vendored
@ -34,6 +34,17 @@ if(WIN32)
|
||||
target_compile_definitions(DataMySQL PUBLIC __LCC__) #__LCC__ define used by MySQL.h
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
include(CheckSymbolExists)
|
||||
# Some instalations don't have mysql_reset_connection() even if their version indicates otherwise
|
||||
CHECK_SYMBOL_EXISTS(mysql_reset_connection "${MYSQL_INCLUDE_DIR}/mysql.h" HAVE_MYSQL_RESET_CONNECTION)
|
||||
|
||||
if(HAVE_MYSQL_RESET_CONNECTION)
|
||||
message(status "Found: mysql_reset_connection")
|
||||
target_compile_definitions(DataMySQL PRIVATE HAVE_MYSQL_RESET_CONNECTION)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
POCO_INSTALL(DataMySQL)
|
||||
POCO_GENERATE_PACKAGE(DataMySQL)
|
||||
|
||||
|
2
vendor/POCO/Data/MySQL/src/SessionHandle.cpp
vendored
2
vendor/POCO/Data/MySQL/src/SessionHandle.cpp
vendored
@ -183,7 +183,7 @@ 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(HAVE_MYSQL_RESET_CONNECTION) && (((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)
|
||||
|
Loading…
Reference in New Issue
Block a user