Build compare using embedded library
For whatever reason compare fails to load qc_mysqlembedded if it has not been built with the embedded library. Needs to be sorted out at some point.
This commit is contained in:
@ -1,5 +1,20 @@
|
|||||||
# Use the client libraries in MaxScale core
|
# Include the embedded library headers
|
||||||
include_directories(${MARIADB_CONNECTOR_INCLUDE_DIR})
|
if (BUILD_QC_MYSQLEMBEDDED)
|
||||||
|
subdirs(MYSQL_INCLUDE_DIR_ALL ${MYSQL_EMBEDDED_INCLUDE_DIR})
|
||||||
|
foreach(DIR ${MYSQL_INCLUDE_DIR_ALL})
|
||||||
|
include_directories(${DIR})
|
||||||
|
endforeach()
|
||||||
|
include_directories(${MYSQL_EMBEDDED_INCLUDE_DIR}/..)
|
||||||
|
|
||||||
|
if(${ERRMSG} MATCHES "ERRMSG-NOTFOUND")
|
||||||
|
message(FATAL_ERROR "The errmsg.sys file was not found, please define the path with -DERRMSG=<path>")
|
||||||
|
else()
|
||||||
|
if(${CMAKE_VERSION} VERSION_LESS 2.8)
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${ERRMSG} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
else()
|
||||||
|
file(COPY ${ERRMSG} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(classify classify.c)
|
add_executable(classify classify.c)
|
||||||
target_link_libraries(classify maxscale-common)
|
target_link_libraries(classify maxscale-common)
|
||||||
@ -24,5 +39,6 @@ add_test(TestQC_CompareSet compare -v 2 ${CMAKE_CURRENT_SOURCE_DIR}/set.test)
|
|||||||
add_test(TestQC_CompareUpdate compare -v 2 ${CMAKE_CURRENT_SOURCE_DIR}/update.test)
|
add_test(TestQC_CompareUpdate compare -v 2 ${CMAKE_CURRENT_SOURCE_DIR}/update.test)
|
||||||
add_test(TestQC_CompareMaxScale compare -v 2 ${CMAKE_CURRENT_SOURCE_DIR}/maxscale.test)
|
add_test(TestQC_CompareMaxScale compare -v 2 ${CMAKE_CURRENT_SOURCE_DIR}/maxscale.test)
|
||||||
add_test(TestQC_CompareWhiteSpace compare -v 2 -S -s "select user from mysql.user; ")
|
add_test(TestQC_CompareWhiteSpace compare -v 2 -S -s "select user from mysql.user; ")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(canonical_tests)
|
add_subdirectory(canonical_tests)
|
||||||
|
@ -20,6 +20,9 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#define MYSQL_COM_QUIT COM_QUIT
|
||||||
|
#define MYSQL_COM_INIT_DB COM_INIT_DB
|
||||||
|
#define MYSQL_COM_CHANGE_USER COM_CHANGE_USER
|
||||||
#include <maxscale/gwdirs.h>
|
#include <maxscale/gwdirs.h>
|
||||||
#include <maxscale/log_manager.h>
|
#include <maxscale/log_manager.h>
|
||||||
#include <maxscale/protocol/mysql.h>
|
#include <maxscale/protocol/mysql.h>
|
||||||
|
Reference in New Issue
Block a user