Commit Graph

73719 Commits

Author SHA1 Message Date
Azat Khuzhin
4618636446 Fix LOGICAL_ERROR for INSERT with metadata changes in parallel
In #28582 the problem was introduced due to it obtains new metadata
snapshot and so it may fail when it will check that headers does not
differs, like in [1]:

<details>

    {7b1256b1-09dc-4cc3-93d9-e9f6e26b0b99} <Fatal> : Logical error: 'Block structure mismatch in  function connect between ConvertingTransform and ReplicatedMergeTreeSink stream: different number of columns:
    a UInt8 UInt8(size = 0), b Int16 Int16(size = 0), c Float32 Float32(size = 0), d String String(size = 0), e Array(UInt8) Array(size = 0, UInt64(size = 0), UInt8(size = 0)), f Nullable(UUID) Nullable(size = 0, UUID(size = 0), UInt8(size = 0)), g Tuple(UInt8, UInt16) Tuple(size = 0, UInt8(size = 0), UInt16(size = 0)), h UInt64 UInt64(size = 0)
    a UInt8 UInt8(size = 0), b Int16 Int16(size = 0), c Float32 Float32(size = 0), d String String(size = 0), e Array(UInt8) Array(size = 0, UInt64(size = 0), UInt8(size = 0)), f Nullable(UUID) Nullable(size = 0, UUID(size = 0), UInt8(size = 0)), g Tuple(UInt8, UInt16) Tuple(size = 0, UInt8(size = 0), UInt16(size = 0))'.
    {7b1256b1-09dc-4cc3-93d9-e9f6e26b0b99} <Fatal> : Logical error: 'Block structure mismatch in  function connect between ConvertingTransform and ReplicatedMergeTreeSink stream: different number of columns:
    {} <Fatal> BaseDaemon: ########################################
    {} <Fatal> BaseDaemon: (version 21.11.1.8227, build id: E012027D3A9E94FD61655974C45C15F58215605B) (from thread 2180) (query_id: 7b1256b1-09dc-4cc3-93d9-e9f6e26b0b99) Received signal Aborted (6)
    {} <Fatal> BaseDaemon:
    {} <Fatal> BaseDaemon: Stack trace: 0x7f5661a3b18b 0x7f5661a1a859 0x1333bcb8 0x1333bdc2 0x1d9f04d1 0x1d9eec3c 0x1d9eeeca 0x1f7cc44c 0x1f79b992 0x1e52123f 0x1e522b8e 0x1eb7e27b 0x1eb7be44 0x1f751e26 0x1f75f0e5 0x23ba1179 0x23ba1988 0x23cef8b4 0x23cec39a 0x23ceb17c 0x7f5661c01609 0x7f5661b17293
    {} <Fatal> BaseDaemon: 4. raise @ 0x4618b in /usr/lib/x86_64-linux-gnu/libc-2.31.so
    {} <Fatal> BaseDaemon: 5. abort @ 0x25859 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
    {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:53: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool, std::__1::vector<void*, std::__1::allocator<void*> > const&) @ 0x1333bcb8 in /usr/bin/clickhouse
    {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:60: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x1333bdc2 in /usr/bin/clickhouse
    {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Core/Block.cpp:32: void DB::onError<void>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1d9f04d1 in /usr/bin/clickhouse
    {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Core/Block.cpp:86: void DB::checkBlockStructure<void>(DB::Block const&, DB::Block const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) @ 0x1d9eec3c in /usr/bin/clickhouse
    {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Core/Block.cpp:607: DB::assertCompatibleHeader(DB::Block const&, DB::Block const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1d9eeeca in /usr/bin/clickhouse
    {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Processors/Port.cpp:19: DB::connect(DB::OutputPort&, DB::InputPort&) @ 0x1f7cc44c in /usr/bin/clickhouse
    {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../src/Processors/Chain.cpp:81: DB::Chain::addSource(std::__1::shared_ptr<DB::IProcessor>) @ 0x1f79b992 in /usr/bin/clickhouse
    {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterInsertQuery.cpp:222: DB::InterpreterInsertQuery::buildChainImpl(std::__1::shared_ptr<DB::IStorage> const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, DB::Block const&, DB::ThreadStatus*, std::__1::atomic<unsigned long>*) @ 0x1e52123f in /usr/bin/clickhouse
    {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterInsertQuery.cpp:368: DB::InterpreterInsertQuery::execute() @ 0x1e522b8e in /usr/bin/clickhouse

</details>

  [1]: https://clickhouse-test-reports.s3.yandex.net/29461/d6cd057e2c0c8b04d8a712a7b2a83526507ef512/functional_stateless_tests_(debug).html#fail1

Fixes: #28582 (cc: @KochetovNicolai)
2021-09-29 21:56:59 +03:00
Azat Khuzhin
a4f2663b82 Log queries to external databases (since they may be rewriten)
By rewritten means that some expression from WHERE can be removed, yes
there is external_table_strict_query, but sometimes it is too strict.
2021-09-29 21:56:28 +03:00
Azat Khuzhin
98c311205f Cover IS NULL/IS NOT NULL for MySQL in integration tests 2021-09-29 21:45:09 +03:00
Azat Khuzhin
6ddfbf39c8 Cover IS NULL/IS NOT NULL for external dbs in unit tests 2021-09-29 21:45:09 +03:00
Azat Khuzhin
24f55e29d1 Add support for IS NULL/IS NOT NULL for external dbs 2021-09-29 21:45:09 +03:00
kssenii
2c005db9ad Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into interactive-mode-for-clickhouse-local 2021-09-29 17:45:15 +00:00
Filatenkov Artur
a371a22f16
Update 02010_lc_native.sh 2021-09-29 19:07:40 +03:00
Filatenkov Artur
90c8f50330
Update 02020_alter_table_modify_comment.reference 2021-09-29 19:07:10 +03:00
Mike Kot
61e0c6208b Making Monotonicity an aggregate to use with designated initializers 2021-09-29 18:01:26 +02:00
Artur Filatenkov
3fb07ddb48 delete old 2021-09-29 17:46:37 +03:00
Artur Filatenkov
6a3cb0d9ea rename tests 2021-09-29 17:43:35 +03:00
Maksim Kita
365296eeae
Merge pull request #29020 from ka1bi4/romanzhukov-DOCSUP-14460-menus-dataset
DOCSUP-14460: [CLICKHOUSEDOCS] Edit and translate to Russian (menus dataset)
2021-09-29 17:21:55 +03:00
alexey-milovidov
00d8eee34e
Merge pull request #29499 from den-crane/patch-28
Doc. Note about range of precision datetime64
2021-09-29 16:31:43 +03:00
mergify[bot]
6a2ac6e871
Merge branch 'master' into yandex-to-clickhouse-in-configs 2021-09-29 13:29:08 +00:00
Kseniia Sumarokova
27132d56f6
Update ODBCConnectionFactory.h 2021-09-29 16:18:24 +03:00
Maksim Kita
50913951e3
Merge pull request #29530 from kitaisreal/changelog-heredoc-added-backward-incompatible-change
Changelog heredoc added backward incompatible change
2021-09-29 15:57:42 +03:00
Maksim Kita
f1161d4752 Changelog heredoc added backward incompatible change 2021-09-29 15:54:23 +03:00
kssenii
46a4525c21 Fix 2021-09-29 12:53:09 +00:00
Vitaly Baranov
0c33f1121b
Merge pull request #28012 from amosbird/jsonextractstring2
Handle null column correctly in JSONFunction.
2021-09-29 14:58:40 +03:00
mergify[bot]
18eb13bf1e
Merge branch 'master' into fasttest-tsv 2021-09-29 10:55:33 +00:00
kssenii
58fa0ac13c A little better 2021-09-29 10:23:44 +00:00
Kruglov Pavel
14be2f31f5
Merge pull request #29475 from ClickHouse/fix-29010
Remove filter column from HAVING when it is not needed.
2021-09-29 13:03:27 +03:00
kssenii
ba839a4af3 Fix 2021-09-29 09:43:58 +00:00
Nikolai Kochetov
8d85590900
Merge pull request #29494 from ClickHouse/fix-possible-pushing-executor-hang
Fix possible hang in PushingAsyncPipelineExecutor.
2021-09-29 12:16:26 +03:00
Maksim Kita
1a0feaaf8a
Merge pull request #29511 from MaxWk/huawei-obs-support
support obs storage
2021-09-29 12:02:01 +03:00
Maksim Kita
9cce37ee87
Merge pull request #29331 from lehasm/alexey-sm-DOCSUP-15139-document--RELOAD-FUNCTION
DOCSUP-15139: document user defined functions (XML config)
2021-09-29 11:58:41 +03:00
Vladimir C
27f0f9fcf3
Merge pull request #21320 from arenadata/ADQM-138 2021-09-29 11:53:54 +03:00
Maksim Kita
70dc235287
Merge pull request #29515 from azat/bump-cmake
Bump cmake minimum required version to 3.14
2021-09-29 11:53:30 +03:00
Azat Khuzhin
d64587ef01 Bump cmake dependency to 3.14
libxz uses if(DEFINED CACHE{}) which has been added only in 3.14.
2021-09-29 10:02:47 +03:00
MaxWk
723ff795a8 support obs storage 2021-09-29 14:11:28 +08:00
Alexey
ff8140b6be minor update 2021-09-29 05:33:16 +00:00
lehasm
ca203c943e
Update docs/en/sql-reference/functions/index.md
Co-authored-by: Anna <42538400+adevyatova@users.noreply.github.com>
2021-09-29 08:26:32 +03:00
lehasm
c8a78fc2b7
Update docs/ru/sql-reference/functions/index.md
Co-authored-by: Anna <42538400+adevyatova@users.noreply.github.com>
2021-09-29 08:26:12 +03:00
lehasm
900dad6d6f
Update docs/en/sql-reference/functions/index.md
Co-authored-by: Anna <42538400+adevyatova@users.noreply.github.com>
2021-09-29 08:25:44 +03:00
lehasm
1d98170f02
Update docs/ru/sql-reference/functions/index.md
Co-authored-by: Anna <42538400+adevyatova@users.noreply.github.com>
2021-09-29 08:25:25 +03:00
lehasm
85826bb014
Update docs/en/sql-reference/functions/index.md
Co-authored-by: Anna <42538400+adevyatova@users.noreply.github.com>
2021-09-29 08:24:56 +03:00
lehasm
de5d2271e5
Update docs/ru/sql-reference/functions/index.md
Co-authored-by: Anna <42538400+adevyatova@users.noreply.github.com>
2021-09-29 08:24:30 +03:00
lehasm
30eed6138e
Update docs/ru/sql-reference/functions/index.md
Co-authored-by: Anna <42538400+adevyatova@users.noreply.github.com>
2021-09-29 08:24:04 +03:00
lehasm
764b170319
Update docs/ru/sql-reference/functions/index.md
Co-authored-by: Anna <42538400+adevyatova@users.noreply.github.com>
2021-09-29 08:22:06 +03:00
robot-clickhouse
2805c28e65 Update version_date.tsv after release 21.8.8.29 2021-09-29 02:57:45 +03:00
alexey-milovidov
be427555e5
Merge pull request #29476 from ClickHouse/fix_29456
Fix table name escaping in Lazy database
2021-09-29 02:45:40 +03:00
Alexey Milovidov
2ec75b824b Revert "repo.clickhouse.tech is not 100% ready"
This reverts commit 8616ba62e4.
2021-09-29 02:43:20 +03:00
Alexey Milovidov
964e7efde5 Compatibility 2021-09-29 02:41:12 +03:00
Alexey Milovidov
73f4acc9d6 Merge branch 'yandex-to-clickhouse-in-configs' of github.com:yandex/ClickHouse into yandex-to-clickhouse-in-configs 2021-09-29 01:02:57 +03:00
alexey-milovidov
33f193fea9
Merge pull request #29343 from azat/deb-lld
Add lld into Build-Depends for debian package
2021-09-29 01:00:43 +03:00
alexey-milovidov
c37932a0b7
Merge pull request #29461 from azat/fix-2024_merge_regexp_assert
Fix 2024_merge_regexp_assert
2021-09-29 00:57:11 +03:00
alexey-milovidov
d46dfd0ddd
Merge pull request #29446 from azat/isNull-isNotNull-format
Transform isNull/isNotNull to IS NULL/IS NOT NULL (for external dbs)
2021-09-29 00:56:57 +03:00
alexey-milovidov
0965f9f3c4
Merge pull request #29453 from azat/tests-enable-memory-profiler
Enable memory profiler on CI
2021-09-29 00:56:42 +03:00
alexey-milovidov
f6db7552b6
Merge pull request #29444 from CurtizJ/fix-deadlock-async-inserts
Fix deadlock in concurrent async inserts and truncates
2021-09-29 00:56:29 +03:00
Denny Crane
7ac7105765
Update datetime64.md 2021-09-28 17:43:12 -03:00