Skip to content

Commit 951fa67

Browse files
committed
Merge remote-tracking branch 'origin/master' into analyzer-fix-param-view-alias
2 parents 7aab28b + 61df8aa commit 951fa67

File tree

1,610 files changed

+99671
-260189
lines changed

Some content is hidden

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

1,610 files changed

+99671
-260189
lines changed

.clang-tidy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ Checks: [
9696
'-modernize-use-default-member-init',
9797
'-modernize-use-emplace',
9898
'-modernize-use-nodiscard',
99-
'-modernize-use-override',
10099
'-modernize-use-trailing-return-type',
101100

102101
'-performance-inefficient-string-concatenation',
@@ -120,7 +119,6 @@ Checks: [
120119
'-readability-named-parameter',
121120
'-readability-redundant-declaration',
122121
'-readability-simplify-boolean-expr',
123-
'-readability-static-accessed-through-instance',
124122
'-readability-suspicious-call-argument',
125123
'-readability-uppercase-literal-suffix',
126124
'-readability-use-anyofallof',

.github/workflows/master.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
clear-repository: true # to ensure correct digests
2424
fetch-depth: 0 # to get version
2525
filter: tree:0
26+
- name: Merge sync PR
27+
run: |
28+
cd "$GITHUB_WORKSPACE/tests/ci"
29+
python3 sync_pr.py --merge || :
2630
- name: Python unit tests
2731
run: |
2832
cd "$GITHUB_WORKSPACE/tests/ci"
@@ -234,14 +238,15 @@ jobs:
234238
build_name: binary_riscv64
235239
data: ${{ needs.RunConfig.outputs.data }}
236240
checkout_depth: 0
237-
BuilderBinS390X:
238-
needs: [RunConfig, BuilderDebRelease]
239-
if: ${{ !failure() && !cancelled() }}
240-
uses: ./.github/workflows/reusable_build.yml
241-
with:
242-
build_name: binary_s390x
243-
data: ${{ needs.RunConfig.outputs.data }}
244-
checkout_depth: 0
241+
# disabled because s390x refused to build in the migration to OpenSSL
242+
# BuilderBinS390X:
243+
# needs: [RunConfig, BuilderDebRelease]
244+
# if: ${{ !failure() && !cancelled() }}
245+
# uses: ./.github/workflows/reusable_build.yml
246+
# with:
247+
# build_name: binary_s390x
248+
# data: ${{ needs.RunConfig.outputs.data }}
249+
# checkout_depth: 0
245250
############################################################################################
246251
##################################### Docker images #######################################
247252
############################################################################################
@@ -292,7 +297,7 @@ jobs:
292297
- BuilderBinFreeBSD
293298
- BuilderBinPPC64
294299
- BuilderBinRISCV64
295-
- BuilderBinS390X
300+
# - BuilderBinS390X # disabled because s390x refused to build in the migration to OpenSSL
296301
- BuilderBinAmd64Compat
297302
- BuilderBinAarch64V80Compat
298303
- BuilderBinClangTidy

.github/workflows/pull_request.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
8484
RCSK
8585
FastTest:
86-
needs: [RunConfig, StyleCheck]
86+
needs: [RunConfig, BuildDockers]
8787
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).jobs_data.jobs_to_do, 'Fast test') }}
8888
uses: ./.github/workflows/reusable_test.yml
8989
with:
@@ -158,15 +158,24 @@ jobs:
158158
#
159159
FinishCheck:
160160
if: ${{ !failure() && !cancelled() }}
161-
needs: [Tests_1, Tests_2]
161+
needs: [Tests_1, Tests_2, Builds_1_Report, Builds_2_Report]
162162
runs-on: [self-hosted, style-checker]
163163
steps:
164164
- name: Check out repository code
165165
uses: ClickHouse/checkout@v1
166+
- name: Check sync status
167+
if: ${{ github.event_name == 'merge_group' }}
168+
run: |
169+
cd "$GITHUB_WORKSPACE/tests/ci"
170+
python3 sync_pr.py --status
166171
- name: Finish label
167172
run: |
168173
cd "$GITHUB_WORKSPACE/tests/ci"
169174
python3 finish_check.py
175+
- name: Auto merge if approved
176+
if: ${{ github.event_name != 'merge_group' }}
177+
run: |
178+
cd "$GITHUB_WORKSPACE/tests/ci"
170179
python3 merge_pr.py --check-approved
171180
172181

.gitmodules

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
[submodule "contrib/capnproto"]
2323
path = contrib/capnproto
2424
url = https://github.com/ClickHouse/capnproto
25-
[submodule "contrib/double-conversion"]
26-
path = contrib/double-conversion
27-
url = https://github.com/google/double-conversion
2825
[submodule "contrib/re2"]
2926
path = contrib/re2
3027
url = https://github.com/google/re2
@@ -176,9 +173,6 @@
176173
[submodule "contrib/libpq"]
177174
path = contrib/libpq
178175
url = https://github.com/ClickHouse/libpq
179-
[submodule "contrib/boringssl"]
180-
path = contrib/boringssl
181-
url = https://github.com/ClickHouse/boringssl
182176
[submodule "contrib/NuRaft"]
183177
path = contrib/NuRaft
184178
url = https://github.com/ClickHouse/NuRaft
@@ -278,9 +272,6 @@
278272
[submodule "contrib/crc32-s390x"]
279273
path = contrib/crc32-s390x
280274
url = https://github.com/linux-on-ibm-z/crc32-s390x
281-
[submodule "contrib/openssl"]
282-
path = contrib/openssl
283-
url = https://github.com/openssl/openssl
284275
[submodule "contrib/google-benchmark"]
285276
path = contrib/google-benchmark
286277
url = https://github.com/google/benchmark
@@ -326,6 +317,9 @@
326317
[submodule "contrib/crc32-vpmsum"]
327318
path = contrib/crc32-vpmsum
328319
url = https://github.com/antonblanchard/crc32-vpmsum.git
320+
[submodule "contrib/expected"]
321+
path = contrib/expected
322+
url = https://github.com/TartanLlama/expected
329323
[submodule "contrib/liburing"]
330324
path = contrib/liburing
331325
url = https://github.com/axboe/liburing
@@ -369,3 +363,9 @@
369363
[submodule "contrib/idna"]
370364
path = contrib/idna
371365
url = https://github.com/ada-url/idna.git
366+
[submodule "contrib/openssl"]
367+
path = contrib/openssl
368+
url = https://github.com/ClickHouse/openssl.git
369+
[submodule "contrib/double-conversion"]
370+
path = contrib/double-conversion
371+
url = https://github.com/ClickHouse/double-conversion.git

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123
* Something was wrong with Apache Hive, which is experimental and not supported. [#60262](https://github.com/ClickHouse/ClickHouse/pull/60262) ([shanfengp](https://github.com/Aed-p)).
124124
* An improvement for experimental parallel replicas: force reanalysis if parallel replicas changed [#60362](https://github.com/ClickHouse/ClickHouse/pull/60362) ([Raúl Marín](https://github.com/Algunenano)).
125125
* Fix usage of plain metadata type with new disks configuration option [#60396](https://github.com/ClickHouse/ClickHouse/pull/60396) ([Kseniia Sumarokova](https://github.com/kssenii)).
126-
* Don't allow to set max_parallel_replicas to 0 as it doesn't make sense [#60430](https://github.com/ClickHouse/ClickHouse/pull/60430) ([Kruglov Pavel](https://github.com/Avogar)).
127126
* Try to fix logical error 'Cannot capture column because it has incompatible type' in mapContainsKeyLike [#60451](https://github.com/ClickHouse/ClickHouse/pull/60451) ([Kruglov Pavel](https://github.com/Avogar)).
128127
* Avoid calculation of scalar subqueries for CREATE TABLE. [#60464](https://github.com/ClickHouse/ClickHouse/pull/60464) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
129128
* Fix deadlock in parallel parsing when lots of rows are skipped due to errors [#60516](https://github.com/ClickHouse/ClickHouse/pull/60516) ([Kruglov Pavel](https://github.com/Avogar)).

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,6 @@ endif ()
455455

456456
enable_testing() # Enable for tests without binary
457457

458-
option(ENABLE_OPENSSL "This option performs a build with OpenSSL. NOTE! This option is insecure and should never be used. By default, ClickHouse uses and only supports BoringSSL" OFF)
459-
460458
if (ARCH_S390X)
461459
set(ENABLE_OPENSSL_DYNAMIC_DEFAULT ON)
462460
else ()

base/base/scope_guard.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ class [[nodiscard]] BasicScopeGuard
2929
requires std::is_convertible_v<G, F>
3030
constexpr BasicScopeGuard & operator=(BasicScopeGuard<G> && src) // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved, cppcoreguidelines-noexcept-move-operations)
3131
{
32-
if (this != &src)
32+
if constexpr (std::is_same_v<G, F>)
3333
{
34-
invoke();
35-
function = src.release();
34+
if (this == &src)
35+
return *this;
3636
}
37+
invoke();
38+
function = src.release();
3739
return *this;
3840
}
3941

base/base/wide_integer_impl.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
#include <tuple>
1414
#include <limits>
1515

16-
#include <boost/math/special_functions/fpclassify.hpp>
17-
1816
// NOLINTBEGIN(*)
1917

2018
/// Use same extended double for all platforms
2119
#if (LDBL_MANT_DIG == 64)
2220
#define CONSTEXPR_FROM_DOUBLE constexpr
2321
using FromDoubleIntermediateType = long double;
2422
#else
23+
#include <boost/math/special_functions/fpclassify.hpp>
2524
#include <boost/multiprecision/cpp_bin_float.hpp>
2625
/// `wide_integer_from_builtin` can't be constexpr with non-literal `cpp_bin_float_double_extended`
2726
#define CONSTEXPR_FROM_DOUBLE
@@ -309,6 +308,13 @@ struct integer<Bits, Signed>::_impl
309308
constexpr uint64_t max_int = std::numeric_limits<uint64_t>::max();
310309
static_assert(std::is_same_v<T, double> || std::is_same_v<T, FromDoubleIntermediateType>);
311310
/// Implementation specific behaviour on overflow (if we don't check here, stack overflow will triggered in bigint_cast).
311+
#if (LDBL_MANT_DIG == 64)
312+
if (!std::isfinite(t))
313+
{
314+
self = 0;
315+
return;
316+
}
317+
#else
312318
if constexpr (std::is_same_v<T, double>)
313319
{
314320
if (!std::isfinite(t))
@@ -325,6 +331,7 @@ struct integer<Bits, Signed>::_impl
325331
return;
326332
}
327333
}
334+
#endif
328335

329336
const T alpha = t / static_cast<T>(max_int);
330337

base/poco/Crypto/src/OpenSSLInitializer.cpp

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#include <openssl/conf.h>
2424
#endif
2525

26+
#if __has_feature(address_sanitizer)
27+
#include <sanitizer/lsan_interface.h>
28+
#endif
2629

2730
using Poco::RandomInputStream;
2831
using Poco::Thread;
@@ -67,21 +70,27 @@ void OpenSSLInitializer::initialize()
6770
SSL_library_init();
6871
SSL_load_error_strings();
6972
OpenSSL_add_all_algorithms();
70-
73+
7174
char seed[SEEDSIZE];
7275
RandomInputStream rnd;
7376
rnd.read(seed, sizeof(seed));
74-
RAND_seed(seed, SEEDSIZE);
75-
77+
{
78+
# if __has_feature(address_sanitizer)
79+
/// Leak sanitizer (part of address sanitizer) thinks that a few bytes of memory in OpenSSL are allocated during but never released.
80+
__lsan::ScopedDisabler lsan_disabler;
81+
#endif
82+
RAND_seed(seed, SEEDSIZE);
83+
}
84+
7685
int nMutexes = CRYPTO_num_locks();
7786
_mutexes = new Poco::FastMutex[nMutexes];
7887
CRYPTO_set_locking_callback(&OpenSSLInitializer::lock);
7988
// Not needed on Windows (see SF #110: random unhandled exceptions when linking with ssl).
8089
// https://sourceforge.net/p/poco/bugs/110/
8190
//
8291
// From http://www.openssl.org/docs/crypto/threads.html :
83-
// "If the application does not register such a callback using CRYPTO_THREADID_set_callback(),
84-
// then a default implementation is used - on Windows and BeOS this uses the system's
92+
// "If the application does not register such a callback using CRYPTO_THREADID_set_callback(),
93+
// then a default implementation is used - on Windows and BeOS this uses the system's
8594
// default thread identifying APIs"
8695
CRYPTO_set_id_callback(&OpenSSLInitializer::id);
8796
CRYPTO_set_dynlock_create_callback(&OpenSSLInitializer::dynlockCreate);
@@ -100,7 +109,7 @@ void OpenSSLInitializer::uninitialize()
100109
CRYPTO_set_locking_callback(0);
101110
CRYPTO_set_id_callback(0);
102111
delete [] _mutexes;
103-
112+
104113
CONF_modules_free();
105114
}
106115
}

base/poco/Foundation/src/pcre_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4835,7 +4835,7 @@ for (;; ptr++)
48354835
48364836
If the class contains characters outside the 0-255 range, a different
48374837
opcode is compiled. It may optionally have a bit map for characters < 256,
4838-
but those above are are explicitly listed afterwards. A flag byte tells
4838+
but those above are explicitly listed afterwards. A flag byte tells
48394839
whether the bitmap is present, and whether this is a negated class or not.
48404840
48414841
In JavaScript compatibility mode, an isolated ']' causes an error. In

0 commit comments

Comments
 (0)