Commit Graph

73976 Commits

Author SHA1 Message Date
olgarev
12dedaf961
Update docs/ru/engines/database-engines/materialized-postgresql.md
Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
2021-10-01 09:29:25 +03:00
olgarev
d3ab76771c Initial 2021-10-01 05:55:17 +00:00
Tatiana Kirillova
f25ec7bdf9
odd space 2021-10-01 08:48:59 +03:00
Yatsishin Ilya
ada6c50aaa Improve some tests 2021-10-01 08:44:50 +03:00
Yatsishin Ilya
05e8441b59 Merge remote-tracking branch 'origin' into improve-integration-2 2021-10-01 07:48:28 +03:00
Nikita Tikhomirov
5de80a057f Added EOL to the end of the test file 02041_openssl_hash_functions_test. 2021-10-01 07:37:59 +03:00
Nikita Tikhomirov
cb7e373bfe Disable fasttest for 02041_openssl_hash_functions_test test. 2021-10-01 07:22:20 +03:00
Nikita Tikhomirov
a49d4d3092 Added tests for OpenSSL hash functions. 2021-10-01 06:23:35 +03:00
alexey-milovidov
7a3f85cda1
Update test.py 2021-10-01 05:04:12 +03:00
Alexey Milovidov
32c0b22a6a Skip test for executable table function under MSan 2021-10-01 05:02:57 +03:00
Alexey Milovidov
f919271096 Compatibility 2021-10-01 04:46:41 +03:00
Nikita Tikhomirov
2d23f40fd2 Added documentation for MD4 and SHA384 functions. Supplementing documentation with SHA-512 where it was missing. 2021-10-01 04:38:34 +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
Azat Khuzhin
1af02f02bd Add a test for INSERT w/o user in interserver mode
v2: ensure that the test fails with the version w/o fix
v3: force connect by modifying config and reload it
v4: add comments
2021-10-01 01:13:08 +03:00
Azat Khuzhin
2822f71eec tests/integration/helpers: add query_id for query() 2021-10-01 01:13:08 +03:00
Dmitry Novik
ad3c3f72e4 Fix docker/test/util declaration 2021-10-01 01:04:06 +03:00
Nikita Mikhaylov
9756b8dc33
Added an ability to execute more merges and mutations than threads, added new settings (#29140) 2021-10-01 00:26:24 +03:00
mergify[bot]
dfb2430907
Merge branch 'master' into improvement/fn-traits 2021-09-30 21:14:28 +00:00
Anton Popov
515cc74530 generalize code in IColumn::updatePermutation 2021-10-01 00:11:54 +03:00
Maksim Kita
42e37f4fad Added test 2021-09-30 21:20:15 +03:00
Kseniia Sumarokova
3e0d4faa1e
Merge pull request #29503 from azat/external-db-log-query
Log queries to external databases (since they may be rewritten)
2021-09-30 21:08:57 +03:00
Kseniia Sumarokova
3457868f3d
Merge pull request #26231 from kssenii/interactive-mode-for-clickhouse-local
clickhouse-local interactive mode, merge clickhouse-client and clickhouse-local code
2021-09-30 19:31:34 +03:00
Maksim Kita
2517f70d75
Merge pull request #29568 from kitaisreal/dict-get-db-name-test-fix
Fixed test with dictGet without database name as column default value
2021-09-30 19:26:09 +03:00
Maksim Kita
d538871d56 ExpressionJIT fix short-circuit with alias 2021-09-30 19:23:15 +03:00
Dmitry Novik
f60d57dd58
Merge pull request #29319 from ClickHouse/fasttest-tsv
Generate test_results.tsv for fasttest
2021-09-30 19:07:27 +03:00
alesapin
950f63a104 Fix commit 2021-09-30 18:59:49 +03:00
alesapin
f31c35de48 Fix nullpointer dereference in AddDefaultDatabaseVisitor 2021-09-30 18:56:55 +03:00
Kseniia Sumarokova
ffc4614f30
Merge pull request #29518 from kssenii/fix-odbc-invalid-cursor
Fix possible odbc invalid cursor state
2021-09-30 18:53:18 +03:00
Alexey Milovidov
551c52c236 Merge remote-tracking branch 'origin/master' into yandex-to-clickhouse-in-configs 2021-09-30 17:45:14 +03:00
Alexey Milovidov
6b2dce7440 Merge branch 'yandex-to-clickhouse-in-configs' of github.com:yandex/ClickHouse into yandex-to-clickhouse-in-configs 2021-09-30 17:44:54 +03:00
mergify[bot]
bfbe49a268
Merge branch 'master' into improvement/fn-traits 2021-09-30 14:26:19 +00:00
alexey-milovidov
3796ccb912
Merge pull request #29540 from myrrc/improvement/monotonicity-aggregate
Making Monotonicity an aggregate to use with designated initializers
2021-09-30 17:26:06 +03:00
Nikolai Kochetov
bc91d7ea60 Fix crash. 2021-09-30 16:48:04 +03:00
Maksim Kita
7bc6b8fd70
Merge pull request #28604 from azat/safer-http-handler
Proper buffer flush while handling HTTP queries (avoids std::terminate)
2021-09-30 16:44:09 +03:00
Maksim Kita
4eabb71348
Merge pull request #29483 from BiteTheDDDDt/dev_doc
[Doc] update zh doc of windowfunnel
2021-09-30 16:33:13 +03:00
Maksim Kita
6077d2e1c7 Fixed test with dictGet without database name as column default value 2021-09-30 16:19:20 +03:00
Maksim Kita
5c5199ef01
Merge pull request #29502 from azat/fix-INSERT-with-metadata-changes
Fix LOGICAL_ERROR for INSERT with concurrent ALTER
2021-09-30 16:11:50 +03:00
Maksim Kita
c2407fee06 Fixed tests 2021-09-30 14:35:24 +03:00
Maksim Kita
87ce29886e Fixed tests 2021-09-30 13:52:07 +03:00
vdimir
4acd8f3147
Do not add extra parentheses for tuple negate unary operator 2021-09-30 13:47:29 +03:00
Maksim Kita
3e0d6a9709
Merge pull request #29531 from kssenii/fix-paths
Fix pathStartsWith
2021-09-30 12:49:52 +03:00
Maksim Kita
c39ec67c16
Merge pull request #29554 from ClickHouse/blinkov-patch-23
[docs] fix build on Mac OS Big Sur
2021-09-30 12:34:48 +03:00
Vladimir C
bc8d925ac5
Merge pull request #29463 from azat/external-db-null 2021-09-30 11:38:04 +03:00
Nikolay Degterinsky
485e19ff84
Merge pull request #28955 from anneji-dev/alterTable
Add default database for alter table
2021-09-30 11:28:47 +03:00
Nikolai Kochetov
a68a86a230
Merge pull request #29539 from FArthur-cmd/fix_test_names
Fix test names
2021-09-30 11:17:49 +03:00
Ivan Blinkov
10e67006dd
[docs] fix build on Mac OS Big Sur 2021-09-30 11:04:15 +03:00
Azat Khuzhin
032bb55a01 Fix null deference for GROUP BY WITH TOTALS HAVING (when the column from HAVING wasn't selected)
Found by UBsan fuzzer [1].

  [1]: https://clickhouse-test-reports.s3.yandex.net/29503/a4f2663b8209e0e75021d8b84f932bc162c81857/fuzzer_ubsan/report.html#fail1
2021-09-30 10:21:29 +03:00