Commit Graph

21155 Commits

Author SHA1 Message Date
Nikolai Kochetov
b84591d17a
Merge pull request #32862 from ClickHouse/fix-mv-result-with-many-chunks
Fix MV query with multiple chunk result.
2021-12-23 14:37:17 +03:00
Raúl Marín
b94dbb64d6 Improvements based on PR review 2021-12-23 11:56:07 +01:00
Kruglov Pavel
a1455c0f2a
Merge pull request #32981 from Avogar/fix-csv-tuples
Fix tuple output in CSV format
2021-12-23 13:27:34 +03:00
alexey-milovidov
f005d6d316
Update Block.cpp 2021-12-23 13:00:38 +03:00
kssenii
8cf52918b9 clickhouse local send profile info 2021-12-23 12:37:29 +03:00
gulige
6bab5c8651
code refactoring as @alexey-milovidov suggested 2021-12-23 17:26:47 +08:00
Nikolay Degterinsky
826f7cb0f5
Merge pull request #32240 from benbiti/master
Fix unix timestamp Millisecond convert to DateTime64, fractional part calc reversed
2021-12-23 12:11:53 +03:00
Alexey Milovidov
d98675b49c Whitespace 2021-12-23 11:50:40 +03:00
Nikolay Degterinsky
6757afa052
Merge pull request #32843 from nkolotov/fix_echo_option_not_used_in_batch_mode
Fixed --echo option is not used by clickhouse-client in batch mode with single query
2021-12-23 11:37:02 +03:00
Raúl Marín
88b8fd8b60 Merge remote-tracking branch 'blessed/master' into libcxx13_take2 2021-12-23 09:16:19 +01:00
gulige
ec462f7506
Merge branch 'ClickHouse:master' into master 2021-12-23 16:12:47 +08:00
Kseniia Sumarokova
f0434f21ce
Merge pull request #33039 from kssenii/fix-azure-exception
Fix exception in azure write buffer desctructor
2021-12-23 10:26:40 +03:00
alexey-milovidov
0f8295de98
Merge pull request #33046 from ClickHouse/fix-prefetch-for-lc
Fix preferch for LowCardinality.
2021-12-23 08:56:16 +03:00
alexey-milovidov
8c9843caf2
Merge pull request #32982 from azat/http-context-leak
Fix Context leak in case of cancel_http_readonly_queries_on_client_close
2021-12-23 07:58:18 +03:00
alexey-milovidov
476b8266a1
Merge pull request #33065 from ClickHouse/merge-33050
Merge #33050
2021-12-23 07:52:00 +03:00
alexey-milovidov
2a1099812e
Merge pull request #33062 from ClickHouse/merge-33022
Merge #33022
2021-12-23 07:51:26 +03:00
alexey-milovidov
12fb830181
Merge pull request #33061 from ClickHouse/merge-33024
Merge #33024
2021-12-23 07:50:11 +03:00
alexey-milovidov
aea5e40705
Merge pull request #33063 from ClickHouse/merge-33025
Merge #33025
2021-12-23 07:49:18 +03:00
Vitaly Baranov
b9090029e6
Merge pull request #32662 from vitlibar/improve-exceptions-usage-in-access-control
Improve exceptions usage in access control
2021-12-23 06:48:28 +03:00
Vitaly Baranov
7660530fcc
Merge pull request #32955 from azat/read-fix
Fix UB in case of unexpected EOF during filling a set from HTTP query
2021-12-23 06:41:14 +03:00
Alexey Milovidov
df0e7d9ed3 Merge branch 'Issue81' of github.com:DevTeamBK/ClickHouse into merge-33050 2021-12-23 02:03:03 +03:00
Alexey Milovidov
b2d9e33882 Whitespaces 2021-12-23 02:02:36 +03:00
Alexey Milovidov
53c83e4813 Merge branch 'Issue77' of github.com:DevTeamBK/ClickHouse into merge-33025 2021-12-23 01:36:46 +03:00
Alexey Milovidov
f37ff32c37 Whitespaces 2021-12-23 01:33:47 +03:00
mreddy017
3e50217501 Remove the additional white space as per the pipeline build error. 2021-12-23 01:30:56 +03:00
mreddy017
10eb2dbdb7 Addressing review comments 2021-12-23 01:30:56 +03:00
Harry-Lee
846c46ac4b Fix issue #80: union index out of boundary 2021-12-23 01:30:56 +03:00
Alexey Milovidov
3e059a095b Corrections 2021-12-23 01:25:35 +03:00
Alexey Milovidov
ba77993943 Merge branch 'Issue20' of github.com:DevTeamBK/ClickHouse into merge-33024 2021-12-23 01:23:47 +03:00
Vitaly Baranov
c9b9c90615 Don't throw in unexceptional cases: authenticate(). 2021-12-23 01:17:50 +03:00
Vitaly Baranov
61bfe930db When trying to update readonly and non-readonly access storages in one query, throw after updating non-readonly ones. 2021-12-23 01:17:45 +03:00
Rajkumar
a75d3d1c83 Review comments 2021-12-22 13:39:45 -08:00
Kseniia Sumarokova
639c2c1ce7
Merge pull request #32976 from Avogar/fix-hdfs-url-check
Fix hdfs url check
2021-12-22 23:57:49 +03:00
Rajkumar
afe9e6a325 Addressing review comment 2021-12-22 11:42:22 -08:00
Kseniia Sumarokova
764bb1181f
Merge pull request #33017 from stigsb/table-overrides-drop-add-column-support
Remove the possibility of adding columns with table overrides
2021-12-22 22:30:21 +03:00
Rajkumar
852889f995 Addressing review comment 2021-12-22 08:54:33 -08:00
tavplubix
c297c2c4c3
Revert "Dictionaries added Date32 type support" 2021-12-22 19:41:52 +03:00
Dmitry Novik
1c83f31e51
Merge pull request #31885 from amosbird/optimizeprojectionmat
Optimize single part projection materialization
2021-12-22 19:36:40 +03:00
Maksim Kita
97b0a343f8
Merge pull request #32971 from kitaisreal/dictionaries-added-date32-type-support
Dictionaries added Date32 type support
2021-12-22 19:22:01 +03:00
Nikolay Degterinsky
3d34f7421a
Merge pull request #33049 from evillique/fix_pr
Fix merge #33021
2021-12-22 18:59:24 +03:00
Dmitry Novik
d256c3a9ca
Merge pull request #29224 from ClickHouse/fix_IP_conversion
Merging #27914
2021-12-22 18:36:13 +03:00
Kseniia Sumarokova
01f2e4c00d
Merge pull request #33037 from kssenii/fix-s3-empty-file
Fix s3 table function reading empty file
2021-12-22 18:17:29 +03:00
Nikolay Degterinsky
f1d9c3237d Fix merge 2021-12-22 14:25:26 +00:00
Nikolay Degterinsky
e1a58d0889
Merge pull request #33021 from DevTeamBK/Issue135
Fix null pointer dereference in low cardinality data
2021-12-22 17:03:23 +03:00
mergify[bot]
04f727e84c
Merge branch 'master' into read-fix 2021-12-22 13:49:04 +00:00
tavplubix
d8fb293d57
Merge pull request #32900 from zzsmdfj/issue/#15182_MaterializeMySQL_support_bit_type
Add support for BIT data type in MaterializedMySQL
2021-12-22 15:58:29 +03:00
Nikolai Kochetov
bb24a494ca Fix preferch for LowCardinality. 2021-12-22 15:26:16 +03:00
kssenii
65c5334bb0 Safer 2021-12-22 14:22:14 +03:00
Maksim Kita
60d16afde7
Merge pull request #33027 from ClickHouse/merge-33023
Merge #33023
2021-12-22 13:44:14 +03:00
kssenii
060d3228e9 Fix 2021-12-22 13:43:21 +03:00
Maksim Kita
5d4b0f8f1a
Merge pull request #33026 from ClickHouse/remove-old-code-config-processor
Remove obsolete code from ConfigProcessor.
2021-12-22 13:34:53 +03:00
Maksim Kita
3e388db839 Dictionaries fix Date32 attribute underlying type 2021-12-22 13:21:59 +03:00
kssenii
d8ed4db6d4 Fix 2021-12-22 11:42:23 +03:00
zzsmdfj
039afc5cfe #15182_MaterializeMySQL_support_bit_type-improve bit2Uint64 function 2021-12-22 16:17:18 +08:00
Stig Bakken
1cc70ad524 Remove the possibility of adding columns with table overrides
(except ALIAS columns)

Supporting this properly requires more comprehensive changes.
2021-12-22 08:20:14 +01:00
Kseniia Sumarokova
5ae2f0028f
Merge pull request #32961 from kssenii/fix-positional-args
Fix for positional args
2021-12-22 09:41:55 +03:00
Kseniia Sumarokova
484a4d62dd
Merge pull request #32835 from kssenii/fising-s3
Fix optimization with lazy seek for async reads from remote fs
2021-12-22 09:38:23 +03:00
Boris Kuschel
c62d9e2f2d Out of Bounds Column Index
Signed-off-by: Boris Kuschel <Boris.Kuschel@ibm.com>
2021-12-21 22:43:47 -05:00
Meena-Renganathan
91036e729c Fixed the indentation
Signed-off-by: Meena-Renganathan <Meena.Renganathan@ibm.com>
2021-12-21 16:07:24 -08:00
Boris Kuschel
c452b3fad9 Modifed the code to handle the sysconf() fialure
Signed-off-by: Boris Kuschel <Boris.Kuschel@ibm.com>
2021-12-21 18:33:00 -05:00
Alexey Milovidov
7b48cb813e Merge branch 'Issue129' of github.com:DevTeamBK/ClickHouse into merge-33023 2021-12-22 02:17:00 +03:00
Alexey Milovidov
088d14b885 Remove obsolete code from ConfigProcessor. 2021-12-22 02:13:31 +03:00
Boris Kuschel
68de95afc9 Native Format Parsing - Integer Overflow Resizing Arrays
Signed-off-by: Boris Kuschel <Boris.Kuschel@ibm.com>
2021-12-21 18:10:51 -05:00
Dmitry Novik
38c1e81752 fixup 2021-12-21 22:00:08 +03:00
kssenii
de70a57700 Better 2021-12-21 21:48:25 +03:00
benbiti
81a7a393c8 fix unix timestamp convert, fractional reversed 2021-12-22 01:32:16 +08:00
Dmitry Novik
56917ca0ff Fix WriteBuffer initialization 2021-12-21 18:49:20 +03:00
Amos Bird
f00cc3b944
optimize single part projection materialization 2021-12-21 22:39:06 +08:00
alesapin
084a1b5ac2
Merge pull request #32988 from JackyWoo/keeper_handler_remove_operation_when_response_sent
keeper handler should remove operation when response sent
2021-12-21 17:25:40 +03:00
mergify[bot]
7da6d8b310
Merge branch 'master' into fix_IP_conversion 2021-12-21 12:16:05 +00:00
Kseniia Sumarokova
de7a5dd1e6
Update ExpressionListParsers.cpp 2021-12-21 12:39:31 +03:00
alesapin
754785fee5 Better container 2021-12-21 11:07:24 +03:00
kssenii
ebcb66a361 Fix 2021-12-21 10:58:02 +03:00
mergify[bot]
7cf7c5d247
Merge branch 'master' into keeper_handler_remove_operation_when_response_sent 2021-12-21 07:55:19 +00:00
mergify[bot]
649226853d
Merge branch 'master' into fix-clang-tidy 2021-12-21 06:05:57 +00:00
Azat Khuzhin
4230f04f72 Fix UB in LimitReadBuffer in case of unexpected EOF
Fixes the following possible assertions:
- ./src/IO/ReadBuffer.h:58: bool DB::ReadBuffer::next(): Assertion `!hasPendingData()' failed.
- ./src/IO/LimitReadBuffer.cpp:17: virtual bool DB::LimitReadBuffer::nextImpl(): Assertion `position() >= in->position()' failed.

Fixes: 02151_http_s_structure_set_eof
2021-12-21 08:38:41 +03:00
Azat Khuzhin
08ced87880 Rework MultipartReadBuffer::skipToNextBoundary()
As suggested by @vitlibar
2021-12-21 08:38:41 +03:00
Azat Khuzhin
d7c7a91f66 Check that at least one boundary exist in HTMLForm::readMultipart() 2021-12-21 08:38:41 +03:00
Azat Khuzhin
4dfa9324d1 Check for EOF in MultipartReadBuffer::skipToNextBoundary()
Otherwise you may hit internal assertion when client goes away:

    clickhouse-server: ./src/Server/HTTP/HTMLForm.cpp:245: bool DB::HTMLForm::MultipartReadBuffer::skipToNextBoundary(): Assertion `boundary_hit' failed.

Fixes: 02151_http_s_structure_set_eof
2021-12-21 08:38:41 +03:00
JackyWoo
7a19570853 keeper handler should remove operation when response sent 2021-12-21 11:43:14 +08:00
kssenii
30996b2448 Fix 2021-12-21 01:19:51 +03:00
alexey-milovidov
04fb8aeaa5
Merge pull request #32946 from antonio2368/feature/hints-for-settings
Hints for invalid settings in query and HTTP requests
2021-12-21 00:52:42 +03:00
kssenii
175ad8a989 Fix 2021-12-21 00:20:08 +03:00
Maksim Kita
26ea47982e
Merge pull request #32965 from save-my-heart/fix-data-part-modification-time
fix wrong modification_time after move part
2021-12-21 00:05:27 +03:00
Kseniia Sumarokova
2ac7897470
Merge pull request #32841 from lingtaolf/feature/add-clickhouse-client-hints
Add clickhouse client hints
2021-12-20 23:48:50 +03:00
Vitaly Baranov
be44743ebe Don't throw in unexceptional cases: update(). 2021-12-20 23:10:46 +03:00
Vitaly Baranov
ed94c640fa Don't throw in unexceptional cases: remove(). 2021-12-20 23:10:43 +03:00
Vitaly Baranov
551fcc55e8 Don't throw in unexceptional cases: insert(). 2021-12-20 23:09:55 +03:00
mergify[bot]
e21c04ff9c
Merge branch 'master' into fix-data-part-modification-time 2021-12-20 18:58:47 +00:00
Vitaly Baranov
8c4e689da3 Don't throw in unexceptional cases: read() & readName() 2021-12-20 21:26:35 +03:00
Vitaly Baranov
a87f0b483e Replace function IAccessStorage::canInsert() with isReadOnly(). 2021-12-20 21:26:35 +03:00
Vitaly Baranov
6721060649 Rename function IAccessStorage::login() -> IAccessStorage::authenticate().
Remove functions IAccessStorage::hasSubscriptionImpl() and IAccessStorage::existsImpl().
2021-12-20 21:26:27 +03:00
Vitaly Baranov
c01d0f95c3 Remove the function IAccessStorage::getIDOfLoggedUser() and move its functionality to login(AlwaysAllowCredentials). 2021-12-20 21:24:38 +03:00
Azat Khuzhin
a9f80dd705 Fix Context leak in case of cancel_http_readonly_queries_on_client_close
To handle cancel_http_readonly_queries_on_client_close=true context
attaches progress callback with holding a copy of the current context,
and this creates recursive context reference and so shared_ptr will be
never released, [1] contains simplest example.

One example of a memory leak, external tables passed with HTTP query
(s_structure + file upload), since they are stored in the context, and
can occupate enough memory to make it visible to user.

Note, that the lifetime of the Context should be fine, since callback
can be called only when query is executed.

  [1]: Example of recursive reference

       ```c
       #include <memory>
       #include <functional>
       #include <cassert>

       bool released = true;

       class Context : public std::enable_shared_from_this<Context>
       {
           using Func = std::function<void()>;
           Func func;

       public:
           Context()  { released = false; }
           ~Context() { released = true; }
           Context(const Context & context) = delete;

           void addCallback(Func func_)
           {
               func = func_;
           }
       };

       int main()
       {
           {
               auto context = std::make_shared<Context>();
               context->addCallback([context]() {});
           }
           assert(released == true);
       }
       ```
2021-12-20 21:05:38 +03:00
Azat Khuzhin
dd8c64e380 Set QueryScope earlier for HTTP queries 2021-12-20 21:05:38 +03:00
Nikolai Kochetov
35883e0dae
Merge pull request #32979 from ClickHouse/decrease-some-s3-log-level
Decrease log level for some s3 messages.
2021-12-20 20:56:22 +03:00
Raúl Marín
36164a72c2 Missing include 2021-12-20 18:17:10 +01:00
Maksim Kita
dd0d3de050
Merge pull request #32970 from kitaisreal/loops-remove-postfix-increment
Loops remove postfix increment
2021-12-20 19:51:07 +03:00
Maksim Kita
daa23a2827
Merge pull request #32973 from kitaisreal/short-circuit-throw-if-support
Short circuit evaluation function throwIf support
2021-12-20 19:50:53 +03:00
Raúl Marín
b553e51969 Merge remote-tracking branch 'blessed/master' into libcxx13_take2 2021-12-20 17:47:57 +01:00