Alexey Milovidov
bac09770f1
Fix clang-tidy-14
2022-06-01 22:07:26 +02:00
Robert Schulze
366f368d06
Disallow LIKE patterns with trailing escape
...
Trailing escape ('ab\') is disallowed in SQL, in standardese:
"If an escape character is specified, then [...] If there is not a
partitioning of the string PVC into substrings such that each substring
has length 1 (one) or 2, no substring of length 1 (one) is the escape
character ECV, and each substring of length 2 is the escape character
ECV followed by either the escape character ECV, an <underscore>
character, or the <percent> character, then an exception condition is
raised: data exception - invalid escape sequence."
I first thought this is checked already higher up in the stack, at least
for const needles, as single trailing backslashes ('ab\') are rejected,
but then I realized that ClickHouse quotes by default. I.e., double
trailing backslashes ('ab\\') are not rejected but when interpreted as
LIKE needle ('ab\') they should.
2022-06-01 21:38:46 +02:00
lthaooo
6632616733
Fix TTL merge scheduling bug ( #36387 )
2022-06-01 21:09:53 +02:00
Azat Khuzhin
545a56ce45
Fix sinks with onException() handler
...
It is possible to call onException() even after onFinish(), in case of
onFinish() throws, and in this case onException() should be no-op for
such sinks.
Also there can be caveats with PartitionedSync.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-01 21:50:30 +03:00
Azat Khuzhin
02af58f41d
Fix possible "Cannot write to finalized buffer"
...
It is still possible to get this error since onException does not
finalize format correctly.
Here is an example of such error, that was found by CI [1]:
<details>
[ 2686 ] {fa01bf02-73f6-4f7f-b14f-e725de6d7f9b} <Fatal> : Logical error: 'Cannot write to finalized buffer'.
[ 34577 ] {} <Fatal> BaseDaemon: ########################################
[ 34577 ] {} <Fatal> BaseDaemon: (version 22.6.1.1, build id: AB8040A6769E01A0) (from thread 2686) (query_id: fa01bf02-73f6-4f7f-b14f-e725de6d7f9b) (query: insert into test_02302 select number from numbers(10) settings s3_truncate_on_insert=1;) Received signal Aborted (6)
[ 34577 ] {} <Fatal> BaseDaemon:
[ 34577 ] {} <Fatal> BaseDaemon: Stack trace: 0x7fcbaa5a703b 0x7fcbaa586859 0xfad9bab 0xfad9e05 0xfaf6a3b 0x24a48c7f 0x258fb9b9 0x258f2004 0x258b88f4 0x258b863b 0x2581773d 0x258177ce 0x24bb5e98 0xfad01d6 0xfad0105 0x2419b11d 0xfad01d6 0xfad0105 0x2215afbb 0x2215aa48 0xfad01d6 0xfad0105 0xfcc265d 0x225cc546 0x249a1c40 0x249bc1b6 0x2685902c 0x26859505 0x269d7767 0x269d504c 0x7fcbaa75e609 0x7fcbaa683163
[ 34577 ] {} <Fatal> BaseDaemon: 3. raise @ 0x7fcbaa5a703b in ?
[ 34577 ] {} <Fatal> BaseDaemon: 4. abort @ 0x7fcbaa586859 in ?
[ 34577 ] {} <Fatal> BaseDaemon: 5. ./build_docker/../src/Common/Exception.cpp:47: DB::abortOnFailedAssertion(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xfad9bab in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 6. ./build_docker/../src/Common/Exception.cpp:70: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xfad9e05 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 7. ./build_docker/../src/IO/WriteBuffer.h:0: DB::WriteBuffer::write(char const*, unsigned long) @ 0xfaf6a3b in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 8. ./build_docker/../src/Processors/Formats/Impl/ArrowBufferedStreams.cpp:47: DB::ArrowBufferedOutputStream::Write(void const*, long) @ 0x24a48c7f in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 9. long parquet::ThriftSerializer::Serialize<parquet::format::FileMetaData>(parquet::format::FileMetaData const*, arrow::io::OutputStream*, std::__1::shared_ptr<parquet::Encryptor> const&) @ 0x258fb9b9 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 10. parquet::FileMetaData::FileMetaDataImpl::WriteTo(arrow::io::OutputStream*, std::__1::shared_ptr<parquet::Encryptor> const&) const @ 0x258f2004 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 11. parquet::WriteFileMetaData(parquet::FileMetaData const&, arrow::io::OutputStream*) @ 0x258b88f4 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 12. parquet::ParquetFileWriter::~ParquetFileWriter() @ 0x258b863b in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 13. parquet::arrow::FileWriterImpl::~FileWriterImpl() @ 0x2581773d in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 14. parquet::arrow::FileWriterImpl::~FileWriterImpl() @ 0x258177ce in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 15. ./build_docker/../src/Processors/Formats/Impl/ParquetBlockOutputFormat.h:27: DB::ParquetBlockOutputFormat::~ParquetBlockOutputFormat() @ 0x24bb5e98 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 16. ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:173: std::__1::__shared_count::__release_shared() @ 0xfad01d6 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 17. ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:216: std::__1::__shared_weak_count::__release_shared() @ 0xfad0105 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 18.1. inlined from ./build_docker/../contrib/libcxx/include/__memory/unique_ptr.h:312: std::__1::unique_ptr<DB::WriteBuffer, std::__1::default_delete<DB::WriteBuffer> >::reset(DB::WriteBuffer*)
[ 34577 ] {} <Fatal> BaseDaemon: 18.2. inlined from ../contrib/libcxx/include/__memory/unique_ptr.h:269: ~unique_ptr
[ 34577 ] {} <Fatal> BaseDaemon: 18. ../src/Storages/StorageS3.cpp:566: DB::StorageS3Sink::~StorageS3Sink() @ 0x2419b11d in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 19. ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:173: std::__1::__shared_count::__release_shared() @ 0xfad01d6 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 20. ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:216: std::__1::__shared_weak_count::__release_shared() @ 0xfad0105 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 21. ./build_docker/../contrib/abseil-cpp/absl/container/internal/raw_hash_set.h:1662: absl::lts_20211102::container_internal::raw_hash_set<absl::lts_20211102::container_internal::FlatHashMapPolicy<StringRef, std::__1::shared_ptr<DB::SinkToStorage> >, absl::lts_20211102::hash_internal::Hash<StringRef>, std::__1::equal_to<StringRef>, std::__1::allocator<std::__1::pair<StringRef const, std::__1::shared_ptr<DB::SinkToStorage> > > >::destroy_slots() @ 0x2215afbb in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 22.1. inlined from ./build_docker/../contrib/libcxx/include/string:1445: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long() const
[ 34577 ] {} <Fatal> BaseDaemon: 22.2. inlined from ../contrib/libcxx/include/string:2231: ~basic_string
[ 34577 ] {} <Fatal> BaseDaemon: 22. ../src/Storages/PartitionedSink.h:14: DB::PartitionedSink::~PartitionedSink() @ 0x2215aa48 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 23. ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:173: std::__1::__shared_count::__release_shared() @ 0xfad01d6 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 24. ./build_docker/../contrib/libcxx/include/__memory/shared_ptr.h:216: std::__1::__shared_weak_count::__release_shared() @ 0xfad0105 in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 25. ./build_docker/../contrib/libcxx/include/vector:802: std::__1::vector<std::__1::shared_ptr<DB::IProcessor>, std::__1::allocator<std::__1::shared_ptr<DB::IProcessor> > >::__base_destruct_at_end(std::__1::shared_ptr<DB::IProcessor>*) @ 0xfcc265d in /usr/bin/clickhouse
[ 34577 ] {} <Fatal> BaseDaemon: 26.1. inlined from ./build_docker/../contrib/libcxx/include/vector:402: ~vector
[ 34577 ] {} <Fatal> BaseDaemon: 26.2. inlined from ../src/QueryPipeline/QueryPipeline.cpp:29: ~QueryPipeline
[ 34577 ] {} <Fatal> BaseDaemon: 26. ../src/QueryPipeline/QueryPipeline.cpp:535: DB::QueryPipeline::reset() @ 0x225cc546 in /usr/bin/clickhouse
[ 614 ] {} <Fatal> Application: Child process was terminated by signal 6.
</details>
[1]: https://s3.amazonaws.com/clickhouse-test-reports/37542/8a224239c1d922158b4dc9f5d6609dca836dfd06/stress_test__undefined__actions_.html
Follow-up for: #36979
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-01 21:50:30 +03:00
Azat Khuzhin
62d78d8f20
Fix WriteBufferFromS3 is_finalized check in case of exception
...
WriteBufferFromS3::is_finalized is not set if finalizeImpl() throws,
while WriteBuffer::finalized correctly set even in case of exception, so
it should be used instead.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-01 21:50:30 +03:00
Denny Crane
dc9b11b814
Update map.md
2022-06-01 15:39:45 -03:00
Denny Crane
08806a150d
Update map.md
2022-06-01 15:39:02 -03:00
Denny Crane
320fd567dd
Update tuple-map-functions.md
2022-06-01 15:38:41 -03:00
Denny Crane
931d424fa1
Update tuple-map-functions.md
2022-06-01 15:37:13 -03:00
Denny Crane
5d3cc4be26
Update tuple-map-functions.md
2022-06-01 15:35:58 -03:00
Denny Crane
608ad73c93
Update tuple-map-functions.md
2022-06-01 15:34:15 -03:00
Denny Crane
223bcb7958
Update map.md
2022-06-01 15:31:59 -03:00
Denny Crane
219e46dc8f
Update map.md
2022-06-01 15:29:58 -03:00
Denny Crane
2b78adf628
Update map.md
2022-06-01 15:27:31 -03:00
Alexander Tokmakov
06f80770b8
fix stuck REPALCE_RANGE
2022-06-01 20:11:53 +02:00
Robert Schulze
b3b0716b32
Merge pull request #37544 from ClickHouse/cached_patterns
...
Cache compiled regexps when evaluating non-const needles
2022-06-01 19:55:25 +02:00
Nikolai Kochetov
cc0d5a0daa
Fix test again.
2022-06-01 17:39:12 +00:00
Nikolai Kochetov
9b131f2d2d
Fix tewst again.
2022-06-01 16:56:26 +00:00
avogar
4abfd54dd6
Fix possible segfault in schema inference
2022-06-01 16:53:37 +00:00
alesapin
b7e8bbb154
Merge pull request #37679 from ClickHouse/fix-keeper-recovery-test
...
Fix `test_keeper_force_recovery*` tests
2022-06-01 18:45:32 +02:00
bkuschel
895a96de95
Remove recursive
2022-06-01 09:44:37 -07:00
Alexey Milovidov
89638de521
Merge pull request #37738 from ClickHouse/fix-intersect-with-const
...
Fix `Intersect` with constant strings
2022-06-01 19:31:55 +03:00
Yakov Olkhovskiy
e23cec01d5
Merge pull request #37581 from ClickHouse/http-named-collection
...
Support for HTTP source for Data Dictionaries in Named Collections
2022-06-01 11:55:04 -04:00
Anton Popov
1ef48c3a4a
turn on setting output_format_json_named_tuples_as_objects by default
2022-06-01 15:42:12 +00:00
avogar
7ef02a2e44
Fix possible logical error in values table function
2022-06-01 15:32:33 +00:00
Nikolai Kochetov
6e924cdc77
Fix some more tests.
2022-06-01 15:21:47 +00:00
Dmitry Novik
7fbe91ca81
Merge pull request #37460 from ClickHouse/memory-overcommit-improvement
...
Memory Overcommit: update defaults, exception message and add ProfileEvent
2022-06-01 17:06:33 +02:00
alesapin
ca4968980a
Merge pull request #36912 from CheSema/master
...
Expose what triggered the merge in system.part_log
2022-06-01 17:01:27 +02:00
alesapin
c5a5c07085
Merge branch 'master' into master
2022-06-01 17:01:04 +02:00
Alexander Tokmakov
002f95741a
fix
2022-06-01 16:58:24 +02:00
alesapin
b3b3d7a459
Fix test
2022-06-01 16:58:07 +02:00
Sema Checherinda
16dc3ed97d
FR: Expose what triggered the merge in system.part_log #26255
2022-06-01 16:58:07 +02:00
Sema Checherinda
2626a49616
FR: Expose what triggered the merge in system.part_log #26255
2022-06-01 16:58:06 +02:00
Robert Schulze
7813cf5a8b
Merge pull request #37719 from ClickHouse/lib-dependency-mgmt
...
Fix build with -DENABLE_LIBRARIES=0
2022-06-01 16:53:49 +02:00
Alexander Tokmakov
ca4f7287ff
Merge branch 'master' into try_fix_tests2
2022-06-01 16:52:54 +02:00
bkuschel
79576fa08c
Use new submodule sync
2022-06-01 07:41:27 -07:00
Vladimir C
3a824ef9a4
Add no-backward-compatibility-check to 02315_pmj_union_ubsan_35857
2022-06-01 16:00:30 +02:00
Anton Popov
035f829a28
fix test
2022-06-01 13:29:03 +00:00
Suzy Wang
9bef38effb
Upgrade libxml2 to 2.9.14
2022-06-01 06:10:05 -07:00
Kseniia Sumarokova
7afcfcbaaf
Merge pull request #37691 from kssenii/fix-rabbitmq-restart-with-no-settings
...
Fix rabbitmq restart with empty settings
2022-06-01 14:59:34 +02:00
vdimir
6a5f5997ca
Add test 02315_pmj_union_ubsan_35857
2022-06-01 12:55:47 +00:00
Maksim Kita
4413f0c7c1
Fixed tests
2022-06-01 14:52:01 +02:00
Kseniia Sumarokova
503d94f73b
Update test.py
2022-06-01 14:44:46 +02:00
flynn
ac10a6dc28
update test
2022-06-01 12:41:36 +00:00
flynn
b62e4cec65
Fix crash of FunctionHashID
2022-06-01 12:39:16 +00:00
Robert Schulze
5a1b873f7b
No need to checkout submodules/contribs recursively
...
Also verified locally by building from a freshly cloned ClickHouse and
"flat" checkout of submodules without recursion
2022-06-01 13:54:53 +02:00
Nikolai Kochetov
e401ab8169
Fix more tests.
2022-06-01 11:51:56 +00:00
Antonio Andelic
08c20be4d0
Cleaner exception handling in ParallelReadBuffer
2022-06-01 11:51:01 +00:00
Robert Schulze
ee302f2d9f
Merge pull request #37643 from amosbird/avoid-useless-context-copy
...
Avoid useless context copy when building query interpreters
2022-06-01 13:49:56 +02:00