Commit Graph

115526 Commits

Author SHA1 Message Date
Sergei Trifonov
0b2860d822
Merge branch 'master' into async-loader 2023-05-10 14:54:00 +02:00
avogar
a7aec49fbb Fix indents 2023-05-10 12:43:29 +00:00
Nikita Taranov
95bcccaf84
Do not allocate own buffer in CachedOnDiskReadBufferFromFile when use_external_buffer == true 2023-05-10 14:42:49 +02:00
avogar
10e6f5b59a Fix indents 2023-05-10 12:31:34 +00:00
avogar
0cf6b9f145 Inherit context from parent fiber 2023-05-10 12:27:13 +00:00
Roman Vasin
632c0eeefc
Add support of temporary tables in FROM part of ATTACH|REPLACE PARTITION FROM (#49436)
* Add temp tables after FROM

* Resolve works fine with temp and non-temp tables

* Add usage of temporary table in  00626_replace_partition_from_table test

* Update documentation

* Add tests for ReplicatedMergeTree

* Move tests into 02731_replace_partition_from_temporary_table
2023-05-10 15:25:12 +03:00
Han Fei
505d9be7b2 address comments 2023-05-10 13:56:17 +02:00
Robert Schulze
bf3eacf697
Merge pull request #49730 from ClickHouse/rs/docs-fix-sidebar
Docs: Fix sidebar label for dictionary table function
2023-05-10 13:54:29 +02:00
Robert Schulze
405e371aca
Docs: Fix sidebar label for dictionary table function 2023-05-10 11:18:15 +00:00
kssenii
acae08714b Move assertions after logging 2023-05-10 13:03:34 +02:00
Kseniia Sumarokova
1ea53b5885
Merge pull request #49690 from kssenii/add-logging-for-try-reserve
Add some logging
2023-05-10 12:59:56 +02:00
Mikhail f. Shiryaev
d605f82798
Replace old release with new packages in suspicious patterns 2023-05-10 12:36:04 +02:00
Nikolay Degterinsky
6b2daff663
Merge pull request #48880 from alekar/48716
Enhance usability of INTO OUTFILE clause for SELECT queries
2023-05-10 12:35:22 +02:00
Ilya Yatsishin
a4f7bfa62d
Merge pull request #49718 from ClickHouse/fix-typo-9
Fix typo
2023-05-10 12:32:37 +02:00
Igor Nikonov
53b751bfcb
Merge branch 'master' into analyzer-01655_plan_optimizations_optimize_read_in_window_order 2023-05-10 12:22:00 +02:00
Azat Khuzhin
2f9a7cba8a Fix stack-use-after-scope in KafkaProducer::produce()
ASan report:

    ==1==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f7540186b20 at pc 0x55656ef458ad bp 0x7f754114acf0 sp 0x7f754114a4b8
    READ of size 2 at 0x7f7540186b20 thread T2 (TCPHandler)
        0 0x55656ef458ac in __asan_memcpy (/usr/bin/clickhouse+0x11b028ac) (BuildId: 6ba63057df561f6dc16fb8fd7623fd858bf327d1)
        1 0x55659f62daf8 in rd_kafka_msg_new00 build_docker/./contrib/librdkafka/src/rdkafka_msg.c:192:3
        2 0x55659f62daf8 in rd_kafka_msg_new0 build_docker/./contrib/librdkafka/src/rdkafka_msg.c:257:8
        3 0x55659f630635 in rd_kafka_producev build_docker/./contrib/librdkafka/src/rdkafka_msg.c:642:23
        4 0x55659f4a865c in cppkafka::Producer::do_produce() build_docker/./contrib/cppkafka/src/producer.cpp:128:19
        5 0x55659f4a8306 in cppkafka::Producer::produce() build_docker/./contrib/cppkafka/src/producer.cpp:69:5
        6 0x5565961e748c in DB::KafkaProducer::produce() build_docker/./src/Storages/Kafka/KafkaProducer.cpp:70:23
        7 0x5565962155b2 in DB::MessageQueueSink::consume(DB::Chunk) build_docker/./src/Storages/MessageQueueSink.cpp:64:23
        8 0x5565980b9e8e in DB::SinkToStorage::onConsume(DB::Chunk) build_docker/./src/Processors/Sinks/SinkToStorage.cpp:18:5

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-10 12:15:17 +02:00
Mikhail f. Shiryaev
f6372dd3fc
Do not launch PRs w/o "can be tested" 2023-05-10 12:14:44 +02:00
Azat Khuzhin
a15d088fd2 Fix 02417_opentelemetry_insert_on_distributed_table (wrong sed was used) 2023-05-10 09:20:37 +02:00
Antonio Andelic
8509f1b645
Merge pull request #49402 from ClickHouse/fix-cnf-new-analyzer
Correctly stop CNF convert for too many atomics in new analyzer
2023-05-10 09:00:25 +02:00
Antonio Andelic
c6904805f4
Merge branch 'master' into fix-cnf-new-analyzer 2023-05-10 08:56:14 +02:00
Alexey Milovidov
dc91f6b89a
Merge pull request #49705 from ClickHouse/nickitat-patch-12
Backport fix for UBSan error in musl/logf.c
2023-05-10 07:47:43 +03:00
Alexey Milovidov
0eae23ba2d
Merge pull request #49715 from ClickHouse/remove-unused-errorcodes
Remove not used ErrorCodes
2023-05-10 06:43:16 +03:00
Alexey Milovidov
a7ed839cd9
Merge pull request #49710 from ClickHouse/fix-ks-test
Fix flaky test for `kolmogorovSmirnovTest` function
2023-05-10 05:29:24 +03:00
Alexey Milovidov
8a6e07f0ea Make projections production-ready 2023-05-10 03:35:13 +02:00
Alexey Milovidov
56ea17c922 Fix typo 2023-05-10 03:21:36 +02:00
Alexey Milovidov
8a23d8b389 Disable mmap for server 2023-05-10 03:17:57 +02:00
Alexey Milovidov
a2c4b8e23d Disable mmap for server 2023-05-10 03:16:52 +02:00
robot-clickhouse-ci-2
c698d2af99
Merge pull request #49702 from ClickHouse/nickitat-patch-11
Enable `do_not_evict_index_and_mark_files` by default
2023-05-10 02:26:38 +02:00
Anton Popov
862008da0d
Merge pull request #49663 from CurtizJ/fix-race-context-copy
Fix race in `Context::createCopy`
2023-05-10 02:11:35 +02:00
Anton Popov
8ff5fda628 fix short curcuit function with sparse arguments 2023-05-09 23:54:13 +00:00
Alexey Milovidov
f20a1893f5
Merge branch 'master' into enable-distinct-in-order 2023-05-10 02:08:32 +03:00
Sergei Trifonov
dc5664f36a
Merge branch 'master' into remove-unused-errorcodes 2023-05-10 00:49:55 +02:00
Nikolay Degterinsky
7886353ed0
Merge pull request #49696 from evillique/ubsan-fuzzer
Fix member call on null pointer in fuzzer
2023-05-10 00:03:50 +02:00
Anton Popov
996fcfe120 fix column ttl with sparse columns 2023-05-09 21:37:43 +00:00
alekar
67ad681e41
Merge branch 'master' into 48716 2023-05-09 14:34:32 -07:00
Alexander Tokmakov
6f53ee289d fix another issue, add a test 2023-05-09 23:26:56 +02:00
Alexander Tokmakov
99677f3d1a
Update clickhouse-test (#49712) 2023-05-10 00:22:55 +03:00
Alexey Milovidov
543fd4c969
Merge pull request #49688 from azat/build/riscv64-fixes
Build fixes for RISCV64
2023-05-10 00:20:09 +03:00
Alexey Milovidov
1549919f27
Merge pull request #49713 from ClibMouse/s390x_ip_encoding_fix
IBM s390x: ip encoding fix
2023-05-10 00:16:46 +03:00
Dan Roscigno
915903b42d
Merge pull request #49704 from pkit/pkit/docs_is_deleted
docs: fix the is_deleted option docs
2023-05-09 16:59:25 -04:00
Suzy Wang
1b21f13605 ip encoding fix 2023-05-09 13:57:22 -07:00
kssenii
e35c669892 Fix 2023-05-09 22:51:47 +02:00
alekar
605991d4d5
Merge branch 'master' into 48716 2023-05-09 13:38:11 -07:00
Suzy Wang
ce471a2e8b Updated code as suggested 2023-05-09 13:31:54 -07:00
Dan Roscigno
7a4c3b9741
Merge pull request #49691 from duyet/patch-1
Fix incorrect docs for `use_query_cache`
2023-05-09 16:31:18 -04:00
Yakov Olkhovskiy
815cc8de9b removed unnecessary check for thread's joinability 2023-05-09 19:43:39 +00:00
Azat Khuzhin
9b3bcd0870 Fix stack-use-after-scope in gtest_resource_manager_static
Reordering of the static variables should be enough to fix this:

    [ RUN      ] IOResourceStaticResourceManager.Prioritization
    =================================================================
    ==13==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f7d8d621970 at pc 0x5636b80dcbb2 bp 0x7f7c48e47dd0 sp 0x7f7c48e47dc8
    READ of size 8 at 0x7f7d8d621970 thread T3975 (ThreadPool)
        #0 0x5636b80dcbb1 in IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_1::operator()(long) const build_docker/./src/IO/Resource/tests/gtest_resource_manager_static.cpp:78:13
        #1 0x5636b80dcbb1 in IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0::operator()() const build_docker/./src/IO/Resource/tests/gtest_resource_manager_static.cpp:95:21
        #2 0x5636b80dcbb1 in decltype(std::declval<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&>()()) std::__1::__invoke[abi:v15000]<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&>(IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23
        #3 0x5636b80dcbb1 in decltype(auto) std::__1::__apply_tuple_impl[abi:v15000]<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&, std::__1::tuple<>&>(IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/./contrib/llvm-project/libcxx/include/tuple:1789:1
        #4 0x5636b80dcbb1 in decltype(auto) std::__1::apply[abi:v15000]<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&, std::__1::tuple<>&>(IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&, std::__1::tuple<>&) build_docker/./contrib/llvm-project/libcxx/include/tuple:1798:1
        #5 0x5636b80dcbb1 in ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0>(IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&&)::'lambda'()::operator()() build_docker/./src/Common/ThreadPool.h:228:13
        #6 0x5636b80dcbb1 in decltype(std::declval<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0>()()) std::__1::__invoke[abi:v15000]<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0>(IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&&)::'lambda'()&>(IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23
        #7 0x5636b80dcbb1 in void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0>(IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0>(IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&&)::'lambda'()&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:479:9
        #8 0x5636b80dcbb1 in std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0>(IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&&)::'lambda'(), void ()>::operator()[abi:v15000]() build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:235:12
        #9 0x5636b80dcbb1 in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0>(IOResourceStaticResourceManager_Prioritization_Test::TestBody()::$_0&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716:16
        #10 0x5636ea219310 in std::__1::__function::__policy_func<void ()>::operator()[abi:v15000]() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:848:16
        #11 0x5636ea219310 in std::__1::function<void ()>::operator()() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:1187:12
        #12 0x5636ea219310 in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/./src/Common/ThreadPool.cpp:416:13
        #13 0x5636ea2258ac in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/./src/Common/ThreadPool.cpp:180:73
        #14 0x5636ea2258ac in decltype(std::declval<void>()()) std::__1::__invoke[abi:v15000]<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23
        #15 0x5636ea2258ac in void std::__1::__thread_execute[abi:v15000]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/./contrib/llvm-project/libcxx/include/thread:284:5
        #16 0x5636ea2258ac in void* std::__1::__thread_proxy[abi:v15000]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, long, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) build_docker/./contrib/llvm-project/libcxx/include/thread:295:5
        #17 0x7f7d8fcf1608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608) (BuildId: 7b4536f41cdaa5888408e82d0836e33dcf436466)
        #18 0x7f7d8fc16132 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f132) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)

    Address 0x7f7d8d621970 is located in stack of thread T0 at offset 368 in frame
        #0 0x5636b80d9bef in IOResourceStaticResourceManager_Prioritization_Test::TestBody() build_docker/./src/IO/Resource/tests/gtest_resource_manager_static.cpp:46

      This frame has 10 object(s):
        [32, 36) 'requests_per_thead' (line 48)
        [48, 208) 't' (line 49)
        [272, 296) 'ref.tmp' (line 51)
        [336, 352) 'last_priority' (line 74)
        [368, 376) 'check' (line 75) <== Memory access at offset 368 is inside this variable
        [400, 424) 'name' (line 83)
        [464, 512) 'ref.tmp13' (line 87)
        [544, 560) 'c' (line 101)
        [576, 600) 'ref.tmp32' (line 101)
        [640, 664) 'ref.tmp41' (line 102)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-09 21:32:13 +02:00
Azat Khuzhin
d8dd50a9c6 Fix misc-misplaced-const clang-tidy warning
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-09 21:27:21 +02:00
Azat Khuzhin
0610865811 Fix readability-redundant-string-cstr clang-tidy warning
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-09 21:22:05 +02:00
Azat Khuzhin
d03ae2abfa Fix modernize-loop-convert clang-tidy warning
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-09 21:19:37 +02:00