Commit Graph

44395 Commits

Author SHA1 Message Date
alexey-milovidov
031c773260
Merge pull request #12384 from ClickHouse/support-negative-float-constants-in-key-condition
Avoid exception when negative or floating point constant is used in WHERE condition for indexed tables
2020-07-10 20:16:35 +03:00
Alexander Kuzmenkov
c9478a8473 restart the tests 2020-07-10 18:42:50 +03:00
Ivan Blinkov
a256e7e117
[docs] add syntax highlight (#12398) 2020-07-10 17:32:18 +03:00
Alexander Kuzmenkov
70ba4e16f8 fixup 2020-07-10 17:18:39 +03:00
Alexander Kuzmenkov
cd09cf8c0b Merge remote-tracking branch 'origin/master' into HEAD 2020-07-10 17:18:24 +03:00
Vitaly Baranov
c66433a472 Add tests for implicit access rights. 2020-07-10 17:16:47 +03:00
Vitaly Baranov
d036682ef1 Split test 'test_create_user_and_login' into two. 2020-07-10 17:16:47 +03:00
Vitaly Baranov
30e3d61b01 Fix calculating implicit access rights. 2020-07-10 17:16:43 +03:00
Alexander Kuzmenkov
eb6fbdfd4b query fuzzer 2020-07-10 17:16:16 +03:00
Vitaly Baranov
94c858b2dc Fix std::bad_typeid when JSON functions called with argument of wrong type. 2020-07-10 17:12:57 +03:00
Vitaly Baranov
3a0d358694 Allow typeid_cast() to cast nullptr to nullptr. 2020-07-10 17:02:48 +03:00
Alexander Tokmakov
20d95a21fc fix another context-related segfault 2020-07-10 17:00:44 +03:00
Ivan Blinkov
916d09ebe7
[security docs] actually, only admins can create advisories 2020-07-10 16:51:37 +03:00
myrrc
cfe06a3b2f fix: #12098 2020-07-10 16:06:41 +03:00
Alexander Kuzmenkov
0fe4c37033 query fuzzer 2020-07-10 14:11:49 +03:00
Artem Zuikov
01b5c2663c
Delete injective functions inside uniq (#12337) 2020-07-10 13:42:41 +03:00
BohuTANG
86590d4aca Change the exception catch to the generic way 2020-07-10 17:18:00 +08:00
Azat Khuzhin
610382b693 kafka: fix SIGSEGV if there is an message with error in the middle of the batch
ReadBufferFromKafkaConsumer does not handle the case when there is
message with an error on non first position in the current batch, since
it goes through messages in the batch after poll and stop on first valid
message.

But later it can try to use message as valid:
- while storing offset
- get topic name
- ...

And besides the message itself is also invalid (you can find this in the
gdb traces below).

So just filter out messages win an error error after poll.

SIGSEGV was with the following stacktrace:
    (gdb) bt
    3  0x0000000010f05b4d in rd_kafka_offset_store (app_rkt=0x0, partition=0, offset=0) at ../contrib/librdkafka/src/rdkafka_offset.c:656
    4  0x0000000010e69657 in cppkafka::Consumer::store_offset (this=0x7f2015210820, msg=...) at ../contrib/cppkafka/include/cppkafka/message.h:225
    5  0x000000000e68f208 in DB::ReadBufferFromKafkaConsumer::storeLastReadMessageOffset (this=0x7f206a136618) at ../contrib/libcxx/include/iterator:1508
    6  0x000000000e68b207 in DB::KafkaBlockInputStream::readImpl (this=0x7f202c689020) at ../src/Storages/Kafka/KafkaBlockInputStream.cpp:150
    7  0x000000000dd1178d in DB::IBlockInputStream::read (this=this@entry=0x7f202c689020) at ../src/DataStreams/IBlockInputStream.cpp:60
    8  0x000000000dd34c0a in DB::copyDataImpl<> () at ../src/DataStreams/copyData.cpp:21
    9  DB::copyData () at ../src/DataStreams/copyData.cpp:62
    10 0x000000000e67c8f2 in DB::StorageKafka::streamToViews () at ../contrib/libcxx/include/memory:3823
    11 0x000000000e67d218 in DB::StorageKafka::threadFunc () at ../src/Storages/Kafka/StorageKafka.cpp:488

And some information from it:

    (gdb) p this.current.__i
    $14 = (std::__1::__wrap_iter<cppkafka::Message const*>::iterator_type) 0x7f1ca8f58660

    # current-1
    (gdb) p $14-1
    $15 = (const cppkafka::Message *) 0x7f1ca8f58600
    (gdb) p $16.handle_
    $17 = {__ptr_ = {<std::__1::__compressed_pair_elem<rd_kafka_message_s*, 0, false>> = { __value_ = 0x7f203577f938}, ...}
    (gdb) p *(rd_kafka_message_s*)0x7f203577f938
    $24 = {err = RD_KAFKA_RESP_ERR__TRANSPORT, rkt = 0x0, partition = 0, payload = 0x7f202f0339c0, len = 63, key = 0x0, key_len = 0, offset = 0, _private = 0x7f203577f8c0}

    # current
    (gdb) p $14-0
    $28 = (const cppkafka::Message *) 0x7f1ca8f58660
    (gdb) p $28.handle_.__ptr_
    $29 = {<std::__1::__compressed_pair_elem<rd_kafka_message_s*, 0, false>> = { __value_ = 0x7f184f129bf0}, ...}
    (gdb) p *(rd_kafka_message_s*)0x7f184f129bf0
    $30 = {err = RD_KAFKA_RESP_ERR_NO_ERROR, rkt = 0x7f1ed44fe000, partition = 1, payload = 0x7f1fc9bc6036, len = 242, key = 0x0, key_len = 0, offset = 2394853582209,

    # current+1
    (gdb) p (*($14+1)).handle_.__ptr_
    $44 = {<std::__1::__compressed_pair_elem<rd_kafka_message_s*, 0, false>> = { __value_ = 0x7f184f129d30}, ...}
    (gdb) p *(rd_kafka_message_s*)0x7f184f129d30
    $45 = {err = RD_KAFKA_RESP_ERR_NO_ERROR, rkt = 0x7f1ed44fe000, partition = 1, payload = 0x7f1fc9bc612f, len = 31, key = 0x0, key_len = 0, offset = 2394853582210,
      _private = 0x7f184f129cc0}

    # distance from the beginning
    (gdb) p messages.__end_-messages.__begin_
    $34 = 65536
    (gdb) p ($14-0)-messages.__begin_
    $37 = 8965
    (gdb) p ($14-1)-messages.__begin_
    $38 = 8964

    # parsing info
    (gdb) p allowed
    $39 = false
    (gdb) p new_rows
    $40 = 1
    (gdb) p total_rows
    $41 = 8964

    # current buffer is invalid
    (gdb) p *buffer.__ptr_
    $50 = {<DB::ReadBuffer> = {<DB::BufferBase> = {pos = 0x7f202f0339c0 "FindCoordinator response error: Local: Broker transport failure", bytes = 47904863385, working_buffer = {
            begin_pos = 0x7f202f0339c0 "FindCoordinator response error: Local: Broker transport failure",
            end_pos = 0x7f202f0339c0 "FindCoordinator response error: Local: Broker transport failure"}, internal_buffer = {

v0: check message errors in ReadBufferFromKafkaConsumer::nextImpl() (but
this may lead to using of that messages after and SIGSEGV again, doh).
v2: skip messages with an error after poll.
2020-07-10 11:41:44 +03:00
Alexey Milovidov
47eaffbe63 Additional checks 2020-07-10 11:21:40 +03:00
Alexey Milovidov
4b86f36d37 Check arguments of bloom filter index 2020-07-10 11:13:21 +03:00
alesapin
5cae87e664
Merge pull request #12335 from ClickHouse/fix_alter_exit_codes
Fix alter rename error messages
2020-07-10 11:05:20 +03:00
Alexey Milovidov
d543a75f65 Allow to parse operator NOT as a function #12262 2020-07-10 09:48:05 +03:00
Alexey Milovidov
02dea4973d Allow to parse operator NOT as a function #12262 2020-07-10 09:47:37 +03:00
Alexey Milovidov
276b3a0215 Avoid exception when negative or floating point constant is used in WHERE condition for indexed tables #11905 2020-07-10 09:30:49 +03:00
BohuTANG
dfd7c5300a Add test_mysql_client_exception integration test 2020-07-10 14:20:32 +08:00
Alexey Milovidov
a4c68a47d5 Added failing test with clearing all columns 2020-07-10 08:58:16 +03:00
Alexey Milovidov
a4b35a8a6f Allow to CLEAR column even if there are depending DEFAULT expressions #12333 2020-07-10 08:54:35 +03:00
Alexey Milovidov
df2c7fec24 Add comment 2020-07-10 08:42:09 +03:00
alexey-milovidov
c16d8e094b
Merge pull request #12308 from ClickHouse/fix-codec-bad-exception-code
Fix wrong exception code in codecs Delta, DoubleDelta #12110
2020-07-10 08:40:46 +03:00
alexey-milovidov
6479e2b406
Update FieldVisitors.h 2020-07-10 08:37:43 +03:00
Alexey Milovidov
70273725d5 Fix error 2020-07-10 08:30:54 +03:00
Alexey Milovidov
c610a4b0a8 Fix error with ownership of aggregate function states with nested states 2020-07-10 08:28:34 +03:00
alexey-milovidov
c5ebf596c8
Merge pull request #12315 from ClickHouse/fix-race-condition-replicated-merge-tree-queue
Fix race condition in ReplicatedMergeTreeQueue
2020-07-10 08:11:56 +03:00
BohuTANG
64fdce9398 Write through Poco::Exception exception to MySQL protocol client 2020-07-10 12:54:08 +08:00
alexey-milovidov
8d7e418617
Merge pull request #12314 from BohuTANG/mysql_select_database
Support MySQL 'SELECT DATABASE()'
2020-07-10 06:32:04 +03:00
Alexey Milovidov
12e00411b4 Fix TOTALS/ROLLUP/CUBE for aggregate functions with -State and Nullable arguments #12163 2020-07-10 06:23:42 +03:00
Alexey Milovidov
f252dd94c8 Miscellaneous 2020-07-10 05:17:15 +03:00
Alexey Milovidov
fcdcb3cb1e Remove useless code 2020-07-10 04:58:27 +03:00
Alexey Milovidov
afc00fa0b8 Merge branch 'master' into fix-codec-bad-exception-code 2020-07-10 04:12:24 +03:00
Alexey Milovidov
7fc90aa070 Fix error 2020-07-10 02:45:29 +03:00
Alexey Milovidov
ad6fcd57b2 Merge branch 'master' into fix-race-condition-replicated-merge-tree-queue 2020-07-10 02:21:24 +03:00
alexey-milovidov
7799dc2f9c
Merge pull request #12336 from ClickHouse/fix-obvious-race-condition-in-test
Fix obvious race condition in test
2020-07-10 01:53:01 +03:00
Anton Popov
c4767557f2
Merge pull request #12306 from CurtizJ/fix-with-fill
Fix order of columns in WITH FILL modifier
2020-07-10 00:12:11 +03:00
alesapin
bb46ae8246 Fix tests 2020-07-09 22:14:19 +03:00
Alexander Kuzmenkov
7af916e44a fuzzer docker image 2020-07-09 21:30:22 +03:00
Alexander Tokmakov
77289146ab fix tests 2020-07-09 20:47:42 +03:00
Alexander Kuzmenkov
bbcdf12e4f fuzzer container fix 2020-07-09 20:19:36 +03:00
Alexander Kuzmenkov
0001a08081 More perfect forwarding in field visitors 2020-07-09 19:16:33 +03:00
Anton Popov
8095a4e2bb
Update skip_list.json 2020-07-09 18:46:07 +03:00
Ivan Blinkov
258d2fd499
[docs] split various kinds of CREATE queries into separate articles (#12328)
* normalize

* split & adjust links

* re-normalize

* adjust ru links

* adjust ja/tr links

* partially apply e0d19d2aea

* reset contribs
2020-07-09 18:10:35 +03:00