Skip to content

Commit 5a21440

Browse files
authored
Merge pull request mariadb-corporation#2839 from tntnatbry/develop-23.02-changes-for-develop
develop-23.02 changes for develop.
2 parents 0be1c3d + f4af756 commit 5a21440

File tree

9 files changed

+60
-11
lines changed

9 files changed

+60
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ build/Testing/
177177
tests/*\[1\]_tests.cmake
178178
tests/*\[1\]_include.cmake
179179
.boost
180+
build/.cmake
180181
*.vtg
181182
*.vtg-back
182183
'*.vtg-Stashed changes'

CMakeLists.txt

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1+
if (CMAKE_VERSION VERSION_LESS 3.10.0)
2+
MESSAGE_ONCE(CS_CMAKE "ColumnStore needs cmake >= 3.10")
3+
RETURN()
4+
ENDIF()
5+
16
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
27

38
PROJECT(Columnstore)
9+
INCLUDE (CheckCXXSourceCompiles)
10+
11+
FOREACH(p CMP0135)
12+
IF(POLICY ${p})
13+
CMAKE_POLICY(SET ${p} NEW)
14+
ENDIF()
15+
ENDFOREACH()
416

517
IF(NOT INSTALL_LAYOUT)
618
IF(NOT CMAKE_BUILD_TYPE)
@@ -50,6 +62,19 @@ ELSE()
5062
ENDIF()
5163
ENDIF()
5264

65+
CHECK_CXX_SOURCE_COMPILES(
66+
"#include <set>
67+
int main()
68+
{
69+
std::set<int> s = {1, 2, 3, 4};
70+
return s.contains(2);
71+
}" HAVE_STD_SET_CONTAINS)
72+
73+
IF (NOT HAVE_STD_SET_CONTAINS)
74+
MESSAGE_ONCE(CS_NO_CONTAINS "std::set does not have contains() method")
75+
RETURN()
76+
ENDIF()
77+
5378
# There is an inconsistency b/w default char signedness at ARM and x86.
5479
# This flag explicitly sets char as signed.
5580
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char")
@@ -119,6 +144,7 @@ INCLUDE(columnstore_version)
119144
INCLUDE(misc)
120145
INCLUDE(boost)
121146
INCLUDE(thrift)
147+
INCLUDE(mpark_patterns)
122148

123149
FIND_PACKAGE(BISON)
124150
IF (NOT BISON_FOUND)
@@ -363,13 +389,6 @@ IF(NOT TARGET columnstore)
363389
RETURN()
364390
ENDIF()
365391

366-
set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/external)
367-
ExternalProject_Add(mpark_patterns
368-
GIT_REPOSITORY https://github.com/mpark/patterns
369-
GIT_TAG v0.3.0
370-
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
371-
)
372-
373392
ADD_SUBDIRECTORY(utils)
374393
ADD_SUBDIRECTORY(oam/oamcpp)
375394
ADD_SUBDIRECTORY(dbcon/execplan)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
COLUMNSTORE_VERSION_MAJOR=23
2-
COLUMNSTORE_VERSION_MINOR=02
2+
COLUMNSTORE_VERSION_MINOR=08
33
COLUMNSTORE_VERSION_PATCH=1
44
COLUMNSTORE_VERSION_RELEASE=1

cmake/mpark_patterns.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
include(ExternalProject)
2+
3+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
4+
set(_toolset "gcc")
5+
elseif(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
6+
set(_toolset "clang")
7+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
8+
set(_toolset "intel-linux")
9+
endif()
10+
11+
ExternalProject_Add(mpark_patterns
12+
PREFIX external/patterns
13+
URL https://github.com/mpark/patterns/archive/refs/tags/v0.3.0.tar.gz
14+
URL_HASH SHA256=80e6af808a4d74d5d7358666303eb1dbfc5582313ff9fa31d1c0d3280d3bd9e7
15+
BUILD_IN_SOURCE TRUE
16+
LOG_BUILD TRUE
17+
LOG_INSTALL TRUE
18+
EXCLUDE_FROM_ALL TRUE
19+
)

debian/mariadb-plugin-columnstore.install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ usr/bin/ddlcleanup
2929
usr/bin/editem
3030
usr/bin/idbmeminfo
3131
usr/bin/load_brm
32+
usr/bin/loop_process_starter.sh
3233
usr/bin/mariadb-columnstore-start.sh
3334
usr/bin/mariadb-columnstore-stop.sh
3435
usr/bin/mcs-savebrm.py

oam/install_scripts/mcs-savebrm.py.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ def is_primary_fallback(current_hostname):
118118
hostnames = set()
119119
for _, nic_name in socket.if_nameindex():
120120
ip_addr = get_ip_address_by_nic(nic_name)
121-
if ip_addr:
121+
try:
122122
hostnames_3tuple = socket.gethostbyaddr(ip_addr)
123123
hostnames.update([hostnames_3tuple[0], *hostnames_3tuple[1]])
124+
except:
125+
pass
124126
logging.debug('Found hostnames {}.'.format(hostnames))
125127
return current_hostname in hostnames
126128

utils/funcexp/func_lcase.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ std::string Func_lcase::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
5353

5454
CHARSET_INFO* cs = colType.getCharset();
5555
uint64_t inLen = tstr.length();
56+
#if MYSQL_VERSION_ID >= 101004
57+
uint64_t bufLen = inLen * cs->casedn_multiply();
58+
#else
5659
uint64_t bufLen = inLen * cs->casedn_multiply;
60+
#endif
5761
char* outBuf = new char[bufLen];
5862

5963
uint64_t outLen = cs->casedn(tstr.str(), inLen, outBuf, bufLen);

utils/funcexp/func_ucase.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ std::string Func_ucase::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
6262

6363
CHARSET_INFO* cs = colType.getCharset();
6464
uint64_t inLen = tstr.length();
65-
uint64_t bufLen = inLen * cs->caseup_multiply;
65+
#if MYSQL_VERSION_ID >= 101004
66+
uint64_t bufLen = inLen * cs->casedn_multiply();
67+
#else
68+
uint64_t bufLen = inLen * cs->casedn_multiply;
69+
#endif
6670
char* outBuf = new char[bufLen];
6771

6872
uint64_t outLen = cs->caseup(tstr.str(), inLen, outBuf, bufLen);

utils/messageqcpp/messagequeuepool.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
1616
MA 02110-1301, USA. */
1717

18-
#include <memory>
1918
#include <sstream>
2019
#include <map>
2120
#include <time.h>

0 commit comments

Comments
 (0)