Skip to content

Commit cf884d2

Browse files
committed
Merge remote-tracking branch 'origin/master' into rs/48385
2 parents ee49f8f + b5eddf3 commit cf884d2

316 files changed

Lines changed: 8860 additions & 5472 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# 2023 Changelog
99

10-
### <a id="234"></a> ClickHouse release 23.4 LTS, 2023-04-26
10+
### <a id="234"></a> ClickHouse release 23.4, 2023-04-26
1111

1212
#### Backward Incompatible Change
1313
* Formatter '%M' in function formatDateTime() now prints the month name instead of the minutes. This makes the behavior consistent with MySQL. The previous behavior can be restored using setting "formatdatetime_parsedatetime_m_is_month_name = 0". [#47246](https://github.com/ClickHouse/ClickHouse/pull/47246) ([Robert Schulze](https://github.com/rschu1ze)).

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ if (OS_DARWIN)
176176
set (ENABLE_CURL_BUILD OFF)
177177
endif ()
178178

179+
option(ENABLE_ISAL_LIBRARY "Enable ISA-L library ON by default except on aarch64." ON)
180+
if (ARCH_AARCH64)
181+
# Disable ISA-L libray on aarch64.
182+
set (ENABLE_ISAL_LIBRARY OFF)
183+
endif ()
184+
179185
if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE")
180186
# Can be lld or ld-lld or lld-13 or /path/to/lld.
181187
if (LINKER_NAME MATCHES "lld")

cmake/fuzzer.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ if (FUZZER)
77
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} -fsanitize=fuzzer-no-link")
88
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SAN_FLAGS} -fsanitize=fuzzer-no-link")
99

10-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
11-
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=fuzzer-no-link")
12-
endif()
13-
1410
# NOTE: oss-fuzz can change LIB_FUZZING_ENGINE variable
1511
if (NOT LIB_FUZZING_ENGINE)
1612
set (LIB_FUZZING_ENGINE "-fsanitize=fuzzer")

cmake/sanitize.cmake

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,24 @@ if (SANITIZE)
1616
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} ${ASAN_FLAGS}")
1717
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SAN_FLAGS} ${ASAN_FLAGS}")
1818

19-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
20-
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ASAN_FLAGS}")
21-
endif()
22-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
23-
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libasan")
24-
endif ()
25-
2619
elseif (SANITIZE STREQUAL "memory")
2720
# MemorySanitizer flags are set according to the official documentation:
2821
# https://clang.llvm.org/docs/MemorySanitizer.html#usage
29-
#
30-
# For now, it compiles with `cmake -DSANITIZE=memory -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS_ADD="-O1" -DCMAKE_C_FLAGS_ADD="-O1"`
31-
# Compiling with -DCMAKE_BUILD_TYPE=Debug leads to ld.lld failures because
32-
# of large files (was not tested with ld.gold). This is why we compile with
33-
# RelWithDebInfo, and downgrade optimizations to -O1 but not to -Og, to
34-
# keep the binary size down.
35-
# TODO: try compiling with -Og and with ld.gold.
22+
23+
# Linking can fail due to relocation overflows (see #49145), caused by too big object files / libraries.
24+
# Work around this with position-independent builds (-fPIC and -fpie), this is slightly slower than non-PIC/PIE but that's okay.
3625
set (MSAN_FLAGS "-fsanitize=memory -fsanitize-memory-use-after-dtor -fsanitize-memory-track-origins -fno-optimize-sibling-calls -fPIC -fpie -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/tests/msan_suppressions.txt")
3726
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} ${MSAN_FLAGS}")
3827
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SAN_FLAGS} ${MSAN_FLAGS}")
3928

40-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
41-
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=memory")
42-
endif()
43-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
44-
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libmsan")
45-
endif ()
46-
4729
elseif (SANITIZE STREQUAL "thread")
4830
set (TSAN_FLAGS "-fsanitize=thread")
4931
if (COMPILER_CLANG)
5032
set (TSAN_FLAGS "${TSAN_FLAGS} -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/tests/tsan_suppressions.txt")
5133
endif()
5234

53-
5435
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} ${TSAN_FLAGS}")
5536
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SAN_FLAGS} ${TSAN_FLAGS}")
56-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
57-
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=thread")
58-
endif()
59-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
60-
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libtsan")
61-
endif ()
6237

6338
elseif (SANITIZE STREQUAL "undefined")
6439
set (UBSAN_FLAGS "-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=float-divide-by-zero")
@@ -77,12 +52,6 @@ if (SANITIZE)
7752

7853
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} ${UBSAN_FLAGS}")
7954
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SAN_FLAGS} ${UBSAN_FLAGS}")
80-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
81-
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined")
82-
endif()
83-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
84-
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libubsan")
85-
endif ()
8655

8756
# llvm-tblgen, that is used during LLVM build, doesn't work with UBSan.
8857
set (ENABLE_EMBEDDED_COMPILER 0 CACHE BOOL "")

contrib/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ add_contrib (google-benchmark-cmake google-benchmark)
191191

192192
add_contrib (ulid-c-cmake ulid-c)
193193

194-
add_contrib (isa-l-cmake isa-l)
194+
if (ENABLE_ISAL_LIBRARY)
195+
add_contrib (isa-l-cmake isa-l)
196+
endif()
195197

196198
# Put all targets defined here and in subdirectories under "contrib/<immediate-subdir>" folders in GUI-based IDEs.
197199
# Some of third-party projects may override CMAKE_FOLDER or FOLDER property of their targets, so they would not appear

contrib/curl

Submodule curl updated 2579 files

contrib/curl-cmake/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ set (SRCS
1212
"${LIBRARY_DIR}/lib/noproxy.c"
1313
"${LIBRARY_DIR}/lib/idn.c"
1414
"${LIBRARY_DIR}/lib/cfilters.c"
15+
"${LIBRARY_DIR}/lib/cf-socket.c"
16+
"${LIBRARY_DIR}/lib/cf-haproxy.c"
17+
"${LIBRARY_DIR}/lib/cf-https-connect.c"
1518
"${LIBRARY_DIR}/lib/file.c"
1619
"${LIBRARY_DIR}/lib/timeval.c"
1720
"${LIBRARY_DIR}/lib/base64.c"
@@ -37,8 +40,8 @@ set (SRCS
3740
"${LIBRARY_DIR}/lib/strcase.c"
3841
"${LIBRARY_DIR}/lib/easy.c"
3942
"${LIBRARY_DIR}/lib/curl_fnmatch.c"
43+
"${LIBRARY_DIR}/lib/curl_log.c"
4044
"${LIBRARY_DIR}/lib/fileinfo.c"
41-
"${LIBRARY_DIR}/lib/wildcard.c"
4245
"${LIBRARY_DIR}/lib/krb5.c"
4346
"${LIBRARY_DIR}/lib/memdebug.c"
4447
"${LIBRARY_DIR}/lib/http_chunks.c"
@@ -96,6 +99,7 @@ set (SRCS
9699
"${LIBRARY_DIR}/lib/rand.c"
97100
"${LIBRARY_DIR}/lib/curl_multibyte.c"
98101
"${LIBRARY_DIR}/lib/conncache.c"
102+
"${LIBRARY_DIR}/lib/cf-h1-proxy.c"
99103
"${LIBRARY_DIR}/lib/http2.c"
100104
"${LIBRARY_DIR}/lib/smb.c"
101105
"${LIBRARY_DIR}/lib/curl_endian.c"
@@ -113,12 +117,13 @@ set (SRCS
113117
"${LIBRARY_DIR}/lib/altsvc.c"
114118
"${LIBRARY_DIR}/lib/socketpair.c"
115119
"${LIBRARY_DIR}/lib/bufref.c"
120+
"${LIBRARY_DIR}/lib/bufq.c"
116121
"${LIBRARY_DIR}/lib/dynbuf.c"
122+
"${LIBRARY_DIR}/lib/dynhds.c"
117123
"${LIBRARY_DIR}/lib/hsts.c"
118124
"${LIBRARY_DIR}/lib/http_aws_sigv4.c"
119125
"${LIBRARY_DIR}/lib/mqtt.c"
120126
"${LIBRARY_DIR}/lib/rename.c"
121-
"${LIBRARY_DIR}/lib/h2h3.c"
122127
"${LIBRARY_DIR}/lib/headers.c"
123128
"${LIBRARY_DIR}/lib/timediff.c"
124129
"${LIBRARY_DIR}/lib/vauth/vauth.c"
@@ -133,6 +138,7 @@ set (SRCS
133138
"${LIBRARY_DIR}/lib/vauth/oauth2.c"
134139
"${LIBRARY_DIR}/lib/vauth/spnego_gssapi.c"
135140
"${LIBRARY_DIR}/lib/vauth/spnego_sspi.c"
141+
"${LIBRARY_DIR}/lib/vquic/vquic.c"
136142
"${LIBRARY_DIR}/lib/vtls/openssl.c"
137143
"${LIBRARY_DIR}/lib/vtls/gtls.c"
138144
"${LIBRARY_DIR}/lib/vtls/vtls.c"
@@ -147,9 +153,6 @@ set (SRCS
147153
"${LIBRARY_DIR}/lib/vtls/keylog.c"
148154
"${LIBRARY_DIR}/lib/vtls/x509asn1.c"
149155
"${LIBRARY_DIR}/lib/vtls/hostcheck.c"
150-
"${LIBRARY_DIR}/lib/vquic/ngtcp2.c"
151-
"${LIBRARY_DIR}/lib/vquic/quiche.c"
152-
"${LIBRARY_DIR}/lib/vquic/msh3.c"
153156
"${LIBRARY_DIR}/lib/vssh/libssh2.c"
154157
"${LIBRARY_DIR}/lib/vssh/libssh.c"
155158
)

contrib/isa-l-cmake/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
set(ISAL_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/isa-l")
22

3-
# check nasm compiler
3+
# The YASM and NASM assembers are somewhat mutually compatible. ISAL specifically needs NASM. If only YASM is installed, then check_language(ASM_NASM)
4+
# below happily finds YASM, leading to weird errors at build time. Therefore, do an explicit check for NASM here.
5+
find_program(NASM_PATH NAMES nasm)
6+
if (NOT NASM_PATH)
7+
message(FATAL_ERROR "Please install NASM from 'https://www.nasm.us/' because NASM compiler can not be found!")
8+
endif ()
9+
410
include(CheckLanguage)
511
check_language(ASM_NASM)
612
if(NOT CMAKE_ASM_NASM_COMPILER)

contrib/libhdfs3-cmake/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ if (TARGET OpenSSL::SSL)
172172
target_link_libraries(_hdfs3 PRIVATE OpenSSL::Crypto OpenSSL::SSL)
173173
endif()
174174

175-
target_link_libraries(_hdfs3 PRIVATE ch_contrib::isal)
176-
add_definitions(-DHADOOP_ISAL_LIBRARY)
175+
if (ENABLE_ISAL_LIBRARY)
176+
target_link_libraries(_hdfs3 PRIVATE ch_contrib::isal)
177+
add_definitions(-DHADOOP_ISAL_LIBRARY)
178+
endif()
177179

178180
add_library(ch_contrib::hdfs ALIAS _hdfs3)
179181

docker/test/util/process_functional_tests_result.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,9 @@ def process_test_log(log_path, broken_tests):
8080
test_results.append(
8181
(
8282
test_name,
83-
"FAIL",
83+
"SKIPPED",
8484
test_time,
85-
[
86-
"Test is expected to fail! Please, update broken_tests.txt!\n"
87-
],
85+
["This test passed. Update broken_tests.txt.\n"],
8886
)
8987
)
9088
else:

0 commit comments

Comments
 (0)