Commit Graph

18400 Commits

Author SHA1 Message Date
Kseniia Sumarokova
ca7395e374
Merge branch 'master' into materialized-postgresql-fix 2021-10-03 11:56:57 +03:00
kssenii
e4d1d43a34 Fixes 2021-10-03 08:55:50 +00:00
alexey-milovidov
ac57e057a1
Merge pull request #23028 from ClickHouse/cast_to_value_or_default
Merging #21330
2021-10-03 11:00:48 +03:00
Alexey Milovidov
9bc32c95c0 Miscellaneous 2021-10-03 10:01:09 +03:00
alexey-milovidov
59fdfd18db
Merge pull request #29667 from ClickHouse/clickhouse-obfuscator-embedded-dictionaries
Fix issue: clickhouse-format --obfuscate cannot process queries with embedded dictionaries
2021-10-03 05:57:03 +03:00
Alexey Milovidov
7269b20ecc Fix issue: clickhouse-format --obfuscate cannot process queries with embedded dictionaries 2021-10-03 00:46:51 +03:00
Mike Kot
585e6d53ff fix 2021-10-02 22:55:26 +02:00
Mike Kot
57e2744264 Fixing other imports 2021-10-02 21:47:35 +02:00
Mike Kot
38232c286d fixing paths 2021-10-02 21:45:05 +02:00
Mike Kot
65e6e211b4 Merge remote-tracking branch 'upstream/master' into improvement/fn-traits 2021-10-02 21:37:50 +02:00
Anton Popov
b64bbb54aa
Merge pull request #29203 from CurtizJ/fix-ubsan
Fix integer underflow in function `quantile`
2021-10-02 20:36:53 +03:00
Maksim Kita
87bb596875 Fixed modelEvaluate 2021-10-02 17:15:32 +03:00
Maksim Kita
395119339f Merge branch 'master' into rename-common 2021-10-02 17:15:10 +03:00
Maksim Kita
1a200f770c
Merge pull request #29662 from ClickHouse/model-evaluate-own-file
Move modelEvaluate function to its own file
2021-10-02 17:12:16 +03:00
Maksim Kita
c966806205
Merge pull request #29529 from kitaisreal/external-xml-loaders-reload-with-server-configuration-support
ExternalXMLLoaders reload with server configuration support
2021-10-02 16:26:28 +03:00
Maksim Kita
8a772e0bc0
Update ExternalLoaderXMLConfigRepository.cpp 2021-10-02 16:26:13 +03:00
kssenii
6935cc667b Fix tests 2021-10-02 12:52:00 +00:00
Mike Kot
5d38930a3c Fixing gcc build due to a bug in compiler 2021-10-02 14:27:52 +02:00
kssenii
28aeb30d4a Support full schema list 2021-10-02 11:15:24 +00:00
alexey-milovidov
654b9b1234
Merge pull request #29605 from qoega/compressed-buffer-fuzz
Improve CompressedReadBuffer
2021-10-02 12:04:01 +03:00
alexey-milovidov
86d1ce63cf
Merge pull request #29649 from CurtizJ/merging-29376
Merging #29376
2021-10-02 12:02:42 +03:00
Alexey Milovidov
ed54a4c944 Fix build 2021-10-02 11:49:25 +03:00
Alexey Milovidov
922872fb9a Move modelEvaluate function to its own file 2021-10-02 11:39:26 +03:00
kssenii
c601db109f Correct nerge 2021-10-02 08:39:15 +00:00
Alexey Milovidov
2ad5dbdfe8 Rename "common" to "base" 2021-10-02 11:30:38 +03:00
Alexey Milovidov
fe6b7c77c7 Rename "common" to "base" 2021-10-02 10:13:14 +03:00
alexey-milovidov
f21ea8f160
Update CompressedReadBufferBase.cpp 2021-10-02 06:13:46 +03:00
Anton Popov
bb92ff52d8
Update IMergeTreeDataPart.cpp 2021-10-02 00:50:19 +03:00
Anton Popov
d404efbf7e add test for freeze in-memory parts 2021-10-01 22:05:36 +03:00
Maksim Kita
ad6d143303
Merge pull request #29574 from kitaisreal/jit-fix-short-circuit-with-alias
ExpressionJIT fix short-circuit with alias
2021-10-01 21:18:31 +03:00
Vitaly Baranov
27f6d5864d
Merge pull request #29060 from azat/inter-server-secret-auth-fix
Do not allow to reuse previous credentials in case of inter-server secret
2021-10-01 20:44:48 +03:00
Anton Popov
f0363c524d Merge branch 'master' of git://github.com/mo-avatar/ClickHouse into merging-29376 2021-10-01 20:29:33 +03:00
Maksim Kita
57666725f9
Merge pull request #29623 from kitaisreal/bloom-filter-indexes-map-support-fix-unsafe-identifier-cast
BloomFilter indexes map data type support fix unsafe identifier cast
2021-10-01 19:28:04 +03:00
Nikita Mikhaylov
b2f7b6fae8
Fix race between MergeTask and storage destruction (#29614) 2021-10-01 18:55:04 +03:00
kssenii
3bc3a01f09 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into materialized-postgresql-fix 2021-10-01 15:53:27 +00:00
Mike Kot
38b02b121a Merge remote-tracking branch 'upstream/master' into improvement/fn-traits 2021-10-01 16:55:28 +02:00
Mike Kot
5e560ff9d7 fix 2021-10-01 16:55:01 +02:00
Maksim Kita
fe6bb1bb1e Fixed tests 2021-10-01 17:33:14 +03:00
Vladimir C
ec966b7df5
Merge pull request #27933 from mathalex/numeric_tuple_functions 2021-10-01 16:18:52 +03:00
Maksim Kita
c793c8e7fa BloomFilter indexes map data type support fix unsafe identifier cast 2021-10-01 14:40:00 +03:00
Maksim Kita
30220529b7
Merge pull request #29573 from ClickHouse/fix_segfault_in_add_database_visitor
Fix nullpointer dereference in AddDefaultDatabaseVisitor
2021-10-01 12:44:15 +03:00
Maksim Kita
b8702e613d Fixed tests 2021-10-01 12:37:04 +03:00
alexey-milovidov
b29e877f26
Merge pull request #29182 from ClickHouse/yandex-to-clickhouse-in-configs
Replace `<yandex>` to `<clickhouse>` in configs and more.
2021-10-01 12:24:12 +03:00
Maksim Kita
47f14d3ea6 Fixed typo 2021-10-01 12:09:28 +03:00
Yatsishin Ilya
2c0071bc6d wip 2021-10-01 09:32:54 +03:00
Alexey Milovidov
f919271096 Compatibility 2021-10-01 04:46:41 +03:00
Nikita Tikhomirov
37f76d60ff Added MD4 and SHA384 functions. Refactoring the length of hashes in variables. 2021-10-01 04:19:50 +03:00
Alexey Milovidov
4271f8c738 Merge remote-tracking branch 'origin/master' into yandex-to-clickhouse-in-configs 2021-10-01 01:33:58 +03:00
Azat Khuzhin
91f6cf44b3 Fix SessionLog::addLoginSuccess() for ClientInfo::Interface::TCP_INTERSERVER
In this case there there can be no user.
CI report [1]:

    Address: 0x1f Access: read. Address not mapped to object.
    Stack trace: 0x24494b2f 0x244784c6 0x260fe1af 0x260ed672 0x260ddffa 0x26104880 0x2d62f3af 0x2d6300a1 0x2d926666 0x2d91fb7a 0x7f8bcea3c609 0x7f8bce963293
    3.1. inlined from ./obj-x86_64-linux-gnu/../contrib/libcxx/include/string:0: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string>
    3. ../src/Interpreters/SessionLog.cpp:216: DB::SessionLog::addLoginSuccess(StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag> const&, std::__1::optional<std::__1::basic_string<char, st>
    4. ./obj-x86_64-linux-gnu/../src/Interpreters/Session.cpp:0: DB::Session::makeQueryContextImpl(DB::ClientInfo const*, DB::ClientInfo*) const @ 0x244784c6 in /usr/bin/clickhouse
    5.1. inlined from ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:3299: std::__1::shared_ptr<DB::Context>::swap(std::__1::shared_ptr<DB::Context>&)
    5.2. inlined from ../contrib/libcxx/include/memory:3243: std::__1::shared_ptr<DB::Context>::operator=(std::__1::shared_ptr<DB::Context>&&)
    5. ../src/Server/TCPHandler.cpp:1208: DB::TCPHandler::receiveQuery() @ 0x260fe1af in /usr/bin/clickhouse
    6. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:0: DB::TCPHandler::receivePacket() @ 0x260ed672 in /usr/bin/clickhouse
    7. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:0: DB::TCPHandler::runImpl() @ 0x260ddffa in /usr/bin/clickhouse
    8. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:1643: DB::TCPHandler::run() @ 0x26104880 in /usr/bin/clickhouse

  [1]: https://clickhouse-test-reports.s3.yandex.net/29060/c087fc0ed5fbea133eb3dc3a64b8db93a81d0ece/integration_tests_flaky_check_(asan).html#fail1
2021-10-01 01:13:15 +03:00
Azat Khuzhin
e8a90b8ff2 Do not allow to reuse previous credentials in case of inter-server secret
Before this patch INSERT via Buffer/Kafka may re-use previously set user
for that connection, while this is not correct, it should reset the
user, and use global context.

Note, before [1] there was a fallback to default user, but that code had
been removed, and now it got back.

  [1]: 0159c74f21 ("Secure inter-cluster query execution (with initial_user as current query user) [v3]")

Also note, that context for Buffer table (and others) cannot be changed,
since they don't have any user only profile.

I've tested this patch manually using the following:

    create table dist (key Int) engine=Distributed(test_cluster_two_shards_secure, default, data, key);
    create table buffer (key Int) engine=Buffer(default, dist, 1, 0, 0, 0, 0, 0, 0);
    create table data (key Int) engine=Memory();

    # to start the connection with readonly user
    $ clickhouse-client --user readonly -q 'select * from dist'
    $ clickhouse-client -q 'insert into buffer values (1)'
    # before this patch this produces errors like:
    # 2021.09.27 23:46:48.384920 [ 19474 ] {} <Error> default.dist.DirectoryMonitor: Code: 164. DB::Exception: Received from 127.0.0.2:9000. DB::Exception: readonly: Cannot execute query in readonly mode. Stack trace:

v2: reset the authentication instead of using default user (as suggested by @vitlibar)
v3: reset Session::user and introduce ClientInfo::resetAuthentication (as suggested by @vitlibar)
v4: reset the session every time in interserver mode (suggested by @vitlibar)
2021-10-01 01:13:15 +03:00