Commit Graph

57080 Commits

Author SHA1 Message Date
Azat Khuzhin
2907385400 Avoid invalid dereference in RANGE_HASHED() dictionary
UBsan report the following [1], when query does not contains any columns
from the dictionary:

```sql
SELECT
    toUInt32(toUInt32(NULL, toUInt32(NULL, inf, NULL), NULL)),
    toUInt32(toUInt32(toUInt32(toUInt32(toUInt32(NULL, 1., NULL)), toUInt32(toUInt32(NULL, 0.5, NULL)), toUInt32(NULL, NULL)), toUInt32(toUInt32(NULL, 1., NULL)), toUInt32(NULL, NULL)), toUInt32(toUInt32(toUInt32(toUInt32(NULL, 1000.0001220703125, NULL)), toUInt32(toUInt32(NULL, 10.000100135803223, NULL)), toUInt32(NULL, NULL)), NULL, NULL, NULL))
FROM somedict
```

```
std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >::back() @ 0x128c07a6 in /workspace/clickhouse
./obj-x86_64-linux-gnu/../src/Dictionaries/RangeDictionaryBlockInputStream.h:0: DB::RangeDictionaryBlockInputStream<DB::RangeHashedDictionary, unsigned short, unsigned long>::fillBlock(DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, DB::PODArray<unsigned short, 4096ul, Allocator<false, false>, 15ul, 16ul> const&) const @ 0x1692335e in /workspace/clickhouse
./obj-x86_64-linux-gnu/../src/Dictionaries/RangeDictionaryBlockInputStream.h:0: DB::RangeDictionaryBlockInputStream<DB::RangeHashedDictionary, unsigned short, unsigned long>::getBlock(unsigned long, unsigned long) const @ 0x16922f96 in /workspace/clickhouse
./obj-x86_64-linux-gnu/../src/Dictionaries/DictionaryBlockInputStreamBase.cpp:23: DB::DictionaryBlockInputStreamBase::getHeader() const @ 0x166ab57c in /workspace/clickhouse
```

  [1]: https://clickhouse-test-reports.s3.yandex.net/19451/64c0bf98290362fa216c05b070aa122a12af3c25/fuzzer_ubsan/report.html#fail1
2021-02-11 21:07:37 +03:00
alesapin
d88f7bc0c8
Merge pull request #20224 from ClickHouse/fix_config_reloader_destruction
Fix access control manager destruction order
2021-02-11 11:18:00 +03:00
alesapin
56453256b7
Merge pull request #20300 from ClickHouse/restrict_to_drop_version_column
Don't allow to drop or rename version column
2021-02-11 11:04:00 +03:00
alesapin
121c5c9605
Merge pull request #20279 from ClickHouse/relax_check_in_data_writer
Relax check in data writer for non adaptive tables
2021-02-11 10:57:07 +03:00
alesapin
c2bb2c2902
Merge pull request #20097 from ClickHouse/remove-adding-missed-step
Build actions dag to evaluate missing defaults.
2021-02-11 10:51:21 +03:00
Alexander Kuzmenkov
308fbd2ba5
Update run-fuzzer.sh 2021-02-11 10:45:51 +03:00
Alexander Kuzmenkov
aed3f4ae66
Merge pull request #20284 from ClickHouse/aku/window-prototype-2
Put windows in such an order that we can sort less
2021-02-11 10:40:56 +03:00
Alexander Kuzmenkov
38678ff484 Merge remote-tracking branch 'origin/master' into HEAD 2021-02-11 10:40:05 +03:00
Alexander Kuzmenkov
2571dac984
Merge pull request #20111 from ClickHouse/aku/window-prototype
RANGE OFFSET window frame
2021-02-11 10:39:21 +03:00
Vladimir Ch
73a0e2961b
Merge pull request #20175 from amosbird/countrewrite 2021-02-11 09:38:12 +03:00
alexey-milovidov
8553a65ef8
Merge pull request #20281 from ClickHouse/aku/fuzzer-changed-settings
print changed settings in fuzzer when the server dies
2021-02-11 03:26:01 +03:00
alexey-milovidov
5ec4435f8c
Merge pull request #20275 from ClickHouse/filimonov-client-sample-config
Add example of client configuration adjustments
2021-02-11 03:24:30 +03:00
alexey-milovidov
e33477a16e
Merge pull request #20282 from ClickHouse/dont_allow_ttl_for_old_syntax
Don't allow TTL in old syntax
2021-02-11 00:46:30 +03:00
alexey-milovidov
53a3e178c7
See comment from Maxim Akhmedov in https://t.me/joinchat/VP49ANS8VOcAgG75 at 2021-02-10 22:31 MSK 2021-02-10 23:32:11 +03:00
Anton Popov
365e2fb746
Merge pull request #20231 from fuwhu/refine-loadDataParts-code
refine code in MergeTreeData::loadDataParts to avoid parsing WAL file as data part
2021-02-10 22:42:31 +03:00
alesapin
6f837b41e3
Update inplaceBlockConversions.h 2021-02-10 22:32:34 +03:00
alesapin
891fce3275 Don't allow to drop or rename version column 2021-02-10 22:23:48 +03:00
Ivan
be831d09f7
Update Pytest check (#18972)
* [WIP]

* Update skip-list

* Update ci_config.json

* Do not sync inserts for test

* Fix more tests

* Fix another test

* Enable one more test

* More fixed tests

* More test fixes

* Do not absolutize server path for now

* More test fixes

* Unset CLICKHOUSE_LOG_COMMENT where necessary

* Remove debugging set -e

* Fix more tests

* Fix test reference

* Fix style check
2021-02-10 21:09:13 +03:00
Anton Popov
ece7e87cfb
Merge pull request #20079 from ClickHouse/vdimir/fix-join-used-flag
Split use flags and RowRef in HashJoin
2021-02-10 20:34:22 +03:00
Kruglov Pavel
df7cc6b195
Merge pull request #20026 from gyuton/gyuton-DOCSUP-5788-Document_the_optimize_on_insert_setting
DOCSUP-5788: Documented the optimize_on_insert setting
2021-02-10 19:55:32 +03:00
gyuton
023deaaec6
Update settings.md 2021-02-10 18:55:48 +03:00
gyuton
fe00f72908
Update settings.md 2021-02-10 18:54:47 +03:00
Maksim Kita
ae90552e2b
Merge pull request #20260 from den-crane/patch-10
Doc. range_hashed desc is fixed
2021-02-10 18:33:12 +03:00
Alexander Kuzmenkov
5bd9c8b122 update reference 2021-02-10 17:42:45 +03:00
Alexander Kuzmenkov
ba0cd9677c update reference 2021-02-10 16:44:00 +03:00
alexey-milovidov
76ccec2885
Fix XML 2021-02-10 16:39:59 +03:00
Alexander Kuzmenkov
87e5218c91
Update Client.cpp 2021-02-10 16:29:33 +03:00
Alexander Kuzmenkov
e557d60cdb fixes for sort order 2021-02-10 16:27:22 +03:00
Nikolai Kochetov
af214e794f Review fixes. 2021-02-10 15:45:39 +03:00
Alexander Kuzmenkov
d5b0f30732 cache the block size in the block itself for some speedup 2021-02-10 15:44:07 +03:00
Alexander Kuzmenkov
b57b3244f5 reuse sort order 2021-02-10 15:44:07 +03:00
Alexander Kuzmenkov
a67a54e2a5 cleanup 2021-02-10 15:44:07 +03:00
Alexander Kuzmenkov
739990d075 fix fast test 2021-02-10 15:44:07 +03:00
alesapin
a63d73db58 Don't allow TTL in old syntax 2021-02-10 15:09:12 +03:00
alesapin
1227ca3d7a Fix min bytes for wide parts 2021-02-10 14:49:41 +03:00
Alexander Kuzmenkov
41a3cd978e print changed settings in fuzzer when the server dies 2021-02-10 14:18:11 +03:00
alesapin
420f2958e2
Merge pull request #19991 from ClickHouse/constant-propagation-fix
Do not use inputs which values are known constants in ActionsDAG.
2021-02-10 14:13:52 +03:00
alesapin
21faea1f68 Relax check in data writer for non adaptive tables 2021-02-10 13:43:31 +03:00
Maksim Kita
85396fc82e
Merge pull request #20057 from rf/rf/add-deltasum
Add `deltaSum` aggregate function, docs & test
2021-02-10 13:28:48 +03:00
Maksim Kita
14c7f38aad
Update deltasum.md 2021-02-10 13:28:22 +03:00
alesapin
9179fc8d96
Merge pull request #20226 from ClickHouse/fix_race_in_system_parts
Fix benign race in system.parts
2021-02-10 12:45:51 +03:00
Nikolai Kochetov
253c72afc4
Merge pull request #20251 from ClickHouse/fix-20242
Fix not closed ports in DelayedPortsProcessor
2021-02-10 12:28:28 +03:00
filimonov
beb5912b4f
Add example of client configuration adjusemtents 2021-02-10 10:02:35 +01:00
Ilya Yatsishin
1fdc59b453
Merge pull request #20248 from qoega/integration-2 2021-02-10 08:46:20 +03:00
vdimir
d9afee55ba
Add RewriteCountVariantsVisitor.cpp to ya.make 2021-02-10 12:48:41 +08:00
Amos Bird
fc6c57f8e0
Fix 2021-02-10 12:48:41 +08:00
Amos Bird
565a148da9
Normalize count() variants 2021-02-10 12:48:41 +08:00
HuFuwang
4ac8860cea refine code in MergeTreeData::loadDataParts to avoid parsing WAL file as data part. 2021-02-10 10:13:43 +08:00
alexey-milovidov
4ff3a28a9f
Merge pull request #20211 from amosbird/fixcte2
Fix CTE in INSERT-SELECT
2021-02-10 02:12:05 +03:00
alexey-milovidov
21b1a3fc6d
Merge pull request #20246 from ucasFL/avg-optimize
fix a problem in ArithmeticOperationsInAgrFuncOptimize
2021-02-10 02:10:15 +03:00