Commit Graph

4044 Commits

Author SHA1 Message Date
Alexander Tokmakov
9e9969cea7
Merge pull request #37827 from arthurpassos/host_regexp_multiple_domains
Test host_regexp against all PTR records instead of only one
2022-07-21 16:43:05 +03:00
Alexander Tokmakov
a8da5d96fc remove some dead and commented code 2022-07-21 15:05:48 +02:00
Maksim Kita
7f4a1b8bb8 ShellCommand wait pid refactoring 2022-07-21 11:45:09 +02:00
Nikolai Kochetov
e15967e9db
Merge pull request #38475 from ClickHouse/additional-filters
Additional filters for a table (from setting)
2022-07-21 07:52:04 +02:00
Alexey Milovidov
4305eacd92
Merge pull request #39434 from ClickHouse/revert-39299-fix-lsan-v3
Revert "[RFC] Fix LSan by fixing getauxval()"
2022-07-21 06:47:54 +03:00
Alexey Milovidov
f4f5a5e044
Merge pull request #39397 from azat/fix-extractAll
Fix UB (stack-use-after-scope) in extactAll()
2022-07-21 05:21:18 +03:00
Alexey Milovidov
72dda35108
Revert "[RFC] Fix LSan by fixing getauxval()" 2022-07-21 04:34:04 +03:00
Nikolai Kochetov
91043351aa Fixing build. 2022-07-20 20:30:16 +00:00
Kseniia Sumarokova
3759ee76a7
Merge pull request #39386 from ClickHouse/kssenii-patch-4
Rethrow exception on cache initialisation on server startup, better error message
2022-07-20 21:26:25 +02:00
Roman Vasin
e3192cf753 Correct docs to reflect new range 1900..2299 for Date32 and DateTime64; Cleanup code 2022-07-20 15:19:02 +00:00
zvonand
11b8d788ca small improvements 2022-07-20 13:36:47 +02:00
Kseniia Sumarokova
0840dfe2e0
Update LRUFileCache.cpp 2022-07-20 11:42:24 +02:00
Maksim Kita
d3ce4ffc88
Merge pull request #38929 from pkit/pkit/wait_pid_fix
fix long wait for process exit in ShellCommand
2022-07-20 11:26:38 +02:00
Azat Khuzhin
18eb8b6d48 Fix UB (stack-use-after-scope) in extactAll()
After #37544 OptimizedRegularExpressionImpl started to be moved, but
StringSearcher is not copyable since it holds pointers that goes out of
scope after move (before Regexps::get() returns std::shared_ptr<Regexp>
but it had been replaced with Regexps::createRegexp() that returns
Regexp object).

<details>

<summary>ASan report</summary>

    ==48348==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fff577239a9 at pc 0x00001518209b bp 0x7fff57723820 sp 0x7fff57723818
    READ of size 1 at 0x7fff577239a9 thread T0
        0 0x1518209a in char8_t const* DB::StringSearcher<true, true>::search<char8_t>(char8_t const*, char8_t const*) const /bld/./src/Common/StringSearcher.h:730:41
        1 0x1518dd3f in char8_t const* DB::StringSearcher<true, true>::search<char8_t>(char8_t const*, unsigned long) const /bld/./src/Common/StringSearcher.h:751:16
        2 0x1518dd3f in OptimizedRegularExpressionImpl<false>::match(char const*, unsigned long, std::__1::vector<OptimizedRegularExpressionDetails::Match, std::__1::allocator<OptimizedRegularExpressionDetails::Match> >&, unsigned int) const /bld/./src/Common/OptimizedRegularExpression.cpp:463:54
        3 0x1811cb42 in DB::ExtractAllImpl::get(char const*&, char const*&) /bld/./src/Functions/FunctionsStringArray.h:588:18
        4 0x1811aa62 in DB::FunctionTokens<DB::ExtractAllImpl>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const /bld/./src/Functions/FunctionsStringArray.h:704:30
        5 0x14fe17b4 in DB::IFunction::executeImplDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const /bld/./src/Functions/IFunction.h:409:16

    Address 0x7fff577239a9 is located in stack of thread T0 at offset 201 in frame
        0 0x1518d98f in OptimizedRegularExpressionImpl<false>::match(char const*, unsigned long, std::__1::vector<OptimizedRegularExpressionDetails::Match, std::__1::allocator<OptimizedRegularExpressionDetails::Match> >&, unsigned int) const /bld/./src/Common/OptimizedRegularExpression.cpp:439

</details>

CI: https://s3.amazonaws.com/clickhouse-test-reports/39342/c6f7698f9ad6ae22199182ebf7c3b2dac77d69d8/fuzzer_astfuzzerasan,actions//report.html
Fixes: #37544 (cc @rschu1ze)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-20 10:18:44 +03:00
Roman Vasin
5f9c293963 Fix addDays() and addWeeks() in upper and lower limits of Date and Date32 2022-07-19 17:29:08 +00:00
Kseniia Sumarokova
891dbccdc7
Update LRUFileCache.cpp 2022-07-19 19:18:42 +02:00
Robert Schulze
02ed126533
Update src/Common/TraceSender.cpp
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
2022-07-19 18:44:31 +02:00
Sergei Trifonov
499818751e
Merge pull request #39280 from ClickHouse/avg-cpu-progress
fix cpu usage metric in client
2022-07-19 15:17:44 +02:00
Kseniia Sumarokova
2e3ceb351e
Update LRUFileCache.cpp 2022-07-19 14:44:56 +02:00
Kseniia Sumarokova
f7bb69ef7a
Update LRUFileCache.cpp 2022-07-19 14:43:11 +02:00
Kseniia Sumarokova
af7acb1782
Update LRUFileCache.cpp 2022-07-19 14:41:31 +02:00
Kseniia Sumarokova
5ad4e9d28f
Update LRUFileCache.cpp 2022-07-19 14:33:50 +02:00
Robert Schulze
7146685f9d
Merge pull request #39299 from azat/fix-lsan-v3
[RFC] Fix LSan by fixing getauxval()
2022-07-19 14:27:41 +02:00
Constantine Peresypkin
246614229f fix long wait for process exit in ShellCommand
fixes #38889
2022-07-19 14:07:27 +02:00
Nikolai Kochetov
fc6982f9e2 Fixing test. 2022-07-19 10:10:02 +00:00
Antonio Andelic
ce570b6ee3 Add logs and 4LW for api version 2022-07-19 09:02:57 +00:00
Antonio Andelic
e6ded88ea3 Small refactoring 2022-07-19 08:51:12 +00:00
Robert Schulze
81ef1099cc
Even less usage of StringRef
--> see #39300
2022-07-19 07:01:06 +00:00
Nikolai Kochetov
5a3cb07711 Fix rss 2022-07-18 21:24:41 +00:00
Nikolai Kochetov
3ee3144708 Merge branch 'master' into separate-counter-for-rss-in-memory-tracker 2022-07-18 23:20:38 +02:00
Nikolai Kochetov
87e5b31598 Do not include memory buffered by allocator into drift. 2022-07-18 21:16:16 +00:00
Robert Schulze
6df3c9d799
Merge pull request #39300 from ClickHouse/stringref-to-stringview
First try at reducing the use of StringRef
2022-07-18 19:20:16 +02:00
Roman Vasin
28fd774df8 Correct 01821_to_date_time_ubsan and 01921_datatype_date32 tests 2022-07-18 16:44:14 +00:00
Antonio Andelic
cfc741030f Revert to the version with path 2022-07-18 14:30:15 +00:00
Azat Khuzhin
51e7c41883 Add a test for LSan
v2: fix type check
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-18 16:49:49 +03:00
Sergei Trifonov
30cb4e168e cleanup 2022-07-18 13:31:32 +02:00
Sergei Trifonov
0ffe5bd39c fix typo and style 2022-07-18 13:26:33 +02:00
Sergei Trifonov
2593dbcaa6 reuse Common/ExponentiallySmoothedCounter.h 2022-07-18 12:21:44 +02:00
Antonio Andelic
758a61a36f Close socket if ApiVersion wasn't processed 2022-07-18 09:43:21 +00:00
Antonio Andelic
5170ac0898 Merge branch 'master' into keeper-version-check 2022-07-18 08:57:50 +00:00
Antonio Andelic
b8ffb151dc Some small polishing 2022-07-18 08:52:52 +00:00
Antonio Andelic
742e3d7643 Merge branch 'master' into keeper-version-check 2022-07-18 08:45:00 +00:00
Antonio Andelic
7d7c4ce4cd Add ApiVersion request 2022-07-18 08:44:38 +00: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
Robert Schulze
13482af4ee
First try at reducing the use of StringRef
- to be replaced by std::string_view
- suggested in #39262
2022-07-17 17:26:02 +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
Wangyang Guo
c07c65615d fix ENABLE_MULTITARGET_CODE not defined warning in some builds 2022-07-17 12:21:10 +08:00
zvonand
3089da16be fix identation 2022-07-16 19:07:42 +02:00
zvonand
d07a652883 merge 2022-07-16 19:05:07 +02:00
zvonand
4ab52b6873 added new DataType + fixes 2022-07-16 18:58:47 +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
Sergei Trifonov
82f98cfe6b remove initial linear growth, increase avg period to 3 sec 2022-07-16 02:17:18 +02:00
Sergei Trifonov
8a5286ea4c fix cpu usage metric in client 2022-07-16 00:27:26 +02:00
Arthur Passos
abb550d2ff minor style fixes 2022-07-15 12:42:07 -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
Robert Schulze
deda29b46b
Pass const StringRef by value, not by reference
See #39224
2022-07-15 11:34:56 +00:00
Kruglov Pavel
a944a92d4c
Merge pull request #39224 from Avogar/string-view-by-value
Pass const std::string_view by value, not by reference
2022-07-15 13:05:56 +02:00
Roman Vasin
1d0818d9cf Set max year to 2299; Code cleanup; Make working 02245_make_datetime64 test 2022-07-15 10:33:52 +00:00
Antonio Andelic
73e0c35ab0 Use 4LW for api version 2022-07-15 10:13:39 +00:00
Robert Schulze
8e44c2c375
Merge pull request #39223 from ClickHouse/warnings
Turn some warnings on
2022-07-15 10:06:59 +02:00
Wangyang Guo
397a4ac888 TargetSpecific: add AVX512VBMI support 2022-07-15 15:07:09 +08:00
Sergei Trifonov
62f975da60
Merge pull request #39095 from ClickHouse/remote-io-bandwidth-limits
add max_remote_{read,write}_network_bandwidth_for_server settings
2022-07-14 23:14:53 +02:00
Roman Vasin
266039ea64 Correct gTests for DateLUT 2022-07-14 19:00:17 +00:00
Raúl Marín
3fd327b23a Use std::filesystem::path::operator/ 2022-07-14 19:25:40 +02:00
avogar
9291d33080 Pass const std::string_view & by value, not by reference 2022-07-14 16:11:57 +00:00
Azat Khuzhin
b20407fab9 Fix NOEXCEPT_SCOPE (before it calls std::terminate and looses the exception)
Current implementation of NOEXCEPT_SCOPE will not work, you cannot
rethrow exception outside the catch block, this will simply terminate
(via std::terminate) the program.
In other words NOEXCEPT_SCOPE macro will simply call std::terminate on
exception and will lost original exception.

But if NOEXCEPT_SCOPE will accept the code that should be runned w/o
exceptions, then it can catch exception and log it, rewrite it in this
way.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-14 17:16:18 +03:00
Amos Bird
96bb6e0cd2
Rename log when rename merge tree tables 2022-07-14 21:22:46 +08:00
Robert Schulze
3d734a0640
Enable -Wnested-anon-types 2022-07-14 12:36:55 +00:00
Robert Schulze
add83f7836
Merge pull request #39213 from ClickHouse/enable-wdeprecated-dynamic-exception-spec
Enable warning "-Wdeprecated-dynamic-exception-spec"
2022-07-14 13:09:18 +02:00
Sergei Trifonov
8a693469f0 Merge branch 'master' into remote-io-bandwidth-limits 2022-07-14 12:38:35 +02:00
Raúl Marín
35d3a0dd1f Don't report system.errors when the disk is not rotational 2022-07-14 11:08:26 +02:00
Antonio Andelic
0e25dbbbeb Fix stateless test 2022-07-14 08:01:20 +00:00
Robert Schulze
110862a11e
Merge pull request #38502 from ClibMouse/Issue_38498
Fixed bug in parsing {..} regex
2022-07-14 08:27:31 +02:00
Nikolai Kochetov
812143c76b
Merge pull request #39160 from azat/threadpool-fix
ThreadPool fixes
2022-07-13 22:54:57 +02:00
Arthur Passos
7a09aa478a Add missing include header for osx builds 2022-07-13 17:45:30 -03:00
Sergei Trifonov
f854507729 merge master and resolve conflicts 2022-07-13 19:07:28 +02:00
Heena Bansal
76cbfedd2a
Merge branch 'master' into Issue_38498 2022-07-13 11:50:26 -04:00
Antonio Andelic
f05f22aa13 Merge branch 'master' into keeper-version-check 2022-07-13 15:25:48 +00:00
Kseniia Sumarokova
71aba5b4c6
Merge pull request #38860 from kssenii/object-storages-refactor
Refactoring of code around object storages, added LocalObjectStorage (extracted this diff from PR #36171)
2022-07-13 16:51:56 +02:00
Arthur Passos
7f4043a3ed Force use of c-ares inet_net_pton and style adjustments 2022-07-13 11:51:43 -03:00
Robert Schulze
87197f8f60
Enable -Wdeprecated-dynamic-exception-spec 2022-07-13 13:49:40 +00:00
Antonio Andelic
93d8b8bb61 small fixes 2022-07-13 13:01:13 +00:00
Azat Khuzhin
68789895a4 ThreadPool: incapsulate Poco::Event and std:🧵:id into State struct
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-13 15:51:49 +03:00
Azat Khuzhin
7ffa15b94b ThreadPool: fix thread_id assignment
As found by @KochetovNicolai before this patch, lambda in
ThreadFromGlobalPool() ctor assigns value only to a copy of the
thread_id value, and so check in joinable() had been working
incorrectly, fix this by changing the value not the shared_ptr itself.

Also it is not safe to assign thread_id w/o atomics, since this can be
racy, so wrap id with std::atomic<>

Fixes: #28431
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-13 15:42:46 +03:00
Azat Khuzhin
25eb82f120 ThreadPool: do not use joinable() internally
joinable() should be used only outside, since internally it is enough to
know `state` to know that something is wrong.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-13 15:42:46 +03:00
Azat Khuzhin
3473b80077 ThreadPool: add some clarification comments
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-13 15:42:46 +03:00
Arthur Passos
395dada988 minor style adjustments 2022-07-13 09:40:56 -03:00
Yakov Olkhovskiy
334b3f3c73
Merge pull request #38864 from azat/fix-rwlock
Fix waiting of shared lock after exclusive lock failure
2022-07-13 02:10:35 -04:00
Arthur Passos
d306c1b6f4 Use Strings alias instead of std::vec<std::string>> 2022-07-12 20:37:39 -03:00
Arthur Passos
cb349c05c5 minor adjustments 2022-07-12 19:27:44 -03:00
Arthur Passos
381d60c510 minor adjustments 2022-07-12 17:55:49 -03:00
Arthur Passos
397d05eb9c Add DNSPTRResolverProvider docs 2022-07-12 14:31:33 -03:00
kssenii
6f29eada80 Merge master 2022-07-12 19:28:18 +02:00
Arthur Passos
d48690d455 Make CaresPTRResolver a singleton through DNSPTRResolverProvider, add comments and address minor comments 2022-07-12 14:21:10 -03:00
mergify[bot]
48688da835
Merge branch 'master' into concurrency-control 2022-07-12 10:57:13 +00:00
Yakov Olkhovskiy
5887deac99
Merge branch 'master' into fix-rwlock 2022-07-11 16:01:16 -04:00
Robert Schulze
1a7727a254
Prefix overridden add_executable() command with "clickhouse_"
A simple HelloWorld program with zero includes except iostream triggers
a build of ca. 2000 source files. The reason is that ClickHouse's
top-level CMakeLists.txt overrides "add_executable()" to link all
binaries against "clickhouse_new_delete". This links against
"clickhouse_common_io", which in turn has lots of 3rd party library
dependencies ... Without linking "clickhouse_new_delete", the number of
compiled files for "HelloWorld" goes down to ca. 70.

As an example, the self-extracting-executable needs none of its current
dependencies but other programs may also benefit.

In order to restore access to the original "add_executable()", the
overriding version is now prefixed. There is precedence for a
"clickhouse_" prefix (as opposed to "ch_"), for example
"clickhouse_split_debug_symbols". In general prefixing makes sense also
because overriding CMake commands relies on undocumented behavior and is
considered not-so-great practice (*).

(*) https://crascit.com/2018/09/14/do-not-redefine-cmake-commands/
2022-07-11 19:36:18 +02:00
Arthur Passos
dcc8c646fd Throw proper DB::Exception in case c-ares initialization fails 2022-07-11 14:29:29 -03:00
Arthur Passos
0c6329bdd3 ares_channel unique_ptr instead of shared_ptr 2022-07-11 10:19:25 -03:00
Arthur Passos
5c221464ba Forward declare ares_channel and apply -wno-reserved-identifier to CARESPTRResolver unit 2022-07-11 10:10:31 -03:00
Sergei Trifonov
43779ec280 add max_remote_{read,write}_network_bandwidth_for_server settings 2022-07-11 14:59:39 +02:00
Antonio Andelic
197388e29c Fix list request 2022-07-11 12:13:50 +00:00
Antonio Andelic
41dd4e13f4 Merge branch 'master' into keeper-version-check 2022-07-11 09:38:20 +00:00
Antonio Andelic
37f799550b
Merge pull request #38072 from lingpeng0314/master
Add Keeper related monitoring data
2022-07-10 09:39:57 +02:00
kssenii
4c88527c8e Review fixes 2022-07-09 19:35:07 +02:00
kssenii
bf1c99daab Refactoring of object storages, add LocalObjectStorage 2022-07-09 12:39:31 +02:00
Arthur Passos
4f4acfabe5 c-ares draft wrapper and draft build rules 2022-07-08 17:52:14 -03:00
Dmitry Novik
99cef119e1 Remove logging from OvercommitTracker 2022-07-08 15:34:23 +00:00
Roman Vasin
12f4a48957 Extend LUT range to 1900..2300 2022-07-08 06:48:05 +00:00
Nikolay Degterinsky
5cd06ac488
Merge pull request #38947 from soyayaos/master
Rename NUMBER_OF_DIMENSIONS_MISMATHED const to NUMBER_OF_DIMENSIONS_MISMATCHED
2022-07-07 22:25:42 +02:00
Alexander Tokmakov
b0f8970d07
Merge pull request #38961 from Algunenano/reduce_zk_eexists
Stop reporting Zookeeper "Node exists" exceptions in system.errors when they are expected
2022-07-07 23:16:46 +03:00
Alexander Tokmakov
1d93dc1c9a
Merge pull request #38963 from ClickHouse/fix_38962
Avoid weird exception in Keeper
2022-07-07 22:01:35 +03:00
Robert Schulze
f15d9ca59c
Merge pull request #38774 from zvonand/zvonand-nnd
Reintroduce nonNegativeDerivative()
2022-07-07 20:39:13 +02:00
Alexander Tokmakov
7630fc76ae avoid weird exception 2022-07-07 17:19:05 +02:00
Raúl Marín
c3935000a8 Avoid reporting ZK EEXIST errors on checkPartChecksumsAndCommit 2022-07-07 16:10:05 +02:00
Alexander Tokmakov
fdd2db4ace
Move check for denied allocations (#38858)
* move check for denied allocations

* remove include

* make hardening softer
2022-07-07 14:24:36 +02:00
Antonio Andelic
e96af48e28 Polish 2022-07-07 11:35:02 +00:00
Vladimir Galunshchikov
cacc833da6 Rename NUMBER_OF_DIMENSIONS_MISMATHED const to NUMBER_OF_DIMENSIONS_MISMATCHED 2022-07-07 11:15:59 +03:00
Alexey Milovidov
02adad3f27
Merge pull request #37860 from amosbird/remove-duplicated-log
Remove duplicate peak mem log
2022-07-07 08:16:06 +03:00
Andrey Zvonov
7de39d9b15 Merge branch 'master' of github.com:ClickHouse/ClickHouse into zvonand-nnd 2022-07-06 10:59:35 +03:00
HeenaBansal2009
d89ba2e5d9 Review Comments 2022-07-05 21:18:39 -07:00
Azat Khuzhin
98cd92017e Fix waiting of shared lock after exclusive lock failure
When WRITE lock attemp fails (exclusive lock for ALTER/DELETE), and
there are multiple READ locks (shared lock for SELECT/INSERT), i.e. one
INSERT is in progress and one SELECT is queued after ALTER/DELETE
started but before it fails, this SELECT will wait until INSERT will
finishes.

This happens because in case of WRITE lock failure it does not notify
the next READ lock that can be acquired.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-05 19:12:47 +03:00
Kseniia Sumarokova
3e803006a2
Merge pull request #37171 from tchepavel/nats-integration
Nats Integration
2022-07-05 17:47:02 +02:00
alesapin
bd8a3ee841
Merge pull request #38338 from ClickHouse/zookeeper-add-extra-list-argument
Extend ZooKeeper list request with support for filtering persistent or ephemeral nodes only
2022-07-05 12:53:51 +02:00
Kseniia Sumarokova
6c3d648f49
Merge branch 'master' into nats-integration 2022-07-04 21:06:07 +02:00
zvonand
8a270c01e9 fix floating point in intervals 2022-07-04 20:45:05 +03:00
Arthur Passos
5c00dcd884 Link cpp-dns/udns unconditionally and update submodules to clickhouse fork 2022-07-04 10:07:03 -03:00
Arthur Passos
dcda1c5eb9 Fix style case and DNS error message 2022-07-04 10:06:27 -03:00
Arthur Passos
d66154e697 Test host_regexp against all PTR records instead of only one 2022-07-04 10:05:28 -03:00
Kruglov Pavel
3d47416f8b
Merge pull request #38559 from ClickHouse/Avogar-patch-1
Add logging in Epoll and TimerDescriptor in case of EINTR
2022-07-04 15:05:08 +02:00
Alexey Milovidov
7adc87a37d
Merge pull request #38413 from nickitat/cache_values_inside_hash_table_grower
Precalculate values inside `HashTableGrower`
2022-07-02 23:30:24 +03:00
Kruglov Pavel
eaf8397c13
Fix style 2022-07-01 19:51:07 +02:00
Kruglov Pavel
fe0dad5429
Update src/Common/TimerDescriptor.cpp 2022-07-01 16:23:20 +02:00
Kruglov Pavel
4550acdc35
Update src/Common/Epoll.cpp
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
2022-07-01 16:23:03 +02:00
Robert Schulze
2a1ede0f5a
Merge pull request #38589 from ClickHouse/fix-zero-bytes-in-haystack
Fix countSubstrings() & position() on patterns with 0-bytes
2022-07-01 16:15:43 +02:00
zvonand
3b5332d15e Revert "Revert "Non Negative Derivative window function""
This reverts commit dea3b5bfce.
2022-07-01 18:59:07 +05:00
Nikolai Kochetov
b7529986c0 Use separate counter for RSS in global memory tracker. 2022-07-01 12:09:32 +00:00
Vitaly Baranov
cadb496894
Merge pull request #38537 from vitlibar/backup-improvements-8
Backup Improvements 8
2022-07-01 11:20:46 +02:00
Alexey Milovidov
20841f0e1e
Merge pull request #38551 from ClickHouse/revert-37628-non-neg-deriv
Revert "Non Negative Derivative window function"
2022-07-01 02:46:28 +03:00
Robert Schulze
1e3b5bfcb7
Fix test 00233_position_function_family 2022-06-30 11:43:25 +00:00
Vitaly Baranov
461a31f237 Improve gathering metadata for backup - part 2. 2022-06-30 08:37:17 +02:00
Robert Schulze
81bb2242fd
Fix countSubstrings() & position() on patterns with 0-bytes
SQL functions countSubstrings(), countSubstringsCaseInsensitive(),
countSubstringsUTF8(), position(), positionCaseInsensitive(),
positionUTF8() with non-const pattern argument use fallback sorters
LibCASCIICaseSensitiveStringSearcher and LibCASCIICaseInsensitiveStringSearcher
which call ::strstr(), resp. ::strcasestr(). These functions assume that
the haystack is 0-terminated and they even document that. However, the
callers did not check if the haystack contains 0-byte (perhaps because
its sort of expensive). As a consequence, if the haystack contained a
zero byte in it's payload, matches behind this zero byte were ignored.

    create table t (id UInt32, pattern String) engine = MergeTree() order by id;
    insert into t values (1, 'x');
    select countSubstrings('aaaxxxaa\0xxx', pattern) from t;

We returned 3 before this commit, now we return 6
2022-06-29 21:41:18 +00:00
Nikita Taranov
7d2e8b0883 clean up 2022-06-29 22:15:12 +02:00
Kruglov Pavel
77873e75bf
Update TimerDescriptor.cpp 2022-06-29 13:01:14 +02:00
Kruglov Pavel
30fd086b5e
Add logging in Epoll and TimerDescriptor in case of EINTR 2022-06-29 12:59:18 +02:00
Antonio Andelic
7a8fbbf132 Merge branch 'master' into zookeeper-add-extra-list-argument 2022-06-29 08:31:03 +00:00
Antonio Andelic
1d26446f84 Define new list request type 2022-06-29 08:30:39 +00:00
Robert Schulze
bb441faa42
Merge pull request #38491 from ClickHouse/clang-tidy-in-branches
Fix some clang-tidy warnings in headers
2022-06-29 10:22:04 +02:00
Alexey Milovidov
dea3b5bfce
Revert "Non Negative Derivative window function" 2022-06-29 08:56:15 +03:00
HeenaBansal2009
608bfb8453 Fixed {..} regex parsing as shell does 2022-06-28 12:49:31 -07:00