Azat Khuzhin
2474303aef
tests/gtest_compressionCodec: Fix UBSAN report about signed integer overflow
...
UBSAN report:
$ UBSAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-14 UBSAN_OPTIONS=print_stacktrace=1 ./unit_tests_dbms --gtest_filter=*Gorilla*
../src/Compression/tests/gtest_compressionCodec.cpp:1216:47: runtime error: signed integer overflow: 23 * 100000000 cannot be represented in type 'int'
#0 0x14f67fd1 in auto (anonymous namespace)::$_6::operator()(int) const::'lambda'(auto)::operator()<int>(auto) const build_docker/../src/Compression/tests/gtest_compressionCodec.cpp:1216:47
#1 0x14f67fd1 in (anonymous namespace)::CodecTestSequence (anonymous namespace)::generateSeq<long, (anonymous namespace)::$_6::operator()(int) const::'lambda'(auto), int, int>((anonymous namespace)::$_6::operator()(int) const::'lambda'(auto), char const*, int, int) build_docker/../src/Compression/tests/gtest_compressionCodec.cpp:394:36
#2 0x14f67fd1 in auto (anonymous namespace)::GCompatibilityTestSequence<long>() build_docker/../src/Compression/tests/gtest_compressionCodec.cpp:1224:12
#3 0x14f3c7f3 in (anonymous namespace)::gtest_GorillaCodecTestCompatibility_EvalGenerator_() build_docker/../src/Compression/tests/gtest_compressionCodec.cpp:1227:1
#4 0x14f6bdb5 in testing::internal::ParameterizedTestSuiteInfo<(anonymous namespace)::CodecTestCompatibility>::RegisterTests() build_docker/../contrib/googletest/googletest/include/gtest/internal/gtest-param-util.h:553:45
#5 0x27d87988 in testing::internal::ParameterizedTestSuiteRegistry::RegisterTests() build_docker/../contrib/googletest/googletest/include/gtest/internal/gtest-param-util.h:726:24
#6 0x27d87988 in testing::internal::UnitTestImpl::RegisterParameterizedTests() build_docker/../contrib/googletest/googletest/src/gtest.cc:2805:34
#7 0x27d87988 in testing::internal::UnitTestImpl::PostFlagParsingInit() build_docker/../contrib/googletest/googletest/src/gtest.cc:5492:5
#8 0x27d9d002 in void testing::internal::InitGoogleTestImpl<char>(int*, char**) build_docker/../contrib/googletest/googletest/src/gtest.cc:6499:22
#9 0x14fd5495 in main build_docker/../src/Coordination/tests/gtest_coordination.cpp:2189:5
#10 0x7f8c29005209 (/lib/x86_64-linux-gnu/libc.so.6+0x29209) (BuildId: 71a7c7b97bc0b3e349a3d8640252655552082bf5)
#11 0x7f8c290052bb in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x292bb) (BuildId: 71a7c7b97bc0b3e349a3d8640252655552082bf5)
#12 0x14ce356d in _start (/work1/azat/tmp/42190/unit_tests_dbms+0x14ce356d) (BuildId: 482550e3f8d45f06e8c7f8147f427ee798c1f645)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/Compression/tests/gtest_compressionCodec.cpp:1216:47 in
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:43 +02:00
Azat Khuzhin
784f7d988c
Fix -Wshorten-64-to-32 in examples
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:43 +02:00
Azat Khuzhin
b8ab686561
tests/gtest_compressionCodec: fix for darwin
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:43 +02:00
Azat Khuzhin
0625a866f0
Add a note about incorrect wide_integer with Decimal
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:43 +02:00
Azat Khuzhin
4412f66709
tests/gtest_DecimalFunctions: fix due to incorrect cast in wide_integer
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:43 +02:00
Azat Khuzhin
f14645a94f
tests/gtest_DecimalFunctions: fix operator<<
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:43 +02:00
Azat Khuzhin
7b28a80ad7
Fix -Wshorten-64-to-32 for amd64sse2 build
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:42 +02:00
Azat Khuzhin
15bcd6250a
Fix -Wshorten-64-to-32 for darwin builds
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:42 +02:00
Azat Khuzhin
8414ea0691
Fix -Wshorten-64-to-32 in self extracting executable
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:42 +02:00
Azat Khuzhin
3ccd5e8a18
Fix -Wshorten-64-to-32 with USE_BLAKE3
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:42 +02:00
Azat Khuzhin
089bf39132
Fix -Wshorten-64-to-32 for musl
...
On musl uint_fast32_t is uint32_t, while for glibc it is unsigned long
long.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:42 +02:00
Azat Khuzhin
4e76629aaf
Fixes for -Wshorten-64-to-32
...
- lots of static_cast
- add safe_cast
- types adjustments
- config
- IStorage::read/watch
- ...
- some TODO's (to convert types in future)
P.S. That was quite a journey...
v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Azat Khuzhin
19715f1542
Enable -Wshorten-64-to-32
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:22:39 +02:00
Robert Schulze
2d448c139c
Merge pull request #42308 from arenadata/ADQM-584
...
Add support of Date32 arguments for date_diff function
2022-10-21 13:18:44 +02:00
Nikita Taranov
abd585a38a
Increase threshold for using physical cores ( #42503 )
2022-10-21 12:52:46 +02:00
Sema Checherinda
21ce9ce4c7
Merge pull request #42459 from ClickHouse/fix-flaky-test
...
Fix flaky test
2022-10-21 12:06:41 +02:00
Antonio Andelic
f3016fb86b
Throw exception on invalid values
2022-10-21 09:15:24 +00:00
Antonio Andelic
3091d609fa
Merge branch 'master' into optimize-partitions-in-background
2022-10-21 11:01:41 +02:00
Antonio Andelic
13480f940b
Handle 4LW correctly
2022-10-21 07:29:00 +00:00
Antonio Andelic
73e16ad55a
Fix KeeperTCPHandler data race
2022-10-21 07:29:00 +00:00
Roman Vasin
537f7000d6
Update documentation
2022-10-21 06:55:24 +00:00
Alexey Milovidov
48694def2c
Merge branch 'master' into revert-40217
2022-10-21 05:49:34 +02:00
Alexey Milovidov
ee5f5a4cb4
Unfathomable amount of trash
2022-10-21 05:33:17 +02:00
Alexey Milovidov
ff26251477
Merge branch 'master' into fix-race-condition-finish-cancel
2022-10-21 04:14:21 +02:00
Yakov Olkhovskiy
bd33c4f180
add lib_fuzzer and lib_fuzzer_no_main to llvm-project build
2022-10-21 01:25:51 +00:00
Alexey Milovidov
45dadd7c5b
Merge pull request #42516 from ClickHouse/settings-docs
...
Correct documentation for settings
2022-10-21 02:29:20 +02:00
Nikolay Degterinsky
fb67a2f2ce
Fixes & improvements
2022-10-21 00:16:24 +00:00
Nikolay Degterinsky
6e2cfde1ee
Merge remote-tracking branch 'upstream/master' into fix-aliases
2022-10-21 00:11:23 +00:00
Alexey Milovidov
6290aeaf64
Merge branch 'master' into fix-flaky-test
2022-10-21 01:57:51 +02:00
Alexey Milovidov
a7d2fd2cc5
Merge branch 'master' into decimal-asan
2022-10-21 01:28:34 +02:00
Alexey Milovidov
27133c92e4
Merge pull request #42547 from ClickHouse/remove-outdated-documentation
...
Remove outdated documentation
2022-10-21 01:21:19 +02:00
Alexey Milovidov
6c31bcad0a
Merge pull request #42417 from amosbird/issue_42408
...
Correct implementation of AggregateState comparison
2022-10-21 01:20:50 +02:00
Nikolay Degterinsky
d7d0794d2f
Better logs in clickhouse-disks
2022-10-20 23:17:29 +00:00
Alexey Milovidov
b720030ac6
Remove outdated documentation
2022-10-21 00:13:30 +02:00
Alexey Milovidov
1a6fa07587
Fix clang-tidy
2022-10-21 00:08:17 +02:00
Alexey Milovidov
8c5e6a8d6c
Merge pull request #42512 from ClickHouse/has-any-tuple
...
Add a test for #13653
2022-10-21 00:03:36 +02:00
Alexey Milovidov
bd80e6a10b
Merge pull request #42511 from ClickHouse/add-test-16827
...
Add a test for #16827
2022-10-21 00:03:04 +02:00
Alexey Milovidov
ba5c3d122f
Remove old test
2022-10-20 23:59:43 +02:00
Alexey Milovidov
82ffaf8be6
Merge branch 'add-test-658' of github.com:ClickHouse/ClickHouse into add-test-658
2022-10-20 23:55:30 +02:00
Alexey Milovidov
445487e073
Merge branch 'master' into add-test-658
2022-10-20 23:55:15 +02:00
Nikolai Kochetov
151137d6d5
Merge pull request #42545 from ClickHouse/revert-42496-parallel-parsing-abort-fix
...
Revert "Attempt to fix abort from parallel parsing"
2022-10-20 21:47:32 +02:00
Nikolai Kochetov
d09a5e8fd7
Revert "Attempt to fix abort from parallel parsing ( #42496 )"
...
This reverts commit 4d703b792c
.
2022-10-20 21:46:26 +02:00
Alexey Milovidov
58f238007a
Merge pull request #42508 from ClickHouse/remove-database-macro-from-server-prompt
...
Remove support for the `{database}` macro from the client's prompt
2022-10-20 21:14:06 +02:00
Alexander Tokmakov
46559d659b
Merge pull request #42522 from azat/tests/00705_drop_create_merge_tree
...
tests: fix 00705_drop_create_merge_tree flakiness
2022-10-20 21:34:46 +03:00
Alexander Tokmakov
5fef8bdc8e
Merge branch 'master' into tests/00705_drop_create_merge_tree
2022-10-20 21:33:36 +03:00
Nikolai Kochetov
57ffcb7ed0
Revert "Merge pull request #41681 from ClickHouse/revert-41268-disable-s3-parallel-write-for-part-moves-to-disk-s3"
...
This reverts commit 7956c2becf
, reversing
changes made to 57be648984
.
2022-10-20 19:51:27 +02:00
Robert Schulze
9b7294ef45
Merge remote-tracking branch 'origin/master' into revert-40217
2022-10-20 15:27:31 +00:00
Nikita Mikhaylov
9a73eb2fbb
Add functions to generate random values according to the distribution ( #42411 )
2022-10-20 17:25:28 +02:00
Alexander Tokmakov
0d8a814d80
Merge pull request #42254 from xinhuitian/optimize-selectPartsToMutate
...
Early return of corner cases in selectPartsToMutate function
2022-10-20 18:13:37 +03:00
Nikita Mikhaylov
4d703b792c
Attempt to fix abort from parallel parsing ( #42496 )
2022-10-20 17:13:18 +02:00