You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
Merge branch 'develop-1.1' into develop-1.2-merge-up-20190214
This commit is contained in:
@@ -112,6 +112,17 @@ if (NOT SNAPPY_FOUND)
|
||||
MESSAGE(FATAL_ERROR "Snappy not found please install snappy-devel for CentOS/RedHat or libsnappy-dev for Ubuntu/Debian")
|
||||
endif()
|
||||
|
||||
# Jemalloc has issues with SLES 12, so disable for now
|
||||
IF (EXISTS "/etc/SuSE-release")
|
||||
SET(JEMALLOC_LIBRARIES "")
|
||||
ELSE ()
|
||||
INCLUDE (FindJeMalloc.cmake)
|
||||
if (NOT JEMALLOC_FOUND)
|
||||
message(FATAL_ERROR "jemalloc not found!")
|
||||
SET(JEMALLOC_LIBRARIES "")
|
||||
endif()
|
||||
ENDIF ()
|
||||
|
||||
FIND_PROGRAM(AWK_EXECUTABLE awk DOC "path to the awk executable")
|
||||
if(NOT AWK_EXECUTABLE)
|
||||
message(FATAL_ERROR "awk not found!")
|
||||
@@ -163,7 +174,7 @@ SET (ENGINE_LOCALDIR "${INSTALL_ENGINE}/local")
|
||||
SET (ENGINE_MYSQLDIR "${INSTALL_ENGINE}/mysql")
|
||||
SET (ENGINE_TOOLSDIR "${INSTALL_ENGINE}/tools")
|
||||
|
||||
SET (ENGINE_COMMON_LIBS messageqcpp loggingcpp configcpp idbboot ${Boost_LIBRARIES} xml2 pthread rt libmysql_client)
|
||||
SET (ENGINE_COMMON_LIBS messageqcpp loggingcpp configcpp idbboot ${Boost_LIBRARIES} xml2 pthread rt libmysql_client ${JEMALLOC_LIBRARIES})
|
||||
SET (ENGINE_OAM_LIBS oamcpp alarmmanager)
|
||||
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})
|
||||
|
44
FindJeMalloc.cmake
Normal file
44
FindJeMalloc.cmake
Normal file
@@ -0,0 +1,44 @@
|
||||
# - Try to find jemalloc headers and libraries.
|
||||
#
|
||||
# Usage of this module as follows:
|
||||
#
|
||||
# find_package(JeMalloc)
|
||||
#
|
||||
# Variables used by this module, they can change the default behaviour and need
|
||||
# to be set before calling find_package:
|
||||
#
|
||||
# JEMALLOC_ROOT_DIR Set this variable to the root installation of
|
||||
# jemalloc if the module has problems finding
|
||||
# the proper installation path.
|
||||
#
|
||||
# Variables defined by this module:
|
||||
#
|
||||
# JEMALLOC_FOUND System has jemalloc libs/headers
|
||||
# JEMALLOC_LIBRARIES The jemalloc library/libraries
|
||||
# JEMALLOC_INCLUDE_DIR The location of jemalloc headers
|
||||
|
||||
find_path(JEMALLOC_ROOT_DIR
|
||||
NAMES include/jemalloc/jemalloc.h
|
||||
)
|
||||
|
||||
find_library(JEMALLOC_LIBRARIES
|
||||
NAMES jemalloc
|
||||
HINTS ${JEMALLOC_ROOT_DIR}/lib
|
||||
)
|
||||
|
||||
find_path(JEMALLOC_INCLUDE_DIR
|
||||
NAMES jemalloc/jemalloc.h
|
||||
HINTS ${JEMALLOC_ROOT_DIR}/include
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(JeMalloc DEFAULT_MSG
|
||||
JEMALLOC_LIBRARIES
|
||||
JEMALLOC_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
JEMALLOC_ROOT_DIR
|
||||
JEMALLOC_LIBRARIES
|
||||
JEMALLOC_INCLUDE_DIR
|
||||
)
|
@@ -65,11 +65,11 @@ if (EXISTS "/etc/debian_version")
|
||||
set(DEBIAN_VERSION_NUMBER "${CMAKE_MATCH_1}")
|
||||
endif ()
|
||||
if ("${DEBIAN_VERSION_NUMBER}" EQUAL "8")
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, mariadb-columnstore-libs, mariadb-columnstore-server, libsnappy1")
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, mariadb-columnstore-libs, mariadb-columnstore-server, libsnappy1, libjemalloc1")
|
||||
elseif ("${DEBIAN_VERSION_NUMBER}" EQUAL "9")
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, mariadb-columnstore-libs, mariadb-columnstore-server, libsnappy1v5, libreadline5")
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, mariadb-columnstore-libs, mariadb-columnstore-server, libsnappy1v5, libreadline5, libjemalloc1")
|
||||
else()
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libboost-all-dev, libreadline-dev, rsync, libsnappy1v5, net-tools")
|
||||
SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libboost-all-dev, libreadline-dev, rsync, libsnappy1v5, net-tools, libjemalloc1")
|
||||
endif ()
|
||||
|
||||
SET(CPACK_DEBIAN_STORAGE-ENGINE_PACKAGE_DEPENDS "mariadb-columnstore-libs")
|
||||
|
@@ -91,9 +91,9 @@ if (${REDHAT_VERSION_NUMBER} EQUAL 6)
|
||||
# Disable auto require as this will also try to pull Boost via RPM
|
||||
SET(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
|
||||
elseif (${SUSE_VERSION_NUMBER} EQUAL 12)
|
||||
SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost-devel >= 1.54.0" "mariadb-columnstore-libs" "libsnappy1")
|
||||
SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost-devel >= 1.54.0" "mariadb-columnstore-libs" "libsnappy1" "jemalloc")
|
||||
else ()
|
||||
SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost >= 1.53.0" "mariadb-columnstore-libs" "snappy")
|
||||
SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost >= 1.53.0" "mariadb-columnstore-libs" "snappy" "jemalloc")
|
||||
endif()
|
||||
|
||||
SETA(CPACK_RPM_storage-engine_PACKAGE_REQUIRES "mariadb-columnstore-libs")
|
||||
|
@@ -759,8 +759,11 @@ int processCommand(string* arguments)
|
||||
vector<uint32_t> srcDbroots; // all of the currently configured dbroots
|
||||
vector<uint32_t> destDbroots; // srcDbroots - removeDbroots
|
||||
set<int>::iterator dbiter;
|
||||
|
||||
if (arguments[1] == "start")
|
||||
#if _MSC_VER
|
||||
if (_strnicmp(arguments[1].c_str(), "start", 5) == 0))
|
||||
#else
|
||||
if (strncasecmp(arguments[1].c_str(), "start", 5) == 0)
|
||||
#endif
|
||||
{
|
||||
// Get a list of all the configured dbroots in the xml file.
|
||||
DBRootConfigList dbRootConfigList;
|
||||
@@ -772,7 +775,11 @@ int processCommand(string* arguments)
|
||||
|
||||
// The user may choose to redistribute in such a way as to
|
||||
// leave certain dbroots empty, presumably for later removal.
|
||||
if (arguments[2] == "remove")
|
||||
#if _MSC_VER
|
||||
if (_strnicmp(arguments[1].c_str(), "remove", 6) == 0))
|
||||
#else
|
||||
if (strncasecmp(arguments[1].c_str(), "remove", 6) == 0)
|
||||
#endif
|
||||
{
|
||||
int dbroot;
|
||||
bool error = false;
|
||||
@@ -891,7 +898,11 @@ int processCommand(string* arguments)
|
||||
|
||||
SendToWES(oam, bs);
|
||||
}
|
||||
else if (arguments[1] == "stop")
|
||||
#if _MSC_VER
|
||||
if (_strnicmp(arguments[1].c_str(), "stop", 4) == 0))
|
||||
#else
|
||||
if (strncasecmp(arguments[1].c_str(), "stop", 4) == 0)
|
||||
#endif
|
||||
{
|
||||
ByteStream bs;
|
||||
// message WES ID, sequence #, action id
|
||||
@@ -901,7 +912,11 @@ int processCommand(string* arguments)
|
||||
bs.append((const ByteStream::byte*) &header, sizeof(header));
|
||||
SendToWES(oam, bs);
|
||||
}
|
||||
else if (arguments[1] == "status")
|
||||
#if _MSC_VER
|
||||
if (_strnicmp(arguments[1].c_str(), "status", 6) == 0))
|
||||
#else
|
||||
if (strncasecmp(arguments[1].c_str(), "status", 6) == 0)
|
||||
#endif
|
||||
{
|
||||
ByteStream bs;
|
||||
// message WES ID, sequence #, action id
|
||||
|
@@ -194,11 +194,16 @@ long long Convertor::convertDecimalString(
|
||||
|
||||
|
||||
// range check against int64
|
||||
if (dval > LLONG_MAX || dval < LLONG_MIN)
|
||||
if (dval > LLONG_MAX)
|
||||
{
|
||||
errno = ERANGE;
|
||||
|
||||
else
|
||||
|
||||
return LLONG_MAX;
|
||||
}
|
||||
if (dval < LLONG_MIN)
|
||||
{
|
||||
errno = ERANGE;
|
||||
return LLONG_MIN;
|
||||
}
|
||||
errno = 0;
|
||||
|
||||
ret = dval;
|
||||
|
Reference in New Issue
Block a user