Fix to bug 683: http://bugs.mariadb.com/show_bug.cgi?id=683
Added a check for MySQL version and a warning for the user about versions older than 5.5.40.
This commit is contained in:
@ -2,12 +2,19 @@
|
|||||||
# The following variables are set:
|
# The following variables are set:
|
||||||
# MYSQLCONFIG_FOUND - System has MySQL and the tool was found
|
# MYSQLCONFIG_FOUND - System has MySQL and the tool was found
|
||||||
# MYSQLCONFIG_EXECUTABLE - The MySQL configuration tool executable
|
# MYSQLCONFIG_EXECUTABLE - The MySQL configuration tool executable
|
||||||
|
# MYSQL_VERSION - The MySQL version number
|
||||||
find_program(MYSQLCONFIG_EXECUTABLE mysql_config)
|
find_program(MYSQLCONFIG_EXECUTABLE mysql_config)
|
||||||
if(MYSQLCONFIG_EXECUTABLE MATCHES "MYSQLCONFIG_EXECUTABLE-NOTFOUND")
|
if(MYSQLCONFIG_EXECUTABLE MATCHES "MYSQLCONFIG_EXECUTABLE-NOTFOUND")
|
||||||
message(FATAL_ERROR "Cannot find mysql_config.")
|
message(FATAL_ERROR "Cannot find mysql_config.")
|
||||||
set(MYSQLCONFIG_FOUND FALSE CACHE INTERNAL "")
|
set(MYSQLCONFIG_FOUND FALSE CACHE INTERNAL "")
|
||||||
unset(MYSQLCONFIG_EXECUTABLE)
|
unset(MYSQLCONFIG_EXECUTABLE)
|
||||||
else()
|
else()
|
||||||
|
execute_process(COMMAND ${MYSQLCONFIG_EXECUTABLE} --version OUTPUT_VARIABLE MYSQL_VERSION)
|
||||||
|
string(REPLACE "\n" "" MYSQL_VERSION ${MYSQL_VERSION})
|
||||||
message(STATUS "mysql_config found: ${MYSQLCONFIG_EXECUTABLE}")
|
message(STATUS "mysql_config found: ${MYSQLCONFIG_EXECUTABLE}")
|
||||||
|
message(STATUS "MySQL version: ${MYSQL_VERSION}")
|
||||||
|
if(MYSQL_VERSION VERSION_LESS 5.5.40)
|
||||||
|
message(WARNING "Required MySQL version is 5.5.40 or greater.")
|
||||||
|
endif()
|
||||||
set(MYSQLCONFIG_FOUND TRUE CACHE INTERNAL "")
|
set(MYSQLCONFIG_FOUND TRUE CACHE INTERNAL "")
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user