Commit Graph

93305 Commits

Author SHA1 Message Date
Azat Khuzhin
d99851bcbe Fix googletest contrib compilation (due to GTEST_HAS_POSIX_RE=0)
By some reason cmake rules for googletest sets GTEST_HAS_POSIX_RE=0
(Compatibilty? But which platform that does support ClickHouse does not
have it?)

But everything will be okay, if these macros was set PUBLIC (i.e. for
compiling googletest library itself and it's users), however it was
added as INTERFACE only (so library itself does not know about
GTEST_HAS_POSIX_RE=0), and this leads to UB, here ASan report (while I
was trying to use ASSERT_EXIT()).

<details>

<summary>ASan report</summary>

    [ RUN      ] Common.LSan
    =================================================================
    ==7566==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6030005b2388 at pc 0x00000d00924c bp 0x7ffcd3b7cfb0 sp 0x7ffcd3b7c770
    WRITE of size 64 at 0x6030005b2388 thread T0
        0 0xd00924b in regcomp (/bld/src/unit_tests_dbms+0xd00924b) (BuildId: 40d3fa83125f9047)
        1 0x29ca243b in testing::internal::RE::Init(char const*) /bld/./contrib/googletest/googletest/src/gtest-port.cc:750:15
        2 0xd4d92b3 in testing::internal::RE::RE(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /bld/./contrib/googletest/googletest/include/gtest/internal/gtest-port.h:896:36
        3 0xd4d92b3 in testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> testing::ContainsRegex<char const*>(char const* const&) /bld/./contrib/googletest/googletest/include/gtest/gtest-matchers.h:868:28
        4 0xd4d813a in testing::internal::MakeDeathTestMatcher(char const*) /bld/./contrib/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h:173:10
        5 0xd4d813a in Common_LSan_Test::TestBody() /bld/./src/Common/tests/gtest_lsan.cpp:11:5

    0x6030005b2388 is located 0 bytes to the right of 24-byte region [0x6030005b2370,0x6030005b2388)
    allocated by thread T0 here:
        0 0xd066fbd in operator new(unsigned long) (/bld/src/unit_tests_dbms+0xd066fbd) (BuildId: 40d3fa83125f9047)
        1 0xd4d913d in testing::PolymorphicMatcher<testing::internal::MatchesRegexMatcher> testing::ContainsRegex<char const*>(char const* const&) /bld/./contrib/googletest/googletest/include/gtest/gtest-matchers.h:868:24
        2 0xd4d813a in testing::internal::MakeDeathTestMatcher(char const*) /bld/./contrib/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h:173:10
        3 0xd4d813a in Common_LSan_Test::TestBody() /bld/./src/Common/tests/gtest_lsan.cpp:11:5

</details>
2022-07-17 17:24:02 +03:00
Jordi Villar
d86abba2c6 Fix macosx compilation due to endian.h 2022-07-17 14:58:27 +02:00
Mikhail f. Shiryaev
9cc06ea0e4
Fix found points during the review 2022-07-17 14:05:21 +02:00
Kseniia Sumarokova
4b11a718cb
Update fetchPostgreSQLTableStructure.cpp 2022-07-17 11:55:34 +02:00
Azat Khuzhin
30018ce5d3 Fix running cmake with predefined cache (for development only)
Right now cmake add the following options only if USE_STATIC_LIBRARIES
is OFF:
- SPLIT_SHARED_LIBRARIES
- CLICKHOUSE_SPLIT_BINARY

And this breaks the following usage:

    $ cmake ..
    $ cat > debug-build-cache.cmake
    set(USE_STATIC_LIBRARIES              OFF CACHE BOOL "")
    set(SPLIT_SHARED_LIBRARIES            ON  CACHE BOOL "")
    set(CLICKHOUSE_SPLIT_BINARY           ON  CACHE BOOL "")
    ^D
    $ cmake -C debug-build-cache.cmake ..
    CMake Error at CMakeLists.txt:83 (message):
      Defining SPLIT_SHARED_LIBRARIES=1 without USE_STATIC_LIBRARIES=0 has no
      effect.

Since with this initial cache we have the following:

- USE_STATIC_LIBRARIES=OFF (because it was already set)
- SPLIT_SHARED_LIBRARIES=ON (was not set before, so new value)
- CLICKHOUSE_SPLIT_BINARY (was not set before, also new value)

Yes this is not the common usage, but it seems that it is pretty easy to
avoid.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-17 12:18:24 +03:00
Wangyang Guo
c07c65615d fix ENABLE_MULTITARGET_CODE not defined warning in some builds 2022-07-17 12:21:10 +08:00
Vitaly Baranov
e0fb03d1b6
Merge pull request #38970 from vitlibar/select-from-system-db-requires-grant
SELECT from the system database requires grant now
2022-07-16 22:37:47 +02:00
Anton Popov
b0333f463e
Merge pull request #39288 from ClickHouse/kssenii-patch-4
Fix clang tidy
2022-07-16 20:16:35 +02:00
Kseniia Sumarokova
3f43641b18
Update MergedColumnOnlyOutputStream.cpp 2022-07-16 16:32:33 +02:00
Wangyang Guo
7ef3f56066 lz4 decompress: coding style fix 2022-07-16 22:10:16 +08:00
Mikhail f. Shiryaev
533c788803
Merge pull request #39281 from azat/fix-builder
Fix builder image for releases w/o diagnostics tool
2022-07-16 15:59:37 +02:00
Alexey Milovidov
e37caa5bd6
Merge pull request #39216 from Algunenano/rotational_error
Don't report system.errors when the disk is not rotational
2022-07-16 16:16:52 +03:00
alesapin
afd5c40335
Merge pull request #39190 from ClickHouse/fix_race_with_concurrent_hardlinks
Fix extremely rare race condition in hardlinks creation
2022-07-16 13:57:02 +02:00
Azat Khuzhin
accb0e38da Remove superior atomic from MergeTreeBackgroundExecutor and annotations for TSA
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-16 14:00:39 +03:00
kssenii
9bba55110c Fix 2022-07-16 12:44:47 +02:00
Azat Khuzhin
1ef9910453 Fix builder image for releases w/o diagnostics tool
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-16 12:07:58 +03:00
Sergei Trifonov
82f98cfe6b remove initial linear growth, increase avg period to 3 sec 2022-07-16 02:17:18 +02:00
Igor Nikonov
ef0ef9e03b
Merge pull request #39191 from ClickHouse/sort_transform_cleanup
Cleanup: done during #38719 (SortingStep: deduce way to sort based on input stream sort)
2022-07-16 01:53:58 +02:00
Sergei Trifonov
8a5286ea4c fix cpu usage metric in client 2022-07-16 00:27:26 +02:00
Ilya Yatsishin
43ed3df474
Merge pull request #39225 from qoega/query-log-fix-result-bytes 2022-07-15 23:46:03 +02:00
Alexander Tokmakov
4fd92ad2e7
Merge pull request #39276 from ClickHouse/tavplubix-patch-1
Another supression for BC check
2022-07-15 21:02:45 +03:00
Alexander Tokmakov
b770f9903d
Update run.sh 2022-07-15 20:03:00 +03:00
alesapin
ec15be2798 Add missed file 2022-07-15 19:00:50 +02:00
Kruglov Pavel
3436fcfda6
Update tests/performance/low_cardinality_argument.xml
Co-authored-by: Igor Nikonov <954088+devcrafter@users.noreply.github.com>
2022-07-15 18:24:44 +02:00
avogar
7508448275 Better 2022-07-15 16:23:56 +00:00
kssenii
9f1d6814fc Fix 2022-07-15 18:01:54 +02:00
alesapin
39d61e9a37
Merge pull request #39064 from quickhouse/patch-1
More stable `test_s3_zero_copy_ttl`, weakened requirement to move data to S3 in 0-5 seconds
2022-07-15 17:58:58 +02:00
Mikhail f. Shiryaev
6e48b08190
Clean-up some staff left after finishing 2022-07-15 17:58:45 +02:00
alesapin
3fe17518b9
Merge pull request #39187 from ClickHouse/roaring-memory-tracking-fix
Fix 01961_roaring_memory_tracking test
2022-07-15 17:56:11 +02:00
alesapin
5cf4bd50de
Merge pull request #39214 from azat/s3-fix-fetching-memory-part
Fix fetch of in-memory part with allow_remote_fs_zero_copy_replication
2022-07-15 17:52:05 +02:00
Alexander Tokmakov
90529f0d48
Merge pull request #39258 from ClickHouse/tavplubix-patch-1
Disable flaky test `test_s3_zero_copy_on_hybrid_storage`
2022-07-15 18:36:00 +03:00
Mikhail f. Shiryaev
dc6db5b5d9
Replace sys.exit by Exception to rollback stash and clear_repo 2022-07-15 17:21:19 +02:00
Mikhail f. Shiryaev
48797660ff
Process exceptions per PR to not fail the script 2022-07-15 17:21:18 +02:00
Mikhail f. Shiryaev
30b0995532
Add early check if PR is already in a release branch 2022-07-15 17:21:18 +02:00
Mikhail f. Shiryaev
0c766a6cfc
Rename workflow yml to reflect the name, increase frequency 2022-07-15 17:21:17 +02:00
Mikhail f. Shiryaev
909e871c48
Rewrite cherry_pick.py to PyGithub API 2022-07-15 17:21:14 +02:00
Alexander Tokmakov
e69ea920bf
Merge branch 'master' into fix_assertion_in_transactions 2022-07-15 18:18:34 +03:00
Alexander Tokmakov
5ef7f5f494
Merge pull request #39229 from azat/fix-noexcept-scope
[RFC] Fix NOEXCEPT_SCOPE (before it calls std::terminate and looses the exception)
2022-07-15 18:14:56 +03:00
Alexander Tokmakov
5c24cd979b
Merge pull request #39256 from ClickHouse/bc_check_fix_stacks_in_gdb
Fix stacktraces in gdb in BC check
2022-07-15 17:54:18 +03:00
Vitaly Baranov
5565089f44
Merge pull request #38933 from ClickHouse/simdjson-avx512-test
Add a test for simdjson
2022-07-15 16:48:08 +02:00
Nikolai Kochetov
f6a82a6a53
Merge pull request #39157 from ClickHouse/bug-lost-column
prewhere action should preserve sorting columns
2022-07-15 16:37:40 +02:00
Robert Schulze
c669721d46
Merge pull request #39261 from ClickHouse/warnings
Enabled Wc99-extensions + Wsign-conversion
2022-07-15 16:01:38 +02:00
Vitaly Baranov
3eb847f449 Small correction. 2022-07-15 15:44:29 +02:00
Vitaly Baranov
5691a859d6 Add tests. 2022-07-15 15:44:29 +02:00
Vitaly Baranov
c7cef91d4d Two ways to provide access to system.users: "GRANT SHOW USERS ON *.*" and "GRANT SELECT ON system.users" 2022-07-15 15:44:29 +02:00
Vitaly Baranov
ef3a24d20f Fix tests. 2022-07-15 15:44:29 +02:00
Vitaly Baranov
6bf7bffbeb Correct the list of always accessible system tables. 2022-07-15 15:44:29 +02:00
Vitaly Baranov
de34d173ba Remove excessive log messages. 2022-07-15 15:44:29 +02:00
Vitaly Baranov
9e70e02589 Table function null() & view() don't require CREATE TEMPORARY TABLE privilege anymore. 2022-07-15 15:44:29 +02:00
Vitaly Baranov
fbb2e14d54 Add new table function viewIfPermitted(). 2022-07-15 15:44:29 +02:00