Commit Graph

93202 Commits

Author SHA1 Message Date
avogar
2367f40b70 Better exception messages in schema inference 2022-07-18 15:36:33 +00:00
Dmitry Novik
855ad30a5d
Merge pull request #39305 from ClickHouse/window-case-test
Add test for window function inside CASE
2022-07-18 16:10:11 +02:00
Kseniia Sumarokova
b4eae94889
Merge pull request #39259 from rnbondarenko/patch-1
removed default queue arguments
2022-07-18 15:32:31 +02:00
Robert Schulze
33aa9593ca
Merge pull request #39265 from jrdi/fix-macosx-endian
Fix macosx compilation due to endian.h
2022-07-18 15:32:17 +02:00
Robert Schulze
e2aa2d9850
Merge pull request #39295 from azat/cmake-cache-fix
Fix running cmake with predefined cache (for development only)
2022-07-18 15:31:18 +02:00
Kseniia Sumarokova
a75cead5d0
Merge pull request #39314 from azat/disks-leak
Fix leaking of logger in clickhouse-disks
2022-07-18 15:30:35 +02:00
Robert Schulze
74e55e42f6
Merge pull request #39167 from ClickHouse/multiStringAllPositions-non-const-needle
multiStringAllPositions() with non-const needle
2022-07-18 15:30:14 +02:00
Vitaly Baranov
ad115a9a3d
Merge pull request #39254 from vitlibar/backup-checks-destination-not-in-use
Check that the destination for a backup is not in use.
2022-07-18 15:19:43 +02:00
Anton Popov
5605b60c97
Merge pull request #39039 from CurtizJ/randomize-more-settings
Add more settings for randomization
2022-07-18 15:05:41 +02:00
Alexander Tokmakov
966a59e617
Merge pull request #39315 from ClickHouse/tavplubix-patch-1
Update exception message
2022-07-18 15:16:49 +03:00
Robert Schulze
1ced1d11fd
Merge pull request #39285 from azat/bg-exe
[RFC] Remove superior atomic from MergeTreeBackgroundExecutor and annotations for TSA
2022-07-18 12:46:54 +02:00
Robert Schulze
6f79d2167b
Merge pull request #39298 from azat/fix-gtest
Fix googletest contrib compilation (due to GTEST_HAS_POSIX_RE=0)
2022-07-18 12:44:18 +02:00
Kruglov Pavel
85f8b5990f
Merge pull request #39192 from Avogar/improve-is-nullable
Improve isNullable/isConstant/isNull/isNotNull performance for LowCardinality argument
2022-07-18 12:33:34 +02:00
Alexander Tokmakov
12cbbf241f
Merge pull request #39306 from den-crane/patch-22
Doc. Notes for attach  / move / replace partition.
2022-07-18 13:27:17 +03:00
Kseniia Sumarokova
5022eace6e
Merge pull request #39283 from kssenii/fixe-postgres-fetch-tables
Fix incorrect postgresql query which fetches tables list
2022-07-18 12:00:08 +02:00
Alexander Tokmakov
a193276737
Update DatabaseOnDisk.cpp 2022-07-18 12:50:49 +03:00
Azat Khuzhin
4f41d21626 Fix leaking of logger in clickhouse-disks
CI found [1]:

    Direct leak of 256 byte(s) in 1 object(s) allocated from:
        0 0xd8cb88d in operator new(unsigned long) (/usr/bin/clickhouse+0xd8cb88d) (BuildId: 7a3fd7b485701220)
        1 0xde8943e in DB::DisksApp::main() build_docker/../programs/disks/DisksApp.cpp:157:41
        2 0x38dca887 in Poco::Util::Application::run() build_docker/../contrib/poco/Util/src/Application.cpp:334:8
        3 0xde8d72c in mainEntryClickHouseDisks(int, char**) build_docker/../programs/disks/DisksApp.cpp:219:20
        4 0xd8cf47f in main build_docker/../programs/main.cpp:445:12
        5 0x7f060ddce082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

  CI: https://s3.amazonaws.com/clickhouse-test-reports/39299/37b4b52c12698e711aa931f10aec3909bca287b6/integration_tests__asan__actions__[2/3].html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-18 12:35:53 +03:00
Alexander Tokmakov
611da87217
Merge pull request #39263 from ClickHouse/fix_assertion_in_transactions
Fix assertion in transactions
2022-07-18 11:43:50 +03:00
Azat Khuzhin
21fa5e6ece Add check for CLICKHOUSE_SPLIT_BINARY=1 with USE_STATIC_LIBRARIES=1
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-18 11:42:49 +03:00
Jordi Villar
c63512d255 Use CH custom platform macro for OS Darwin 2022-07-18 09:59:02 +02:00
Robert Schulze
10d0a5e95b
More split up of tests to reduce runtimes 2022-07-18 07:05:34 +00:00
Denny Crane
429b19da8b
Update partition.md 2022-07-17 21:16:40 -03:00
Denny Crane
27326da00b
Update partition.md 2022-07-17 21:12:53 -03:00
Denny Crane
577978026a
Update partition.md 2022-07-17 21:09:01 -03:00
Dmitry Novik
4e9adc5211 Add test 2022-07-17 23:12:37 +00:00
Alexey Milovidov
1cf17a0454
Merge pull request #39302 from ClickHouse/fix-universal-script
Fix universal installation script for FreeBSD
2022-07-18 00:38:24 +03:00
Alexey Milovidov
f1256c3aef
Merge pull request #37891 from guowangy/lz4-decompress-vbmi
LZ4 decompress: add VBMI optimized copyOverlap32Shuffle
2022-07-18 00:37:59 +03:00
Alexey Milovidov
5f18640215 Fix universal installation script 2022-07-17 23:16:54 +02:00
Robert Schulze
01b40d5a45
Split 00233_position_function_family to avoid test timeouts
+ remove the five most expensive queries
2022-07-17 18:11:37 +00:00
Robert Schulze
fffeab2e86
Merge pull request #39262 from ClickHouse/stringref-by-value
Pass const StringRef by value, not by reference
2022-07-17 16:53:15 +02:00
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
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
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
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