You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-879 Fix QueryStats linking issues
With 1.1 we have removed libdrizzle and used MariaDB's client library instead for both CrossEngine and QueryStats. Unfortunately MariaDB 10.2 has two client libraries which have different structs with the same name. When QueryStats was running inside the ColumnStore plugin this symbol conflict was causing a crash. The server's built-in client API has several different and several missing functions so some additions to sm.cpp were made to fill the gaps. This patch does the following: * Make sure that libmariadb is only linked to executables, not the ColumnStore Plugin (to avoid symbol conflicts). Note that all executables that link to CrossEngine and/or QueryStats need to link to libmariadb to avoid missing symbol issues. * Use the server's built-in client API for QueryStats when run in the plugin * Replace missing server built-in client API calls in sm.cpp (this is for QueryStats and CrossEngine to keep the dynamic linker happy) * Fixes issue where using 'localhost' as the MariaDB Server hostname would fail in QueryStats.
This commit is contained in:
@ -37,7 +37,7 @@ set(cpimport.bin_SRCS cpimport.cpp)
|
||||
|
||||
add_executable(cpimport.bin ${cpimport.bin_SRCS})
|
||||
|
||||
target_link_libraries(cpimport.bin ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${ENGINE_WRITE_LIBS} we_bulk we_xml)
|
||||
target_link_libraries(cpimport.bin ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} we_bulk we_xml)
|
||||
|
||||
install(TARGETS cpimport.bin DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
||||
|
@ -18,7 +18,7 @@ set(WriteEngineServer_SRCS
|
||||
|
||||
add_executable(WriteEngineServer ${WriteEngineServer_SRCS})
|
||||
|
||||
target_link_libraries(WriteEngineServer ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${ENGINE_WRITE_LIBS} threadpool writeengineredistribute)
|
||||
target_link_libraries(WriteEngineServer ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${NETSNMP_LIBRARIES} ${ENGINE_WRITE_LIBS} threadpool writeengineredistribute)
|
||||
|
||||
install(TARGETS WriteEngineServer DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
||||
|
@ -17,7 +17,7 @@ set(cpimport_SRCS
|
||||
|
||||
add_executable(cpimport ${cpimport_SRCS})
|
||||
|
||||
target_link_libraries(cpimport ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${ENGINE_WRITE_LIBS} batchloader threadpool)
|
||||
target_link_libraries(cpimport ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} batchloader threadpool)
|
||||
|
||||
install(TARGETS cpimport DESTINATION ${ENGINE_BINDIR} COMPONENT platform)
|
||||
|
||||
|
Reference in New Issue
Block a user