Make query_classifier a wrapper.
The query_classifier library is now only a wrapper that loads an actual query classifier implementation. Currently it is hardwired to load qc_mysqlembedded, which implements the query classifier API using MySQL embedded. This will be changed, so that the library to load is specified when qc_init() is called. That will then allow the query classifier to be specified in the config file. Currently there seems to be a conflict between the mysql_library_end() call made in qc_mysqlembedded and the mysql_library_end() call made in gateway.c. The reason is that they both finalize a shared library. For the time being mysql_library_end() is not called in gateway.c. This problem is likely to go away by switching from the client library to the connector-c library.
This commit is contained in:
@ -4,7 +4,9 @@ target_link_libraries(binlogrouter maxscale-common)
|
||||
install(TARGETS binlogrouter DESTINATION ${MAXSCALE_LIBDIR})
|
||||
|
||||
add_executable(maxbinlogcheck maxbinlogcheck.c blr_file.c blr_cache.c blr_master.c blr_slave.c blr.c)
|
||||
target_link_libraries(maxbinlogcheck maxscale-common query_classifier)
|
||||
# maxbinlogcheck refers to my_uuid_init and my_uuin. They are non-public functions and
|
||||
# should not be used. They are found only from the embedded lib.
|
||||
target_link_libraries(maxbinlogcheck maxscale-common query_classifier ${EMBEDDED_LIB})
|
||||
|
||||
install(TARGETS maxbinlogcheck DESTINATION bin)
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
if(BUILD_TESTS)
|
||||
add_executable(testbinlogrouter testbinlog.c ../blr.c ../blr_slave.c ../blr_master.c ../blr_file.c ../blr_cache.c)
|
||||
target_link_libraries(testbinlogrouter maxscale-common query_classifier)
|
||||
# testbinlogrouter refers to my_uuid_init and my_uuin. They are non-public functions and
|
||||
# should not be used. They are found only from the embedded lib.
|
||||
target_link_libraries(testbinlogrouter maxscale-common query_classifier ${EMBEDDED_LIB})
|
||||
add_test(TestBinlogRouter ${CMAKE_CURRENT_BINARY_DIR}/testbinlogrouter)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user