1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge pull request #2630 from dhall-MariaDB/sergchanges

Sergchanges
This commit is contained in:
Roman Nozdrin
2022-12-02 19:08:08 +03:00
committed by GitHub
14 changed files with 47 additions and 27 deletions

View File

@ -32,7 +32,12 @@ INCLUDE(check_compiler_flag)
INCLUDE(ExternalProject)
INCLUDE(CheckCXXSourceCompiles)
MY_CHECK_CXX_COMPILER_FLAG("-std=c++20")
FIND_PACKAGE(Boost 1.71.0 COMPONENTS chrono filesystem program_options regex system thread)
IF (NOT Boost_FOUND OR Boost_VERSION VERSION_GREATER 1.76.99)
MY_CHECK_CXX_COMPILER_FLAG("-std=c++20")
ENDIF()
IF (have_CXX__std_c__20)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")
ELSE()
@ -188,6 +193,7 @@ IF (NOT INSTALL_LAYOUT)
MY_CHECK_AND_SET_COMPILER_FLAG("-g -O3 -fno-omit-frame-pointer -fno-strict-aliasing -Wall -fno-tree-vectorize -D_GLIBCXX_ASSERTIONS -DDBUG_OFF -DHAVE_CONFIG_H" RELEASE RELWITHDEBINFO MINSIZEREL)
MY_CHECK_AND_SET_COMPILER_FLAG("-ggdb3 -fno-omit-frame-pointer -fno-tree-vectorize -D_GLIBCXX_ASSERTIONS -DSAFE_MUTEX -DSAFEMALLOC -DENABLED_DEBUG_SYNC -O0 -Wall -D_DEBUG -DHAVE_CONFIG_H" DEBUG)
MY_CHECK_AND_SET_COMPILER_FLAG("-msse4.2" RELEASE RELWITHDEBINFO MINSIZEREL DEBUG)
MY_CHECK_AND_SET_COMPILER_FLAG("-DBOOST_BIND_GLOBAL_PLACEHOLDERS" RELEASE RELWITHDEBINFO MINSIZEREL DEBUG)
# enable security hardening features, like most distributions do
# in our benchmarks that costs about ~1% of performance, depending on the load
@ -236,11 +242,13 @@ MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated-declarations" DEBUG RELEASE RELW
MY_CHECK_AND_SET_COMPILER_FLAG("-Werror -Wall")
SET (ENGINE_LDFLAGS "-Wl,--no-as-needed -Wl,--add-needed")
SET (ENGINE_DT_LIB datatypes)
SET (ENGINE_COMMON_LIBS messageqcpp loggingcpp configcpp idbboot boost_thread xml2 pthread rt libmysql_client ${ENGINE_DT_LIB})
SET (ENGINE_COMMON_LIBS messageqcpp loggingcpp configcpp idbboot boost_thread xml2 pthread rt ${ENGINE_DT_LIB})
SET (ENGINE_OAM_LIBS oamcpp)
SET (ENGINE_BRM_LIBS brm idbdatafile cacheutils rwlock ${ENGINE_OAM_LIBS} ${ENGINE_COMMON_LIBS})
SET (ENGINE_EXEC_LIBS joblist execplan windowfunction joiner rowgroup funcexp udfsdk regr dataconvert common compress querystats querytele thrift threadpool ${ENGINE_BRM_LIBS})
SET (ENGINE_WRITE_LIBS ddlpackageproc ddlpackage dmlpackageproc dmlpackage writeengine writeengineclient idbdatafile cacheutils ${ENGINE_EXEC_LIBS})
SET (PLUGIN_EXEC_LIBS execplan windowfunction joiner rowgroup funcexp udfsdk regr dataconvert common compress querytele thrift threadpool ${ENGINE_BRM_LIBS})
SET (ENGINE_EXEC_LIBS joblist querystats libmysql_client ${PLUGIN_EXEC_LIBS})
SET (PLUGIN_WRITE_LIBS ddlpackageproc ddlpackage dmlpackageproc dmlpackage writeengine writeengineclient idbdatafile cacheutils)
SET (ENGINE_WRITE_LIBS ${PLUGIN_WRITE_LIBS} ${ENGINE_EXEC_LIBS})
SET (ENGINE_COMMON_LDFLAGS "")

View File

@ -1,3 +1,8 @@
if (Boost_FOUND)
add_custom_target(external_boost)
return()
endif()
include(ExternalProject)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")

View File

@ -5,7 +5,7 @@ set(datatypes_LIB_SRCS
mcs_decimal.cpp)
add_library(datatypes SHARED ${datatypes_LIB_SRCS})
add_dependencies(datatypes external_boost)
add_dependencies(datatypes loggingcpp external_boost)
install(TARGETS datatypes DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine)

View File

@ -1,11 +1,4 @@
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)
########### next target ###############
set(joblist_LIB_SRCS
@ -62,8 +55,19 @@ set(joblist_LIB_SRCS
windowfunctionstep.cpp
${ENGINE_SRC_DIR}/tools/passwd/secrets.cpp)
########### next target ###############
add_library(joblist_server STATIC ${joblist_LIB_SRCS})
add_dependencies(joblist_server loggingcpp)
########### next target ###############
add_definitions(-DMYSQL_SERVICE_THD_TIMEZONE_INCLUDED)
add_library(joblist SHARED ${joblist_LIB_SRCS})
target_include_directories(joblist BEFORE PUBLIC ${OPENSSL_INCLUDE_DIR})
target_include_directories(joblist BEFORE PUBLIC ${OPENSSL_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/libmariadb/include
${CMAKE_SOURCE_DIR}/libmariadb/include)
add_dependencies(joblist loggingcpp)
install(TARGETS joblist DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine)

View File

@ -11,6 +11,8 @@ SET(S3API_DEPS marias3 curl CACHE INTERNAL "S3API_DEPS")
SET ( libcalmysql_SRCS
../../datatypes/mcs_datatype.cpp
../../utils/libmysql_client/libmysql_client.cpp
../../utils/querystats/querystats.cpp
ha_mcs_sysvars.cpp
ha_mcs_client_udfs.cpp
ha_mcs_opt_rewrites.cpp
@ -45,7 +47,7 @@ if (COMMAND mysql_add_plugin)
ENDIF()
mysql_add_plugin(columnstore ${libcalmysql_SRCS} STORAGE_ENGINE MODULE_ONLY ${disabled}
LINK_LIBRARIES ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} ${S3API_DEPS} threadpool
LINK_LIBRARIES ${ENGINE_LDFLAGS} ${PLUGIN_EXEC_LIBS} ${PLUGIN_WRITE_LIBS} joblist_server ${NETSNMP_LIBRARIES} ${S3API_DEPS} threadpool
VERSION ${PACKAGE_VERSION}
COMPONENT columnstore-engine CONFIG columnstore.cnf)
else ()

View File

@ -506,5 +506,4 @@ void cpsm_conhdl_t::write(ByteStream bs)
#endif
}
} // namespace sm
}

View File

@ -105,28 +105,24 @@ add_executable(smcat src/smcat.cpp)
target_link_libraries(smcat storagemanager cloudio
${ENGINE_LDFLAGS}
${ENGINE_EXEC_LIBS}
)
add_executable(smput src/smput.cpp)
target_link_libraries(smput storagemanager cloudio
${ENGINE_LDFLAGS}
${ENGINE_EXEC_LIBS}
)
add_executable(smls src/smls.cpp)
target_link_libraries(smls storagemanager cloudio
${ENGINE_LDFLAGS}
${ENGINE_EXEC_LIBS}
)
add_executable(smrm src/smrm.cpp)
target_link_libraries(smrm storagemanager cloudio
${ENGINE_LDFLAGS}
${ENGINE_EXEC_LIBS}
)
install(TARGETS storagemanager

View File

@ -3,6 +3,11 @@ include_directories(BEFORE
${CMAKE_SOURCE_DIR}/libmariadb/include)
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} )
########### next target ###############

View File

@ -19,7 +19,11 @@
#define UTILS LIBMYSQL_CL_H
#include <my_config.h>
#ifdef MYSQL_DYNAMIC_PLUGIN
#include <mysql/service_sql.h>
#else
#include <mysql.h>
#endif
#include <boost/scoped_array.hpp>

View File

@ -1,6 +1,6 @@
include_directories(BEFORE
${CMAKE_BINARY_DIR}/libmariadb/include
${CMAKE_SOURCE_DIR}/libmariadb/include)
${CMAKE_BINARY_DIR}/libmariadb/include
${CMAKE_SOURCE_DIR}/libmariadb/include)
add_definitions(-DMYSQL_SERVICE_THD_TIMEZONE_INCLUDED)
include_directories( ${ENGINE_COMMON_INCLUDES} )

View File

@ -23,7 +23,6 @@
#define PREFER_MY_CONFIG_H
#include <my_config.h>
#include <mysql.h>
#include <string>
using namespace std;

View File

@ -789,7 +789,6 @@ class RowGroupStorage
void putKeyRow(uint64_t idx, Row& row)
{
uint64_t rgid = idx / fMaxRows;
uint64_t rid = idx % fMaxRows;
while (rgid >= fRGDatas.size())
{
@ -819,7 +818,7 @@ class RowGroupStorage
fLRU->add(rgid);
assert(rid == fRowGroupOut->getRowCount());
assert(idx % fMaxRows == fRowGroupOut->getRowCount());
fRowGroupOut->getRow(fRowGroupOut->getRowCount(), &row);
fRowGroupOut->incRowCount();
}

View File

@ -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})
install(TARGETS load_brm DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine)