You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
fix C API includes
ColumnStore used to include server's mysql.h but link all tools with libmariadb.so There's no guarantee that this would work, even with workarounds it had in dbcon/mysql/sm.cpp Fix: * tools (linked with libmariadb.so) *must* include libmariadb's mysql.h * as a hack prevent service_thd_timezone.h from being loaded into tools, as it conflicts with libmariadb's mysql.h * server plugin *must* include server's mysql.h * also don't link every tool with libmariadb.so, link the helper library (liblibmysqlclient.so) that actually needs it, tools use this helper library, not libmariadb.so directly
This commit is contained in:
committed by
david.hall
parent
21c3bbce16
commit
246a4db8de
@ -1,5 +1,13 @@
|
|||||||
|
include_directories(BEFORE
|
||||||
|
${CMAKE_BINARY_DIR}/libmariadb/include
|
||||||
|
${CMAKE_SOURCE_DIR}/libmariadb/include)
|
||||||
|
add_definitions(-DMYSQL_SERVICE_THD_TIMEZONE_INCLUDED)
|
||||||
|
|
||||||
include_directories( ${ENGINE_COMMON_INCLUDES} ${ENGINE_SRC_DIR}/tools/passwd)
|
include_directories( ${ENGINE_COMMON_INCLUDES} ${ENGINE_SRC_DIR}/tools/passwd)
|
||||||
|
|
||||||
|
|
||||||
|
########### next target ###############
|
||||||
|
|
||||||
set(joblist_LIB_SRCS
|
set(joblist_LIB_SRCS
|
||||||
anydatalist.cpp
|
anydatalist.cpp
|
||||||
batchprimitiveprocessor-jl.cpp
|
batchprimitiveprocessor-jl.cpp
|
||||||
@ -54,15 +62,8 @@ set(joblist_LIB_SRCS
|
|||||||
windowfunctionstep.cpp
|
windowfunctionstep.cpp
|
||||||
${ENGINE_SRC_DIR}/tools/passwd/secrets.cpp)
|
${ENGINE_SRC_DIR}/tools/passwd/secrets.cpp)
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
add_library(joblist_server STATIC ${joblist_LIB_SRCS})
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
add_definitions(-DMYSQL_SERVICE_THD_TIMEZONE_INCLUDED)
|
|
||||||
|
|
||||||
add_library(joblist SHARED ${joblist_LIB_SRCS})
|
add_library(joblist SHARED ${joblist_LIB_SRCS})
|
||||||
|
target_include_directories(joblist BEFORE PUBLIC ${OPENSSL_INCLUDE_DIR})
|
||||||
add_dependencies(joblist loggingcpp)
|
add_dependencies(joblist loggingcpp)
|
||||||
|
|
||||||
install(TARGETS joblist DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine)
|
install(TARGETS joblist DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine)
|
||||||
|
@ -506,5 +506,4 @@ void cpsm_conhdl_t::write(ByteStream bs)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace sm
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,11 @@ include_directories(BEFORE
|
|||||||
${CMAKE_SOURCE_DIR}/libmariadb/include)
|
${CMAKE_SOURCE_DIR}/libmariadb/include)
|
||||||
add_definitions(-DMYSQL_SERVICE_THD_TIMEZONE_INCLUDED)
|
add_definitions(-DMYSQL_SERVICE_THD_TIMEZONE_INCLUDED)
|
||||||
|
|
||||||
|
include_directories(BEFORE
|
||||||
|
${CMAKE_BINARY_DIR}/libmariadb/include
|
||||||
|
${CMAKE_SOURCE_DIR}/libmariadb/include)
|
||||||
|
add_definitions(-DMYSQL_SERVICE_THD_TIMEZONE_INCLUDED)
|
||||||
|
|
||||||
include_directories( ${ENGINE_COMMON_INCLUDES} )
|
include_directories( ${ENGINE_COMMON_INCLUDES} )
|
||||||
|
|
||||||
########### next target ###############
|
########### next target ###############
|
||||||
|
@ -113,4 +113,3 @@ add_executable(load_brm ${load_brm_SRCS})
|
|||||||
target_link_libraries(load_brm ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES})
|
target_link_libraries(load_brm ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES})
|
||||||
|
|
||||||
install(TARGETS load_brm DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine)
|
install(TARGETS load_brm DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user