Commit Graph

725 Commits

Author SHA1 Message Date
Alexey Milovidov
2632b568ae Move tests to appropriate place 2021-03-04 01:34:30 +03:00
Alexey Milovidov
51d51e4748 Return private 2021-03-04 00:44:58 +03:00
Alexey Milovidov
fdc00beb77 Whitespaces 2021-03-03 23:56:59 +03:00
Alexey Milovidov
6f5877abdf Fix build after merge with master 2021-03-03 23:53:52 +03:00
Alexey Milovidov
4e8239e098 Merge branch 'master' into DateTime64_extended_range 2021-03-03 23:43:20 +03:00
Alexey Milovidov
b1b3db09d7 Remove commented out code 2021-03-03 23:34:15 +03:00
Alexey Milovidov
ed0099a113 Maybe unused condition 2021-03-03 23:24:56 +03:00
Alexey Milovidov
aaef0c5ebd Fix build 2021-03-03 23:19:26 +03:00
Alexey Milovidov
cf0912ba02 Remove unused field 2021-03-03 23:14:33 +03:00
alexey-milovidov
3e19f4a00f
Update DateLUTImpl.h 2021-03-03 23:09:59 +03:00
alexey-milovidov
0889e0da87
Update DateLUTImpl.h 2021-03-03 22:52:07 +03:00
alexey-milovidov
2f23f1b123
Update DateLUTImpl.h 2021-03-03 22:49:20 +03:00
alexey-milovidov
80c17d5537
Update DateLUTImpl.cpp 2021-03-03 22:41:10 +03:00
alexey-milovidov
e412bcb490
Update DateLUTImpl.cpp 2021-03-03 22:30:12 +03:00
alexey-milovidov
04672a4365
Update DateLUTImpl.cpp 2021-03-03 22:29:26 +03:00
Alexey Milovidov
aecdadd02e Add missing files 2021-03-03 02:33:17 +03:00
Alexey Milovidov
d1b3258ae7 Try without AVX 2021-03-03 00:16:34 +03:00
Alexey Milovidov
50c62c3b4c Add memcpy implementation from @jart 2021-03-02 22:12:30 +03:00
alexey-milovidov
3bd180c416
Merge pull request #20149 from keen-wolf/timezone_about
fix toMinute function to handle special timezone
2021-02-28 21:53:51 +03:00
keenwolf
303c389b36 change the time_t to unsigned to handle properly the start date of 1970-01-01 2021-02-28 18:11:54 +08:00
Alexander Kazakov
63b95c7451
MySQL dictionary source: A mechanism for retrying unexpected connection loss during communication with mysql server (#21237)
* Added a new type of Exception

for better recognition of connection failures

* Added more logging for mysql communication

* Retries on connection loss during query.

Make MySQL dictionary source resilient to unexpected loss of connection
during querying MySQL. This behavior is controlled with
".fail_on_connection_loss" config parameter, which defaults to false.

* Stripped some debugging leftover garbage

* Minor followup corrections

* Corrections after PR comments

* Yet more fixes
2021-02-27 11:18:28 +03:00
Alexander Kazakov
66f603512c
A followup correction to #19998 (#21221) 2021-02-26 11:42:37 +03:00
Alexander Kazakov
4bcaed98d8
Added "opt_reconnect" parameter to config for controlling MYSQL_OPT_RECONNECT option (#19998)
* Support for MYSQL_OPT_RECONNECT option

It can now be controlled by .opt_reconnect = {true|false} parameter in
the mysql replica config section
2021-02-26 09:49:49 +03:00
Maksim Kita
63173eebdb
Merge pull request #21088 from azat/__has_feature-gcc-fix
Fix __has_feature macros under gcc
2021-02-25 18:34:14 +03:00
Nikolai Kochetov
3cda69feaf
Merge pull request #20632 from ClickHouse/akz/mysqlxx-randomize-replicas
mysqlxx::PoolWithFailover: Randomize list of same-priority replicas
2021-02-25 13:11:41 +03:00
alexey-milovidov
d5757c67e6 Update DateLUTImpl.h 2021-02-24 17:09:27 +02:00
alexey-milovidov
b8b916008c Update DateLUTImpl.h 2021-02-24 17:09:27 +02:00
Vasily Nemkov
d321c13cbf Fixed special build 2021-02-24 17:08:43 +02:00
Vasily Nemkov
7a53daaefd Fixed issues reported by PVS-Studio and Clang11/GCC10 2021-02-24 17:08:43 +02:00
Vasily Nemkov
4fcc23ec9a Fixed build for GCC-10 2021-02-24 17:08:43 +02:00
Vasily Nemkov
2d03d330bc Extended range of DateTime64 to years 1925 - 2238
The Year 1925 is a starting point because most of the timezones
switched to saner (mostly 15-minutes based) offsets somewhere
during 1924 or before. And that significantly simplifies implementation.

2238 is to simplify arithmetics for sanitizing LUT index access;
there are less than 0x1ffff days from 1925.

* Extended DateLUTImpl internal LUT to 0x1ffff items, some of which
  represent negative (pre-1970) time values.
  As a collateral benefit, Date now correctly supports dates up to 2149
  (instead of 2106).
* Added a new strong typedef ExtendedDayNum, which represents dates
  pre-1970 and post 2149.
* Functions that used to return DayNum now return ExtendedDayNum.
* Refactored DateLUTImpl to untie DayNum from the dual role of being
  a value and an index (due to negative time). Index is now a different
  type LUTIndex with explicit conversion functions from DatNum, time_t,
  and ExtendedDayNum.
* Updated DateLUTImpl to properly support values close to epoch start
  (1970-01-01 00:00), including negative ones.
* Reduced resolution of DateLUTImpl::Values::time_at_offset_change
  to multiple of 15-minutes to allow storing 64-bits of time_t in
  DateLUTImpl::Value while keeping same size.
* Minor performance updates to DateLUTImpl when building month LUT
  by skipping non-start-of-month days.
* Fixed extractTimeZoneFromFunctionArguments to work correctly
  with DateTime64.
* New unit-tests and stateless integration tests for both DateTime
  and DateTime64.
2021-02-24 17:08:35 +02:00
Alexander Kazakov
196d454114 Initialize random engine with clock and thread_id
Thread-safe and fairly descent approach in our case
2021-02-24 14:55:16 +03:00
Alexander Kazakov
deb566a40b Resorted from std::random_device to std::rand() 2021-02-24 11:48:04 +03:00
Azat Khuzhin
810023a65c Do not undefine __has_feature (may break c++ headers)
If the order of <common/defines.h> and c++ header will be wrong the
compilation will be broken.

v2: rename __ch_has_feature to ch_has_feature to fix -Wreserved-id-macro
v3: do not fallback to 0
2021-02-23 19:46:47 +03:00
Azat Khuzhin
8ab578065a Fix __has_feature macros under gcc
__has_feature supported only by clang.

But libcxx/libcxxabi overrides it to 0:

    $ fgrep -r 'define __has_feature' contrib/libcxx*
    contrib/libcxx/include/__config:#define __has_feature(__x) 0
    contrib/libcxxabi/src/demangle/DemangleConfig.h:#define __has_feature(x) 0

Thus the checks for __has_feature will be wrong, undefine it again to
avoid such issues.

This will also fix building with sanitizers under gcc (before this patch
BOOST_USE_UCONTEXT wasn't set for sanitizers).
2021-02-23 19:39:34 +03:00
Alexey Milovidov
d2a9e5842a Fix wrong formatting of overflowed DateTime64 2021-02-21 21:01:46 +03:00
Alexey Milovidov
9cb972e9ed Fix UBSan report in Decimal arithmetic #19432 2021-02-21 13:23:18 +03:00
alexey-milovidov
e8583ddfe2
Update BaseDaemon.cpp 2021-02-20 09:10:15 +03:00
Azat Khuzhin
7474a7e3ca Increase buffer for uncaught exception / std::terminate
Use PIPE_BUF over some magic number 1024 in terminate_handler, since
according to pipe(7):

    PIPE_BUF
           POSIX.1  says  that  write(2)s of less than PIPE_BUF bytes must be atomic

Also note that 1024, is too small, especially for C++ stacktraces (and
especially for debug builds, that contains lots of non-inlined helpers
for various ptrs).
2021-02-19 22:45:06 +03:00
Ivan
414f470c79
Make Poco HTTP Server zero-copy again (#19516)
* Refactoring: part 1

* Refactoring: part 2

* Handle request using ReadBuffer interface

* Struggles with ReadBuffer's

* Fix URI parsing

* Implement parsing of multipart/form-data

* Check HTTP_LENGTH_REQUIRED before eof() or will hang

* Fix HTTPChunkedReadBuffer

* Fix build and style

* Fix test

* Resist double-eof

* Fix arcadian build
2021-02-19 15:51:26 +03:00
Alexander Kazakov
0296d7d026 Added some explanations on randomization 2021-02-17 21:51:05 +03:00
Alexander Kazakov
acb5fb8179 Randomly shuffle replicas withing the same priority 2021-02-17 20:58:04 +03:00
alexey-milovidov
bde4da0ff0
Merge pull request #20465 from azat/write-abnormal-server-termination-fixes
Fix abnormal server terminations due to write failures
2021-02-15 00:05:48 +03:00
Azat Khuzhin
06e8065ee6 Add missing sync of underlying files 2021-02-13 13:19:51 +03:00
Ilya Yatsishin
8ff458a2bf
Merge pull request #20459 from ClickHouse/decimal-comparison-ubsan 2021-02-13 12:34:40 +03:00
Alexey Milovidov
c760d5224d Suppress UBSan report in Decimal comparison 2021-02-13 03:56:38 +03:00
Alexey Milovidov
1546f5bcb9 Suppress UBSan report in Decimal comparison 2021-02-13 03:54:38 +03:00
Alexey Milovidov
edd5844bed Print stack trace on SIGTRAP 2021-02-13 00:29:47 +03:00
alexey-milovidov
4e32dbd024
Merge pull request #19317 from abyss7/dwarf-folly
Print inline frames for fatal stacktraces
2021-02-12 02:38:50 +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
Ivan Lezhankin
a287443438 Merge remote-tracking branch 'upstream/master' into dwarf-folly 2021-02-08 18:36:41 +03:00
Nicolae Vartolomei
479b45d772 Fix linker flags for shared linking on macOS
This combination now works: `-DUSE_STATIC_LIBRARIES=0 -DSPLIT_SHARED_LIBRARIES=1`.

Without `SPLIT_SHARED_LIBRARIES` it is still failing.
2021-02-07 14:58:52 +00:00
keenwolf
610798aa48 fix the toMinute bug which will cause toDateTime or toString printing wrong time 2021-02-06 15:32:49 +08:00
alexey-milovidov
867f5a8975
Merge pull request #20029 from ClickHouse/remove-useless-code-5
Remove useless code
2021-02-03 21:06:43 +03:00
Nikolai Kochetov
c39c965612
Merge pull request #19962 from keen-wolf/timezoneOffset
Implement the timezoneOffset function
2021-02-03 20:37:34 +03:00
Alexey Milovidov
02da869d10 Remove useless code 2021-02-03 12:46:41 +03:00
Alexey Milovidov
940b337eec Remove useless files 2021-02-03 10:03:32 +03:00
Alexey Milovidov
f8592f4539 Remove useless files 2021-02-03 10:03:13 +03:00
Alexey Milovidov
191389d040 Fix some of the issues found by Coverity 2021-02-02 22:08:32 +03:00
Alexey Milovidov
12485eee6b Fix some of the issues found by Coverity 2021-02-02 22:07:23 +03:00
keenwolf
9beb7689cc add comments and update test cases. 2021-02-02 23:35:45 +08:00
keenwolf
d251807ea4 add function timezoneOffset 2021-02-02 11:01:20 +08:00
Alexey Milovidov
7b8589dbde Merge branch 'master' into utf8mb4-in-mysql-client 2021-01-31 01:37:27 +03:00
alexey-milovidov
8d2a169e8d
Merge pull request #19821 from qoega/fix-msan-1
Fix msan warnings in cyrus-sasl and musl
2021-01-30 10:56:12 +03:00
Yatsishin Ilya
f8ae63995e Fix msan warnings 2021-01-29 19:11:50 +03:00
Alexey Milovidov
f7fffe173c Set charset to utf8mb4 in mariadb-connector 2021-01-29 10:57:22 +03:00
Alexey Milovidov
eb0473c3f9 Fix UBSan report in "round" 2021-01-29 04:03:38 +03:00
Ivan
5dfe1c98e2
Update BaseDaemon.cpp 2021-01-27 16:25:46 +03:00
Maksim Kita
bd81f43ecb
Merge pull request #19672 from ClickHouse/bigint-remove-old-code
Remove old code for BigInt.
2021-01-27 11:28:45 +03:00
Alexey Milovidov
093108bf81 Normalize BigInt implementation 2021-01-27 03:54:57 +03:00
Alexey Milovidov
f3929b151a Remove even more code 2021-01-26 22:04:03 +03:00
Azat Khuzhin
f4a4d33c2d Suppress UBsan reports in addYears()
https://clickhouse-test-reports.s3.yandex.net/19528/1c364b6ee3a44487529954cf2792e615f7de0f82/fuzzer_ubsan/report.html#fail1
2021-01-26 01:12:40 +03:00
tavplubix
9fc1eba0bc
Update DateLUTImpl.h 2021-01-25 12:40:49 +03:00
alexey-milovidov
77af612bc5
Merge pull request #19466 from azat/UBsan-report-fixes
UBsan report fixes (arraySlice, addMinutes/addHours/addWeeks/addDays, sumWithOverflow(Decimal))
2021-01-24 22:27:15 +03:00
Azat Khuzhin
cb30a02540 Fix UBsan report in addDays(INT64_MAX)
https://clickhouse-test-reports.s3.yandex.net/19466/df53438a66ee95de790b60d35f36eca986590027/fuzzer_ubsan/report.html#fail1
2021-01-24 13:51:05 +03:00
Alexey Milovidov
505898747e Fix buffer overflow in DateLUT 2021-01-23 01:58:41 +03:00
alexey-milovidov
303db08231
Merge pull request #19369 from filimonov/kafka_for_arm64
Kafka for arm64
2021-01-23 01:52:07 +03:00
Mikhail Filimonov
066fbfff0e
librdkafka support for arm64 2021-01-21 16:04:55 +01:00
Alexey Milovidov
4968f1733e Annotations for DateLUT 2021-01-21 15:01:24 +03:00
Alexander Tokmakov
6847fdf772 fix 2021-01-20 14:12:33 +03:00
Ivan Lezhankin
3fb50dfa1b Initial implementation of inline frames 2021-01-19 15:34:27 +03:00
Alexander Tokmakov
e2467427d1 Merge branch 'master' into update_cassandra 2021-01-19 14:10:15 +03:00
Alexey Milovidov
98a8a20b70 Fix MSan error in rocksdb #19213 2021-01-17 21:30:02 +03:00
Alexander Tokmakov
e57e242482 fix 2021-01-16 22:56:07 +03:00
Alexander Tokmakov
ff6c3c75c2 add protection from unsafe allocations 2021-01-12 18:41:24 +03:00
alexey-milovidov
a55260fa5c
Merge pull request #18871 from azat/fix-integrity-check
Fix integrity check
2021-01-08 22:32:39 +03:00
alexey-milovidov
4a54916733
Merge pull request #18858 from ClickHouse/better-strsignal
Import strsignal from Musl
2021-01-08 22:26:00 +03:00
Azat Khuzhin
6dba945a2e untrap setenv() call (used for timezone)
This will also fix integrity check (#18811), the reason it does not pops
up on CI during PR testing because CI does not set
YANDEX_OFFICIAL_BUILD, while it does set it for commits merged into
upstream commits, and hence once it was merged the special build was
failed.

Follow-up for: #16366
2021-01-08 15:26:35 +03:00
Alexey Milovidov
10ea06edad Import strsignal from Musl 2021-01-08 08:09:30 +03:00
alexey-milovidov
98bd7fb653
Merge branch 'master' into better-kill 2021-01-08 07:27:00 +03:00
Alexey Milovidov
32d8785a26 Better kill #18847 2021-01-07 21:36:38 +03:00
Alexey Milovidov
6f481d7512 Add integrity checks for ClickHouse binary 2021-01-07 05:56:57 +03:00
Azat Khuzhin
d7fb61dce4 Use sigdescr_np() over sys_siglist (fixes glibc 2.32+ unbundled build)
glibc 2.32 [1]:

- The functions sigabbrev_np and sigdescr_np have been added
- They should be used instead of sys_siglist or sys_sigabbrev and they
  are both thread and async-signal safe. These functions are GNU
  extensions.

  [1]: https://sourceware.org/pipermail/libc-announce/2020/000029.html
2021-01-06 00:17:25 +03:00
Alexey Milovidov
98687ff8f4 Merge branch 'master' into harmful 2020-12-31 02:25:28 +03:00
Anton Popov
27e8fc0c8d
Merge pull request #18565 from hexiaoting/dev_date
Make Date larger then 2106-02-07 overflow as 0(1970-01-01)
2020-12-30 22:53:25 +03:00
hexiaoting
a2e5f7693a Fix condition error 2020-12-30 11:20:38 +08:00
Alexey Milovidov
48605e7a30 Fixed exit code of watchdog 2020-12-29 20:36:10 +03:00
hexiaoting
ccaea5fa42 Make Date > 2106-02-07 overflow as 0 2020-12-28 19:09:41 +08:00
Yatsishin Ilya
ce1e2b18a3 Fix codespell warnings. Split style checks. Update style checks docker 2020-12-24 13:17:52 +03:00
Nikolai Kochetov
8ffadac2a3 Try disable ucontect for arcadia 2020-12-23 19:49:36 +03:00
Nikolai Kochetov
e56a1c442c Use ucontext fir arcadia build. 2020-12-23 18:20:52 +03:00
Nikolai Kochetov
af7f5c9518
Merge pull request #17868 from ClickHouse/async-read-from-socket
Async read from socket
2020-12-23 12:20:42 +03:00
Alexey Milovidov
062c226498 Fix Darwin build 2020-12-22 20:13:18 +03:00
Alexey Milovidov
674d0083d9 Remove unused code; fix clang tidy; fix old comments 2020-12-22 20:10:10 +03:00
Alexey Milovidov
ea3db22c1a Merge branch 'master' into watchdog 2020-12-22 19:54:57 +03:00
Alexey Milovidov
100f9d5de3 Fix error and remove useless code 2020-12-22 10:38:39 +03:00
alexey-milovidov
f0dc3ec152
Merge pull request #17665 from amosbird/clientedit
clickhouse-client editor
2020-12-22 09:53:54 +03:00
Alexey Milovidov
3dafd4bb49 Minor changes 2020-12-22 09:45:08 +03:00
Alexey Milovidov
f977184028 Slightly better 2020-12-22 06:17:31 +03:00
Alexey Milovidov
f9012b12fb Proper implementation 2020-12-22 06:01:51 +03:00
Alexey Milovidov
bbc676d821 Adjustments 2020-12-22 00:03:02 +03:00
Alexey Milovidov
157c66ebdb Merge branch 'master' into harmful 2020-12-21 10:57:50 +03:00
alexey-milovidov
578d2f4442
Merge pull request #17269 from ucasFL/fix
Avoid bigint_cast stack overflow
2020-12-21 10:38:16 +03:00
Amos Bird
fe16aec48b
add .sql suffix 2020-12-21 14:43:06 +08:00
Amos Bird
0d89e4aac6
correct write 2020-12-21 14:43:06 +08:00
Amos Bird
86aa155e62
Cleaner 2020-12-21 14:43:05 +08:00
Amos Bird
a3d52dd6a0
Don't shallow errors. 2020-12-21 14:43:05 +08:00
Amos Bird
91e8b35977
clickhouse-client editor 2020-12-21 14:43:05 +08:00
alexey-milovidov
b932b984a0
Update wide_integer_impl.h 2020-12-21 04:02:49 +03:00
Alexey Milovidov
0b556444a3 Add comments 2020-12-21 03:36:18 +03:00
Alexey Milovidov
79aa18cf88 Add comments 2020-12-21 03:35:43 +03:00
Alexey Milovidov
bd9ac84038 Update function blocklist 2020-12-21 03:28:19 +03:00
Alexey Milovidov
ceb644db18 Update function blocklist 2020-12-21 03:22:07 +03:00
Alexey Milovidov
b99634dc5d Merge branch 'master' into harmful 2020-12-21 03:03:10 +03:00
Alexey Milovidov
ff82176933 Add powf and powl to glibc-compatibility 2020-12-21 02:54:05 +03:00
Alexey Milovidov
a159fc0a90 Merge branch 'master' into ucasFL-fix 2020-12-20 22:29:43 +03:00
alexey-milovidov
55ed2ab563
Update wide_integer_impl.h 2020-12-20 09:46:43 +03:00
Amos Bird
c447628d42
Add connection thread metrics 2020-12-18 15:22:55 +08:00
alexey-milovidov
6ee2ada592
Merge pull request #18204 from ClickHouse/remove-strerror
Do not use non thread-safe function `strerror`
2020-12-18 08:07:46 +03:00
Alexey Milovidov
ec5b030928 More functions 2020-12-17 21:39:04 +03:00
Alexey Milovidov
fb3d235e84 Do not use strerror 2020-12-17 21:25:12 +03:00
Alexey Milovidov
aa9dda5d9a Do not use strerror 2020-12-17 21:08:42 +03:00
Maksim Kita
fd7fe0f84c Updated ya.make 2020-12-17 12:10:46 +03:00
Alexey Milovidov
bef492240c Apply harmful library only for clickhouse binary 2020-12-17 06:45:46 +03:00
Alexey Milovidov
42a4e38f08 Merge branch 'master' into harmful 2020-12-17 06:28:55 +03:00
Maksim Kita
685099af7f Move getPageSize in common 2020-12-17 00:23:41 +03:00
Nikolai Kochetov
af83d82a84 Try use tsan annotated boost fibre. 2020-12-16 20:06:04 +03:00
alexey-milovidov
0d7e27d93f
Merge branch 'master' into fix 2020-12-14 23:02:14 +03:00
Nikolai Kochetov
8de5cd5bc7 Merge branch 'master' into async-read-from-socket 2020-12-14 17:45:38 +03:00
Nikolai Kochetov
e295dfe6e3 Use ucontext for asan 2020-12-14 17:42:08 +03:00
Nikolai Kochetov
dd6b5baa59 Add timerfd from musl 2020-12-14 17:41:59 +03:00
Amos Bird
88341fec82
client SIGWINCH fix 2020-12-12 00:34:40 +08:00
alesapin
dd9f4bfc8a
Merge pull request #16877 from ClickHouse/complete_zk_api
Fake in-memory ZooKeeper server inside ClickHouse
2020-12-10 10:47:54 +03:00
Nikita Mikhaylov
80d4af9a73
Merge pull request #17874 from nikitamikhaylov/calendar-date
Merging #17750
2020-12-10 00:19:04 +03:00
tavplubix
f13de96afc
Merge pull request #17366 from zhang2014/fix/ISSUES-16835
ISSUES-16835 try fix miss match header with MySQL SHOW statement
2020-12-09 23:12:47 +03:00
zhang2014
2f735aa61d ISSUES-16835 try fix review comment 2020-12-09 16:19:09 +08:00
alesapin
3d0dbbe411 Fix build 2020-12-08 17:49:18 +03:00
alexey-milovidov
d9b52f94f7
Merge pull request #17637 from amosbird/buildid
reload symbols and fix build-id
2020-12-08 14:55:35 +03:00
Alexander Kazakov
0e41af11c7
Fixed typo in message format (#17900) 2020-12-08 14:28:35 +03:00
Winter Zhang
972cb41fae
Merge branch 'master' into fix/ISSUES-16835 2020-12-08 15:32:58 +08:00
PHO
d014ac4ce2 Provide a default constructor for wide::integer
The implicit one provided by compiler does not initialize its member
variable "items" because it's a POD array. GCC emits a warning about this.
2020-12-07 16:00:32 +03:00
fenglv
ff4ffd2c6d Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix 2020-12-07 04:39:49 +00:00
Alexey Milovidov
a63d4f0db3 Merge branch 'master' into amosbird-buildid 2020-12-07 02:17:29 +03:00
alesapin
278bbf6d51 Merge branch 'master' into complete_zk_api 2020-12-04 16:48:19 +03:00
Ivan
315ff4f0d9
ANTLR4 Grammar for ClickHouse and new parser (#11298) 2020-12-04 05:15:44 +03:00
Alexander Kazakov
81d9d3237f
In mysqlxx::Pool: fix for reconnection problem (#17681)
Remove stalled unrecoverable connections from myqsl connections pool
2020-12-03 23:36:10 +03:00
Ilya Yatsishin
9b72323594
Try fix arcadia build (#17720)
* Try fix arcadia build

* fix
2020-12-02 17:54:52 +03:00
alesapin
93ea2f5b1f Merge branch 'master' into complete_zk_api 2020-12-02 11:30:09 +03:00
alexey-milovidov
c0489ce537
Merge pull request #17543 from ClickHouse/sentry-official-cpu-ram
Sentry: send info about official build, memory, cpu and free disk space.
2020-12-01 10:33:10 +03:00
Yuriy Chernyshov
a6e66fc3b5
Use feature testing macro to test if char8_t is supported 2020-11-30 22:36:30 +03:00
Amos Bird
310918b06a
reload symbols and fix build-id 2020-11-30 22:30:55 +08:00
alexey-milovidov
81e4885664
Merge pull request #17556 from ClickHouse/memory-amount-worse
getMemoryAmount: make code worse
2020-11-30 12:53:50 +03:00
alesapin
6d2a007b79 Merge branch 'master' into complete_zk_api 2020-11-30 10:58:25 +03:00
Alexey Milovidov
97242e1fee Merge branch 'master' into sentry-official-cpu-ram 2020-11-30 09:40:10 +03:00
Alexey Milovidov
f80ae936ad Fix parsing of multiline queries in interactive mode #13654 2020-11-29 17:50:42 +03:00
Alexey Milovidov
7627f4f371 getMemoryAmount: make code worse 2020-11-29 15:13:10 +03:00
Alexey Milovidov
c516b96b00 Add comment 2020-11-29 11:34:42 +03:00
Alexey Milovidov
a8937ca792 Send info about official build, memory and cpu to Sentry 2020-11-29 11:31:06 +03:00
Alexey Milovidov
448ef3aca1 Send info about official build, memory and cpu to Sentry 2020-11-29 11:25:38 +03:00
fenglv
5c5d72379a Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix 2020-11-28 03:38:29 +00:00
alesapin
89c292f5b7 Fix response pipe read 2020-11-27 13:12:11 +03:00
alexey-milovidov
d3b10c91f0
Update wide_integer_impl.h 2020-11-26 08:03:54 +03:00
Vitaly Baranov
08b3707842
Merge pull request #15111 from vitlibar/grpc-protocol
Implement GRPC protocol.
2020-11-25 09:00:32 +03:00
zhang2014
a74235397e ISSUES-16835 try fix miss match header with MySQL SHOW statement 2020-11-24 23:31:43 +08:00
Vitaly Baranov
7b0f94b5f2 glibc-compatibility: Add secure_getenv(). 2020-11-24 17:55:02 +03:00
Vitaly Baranov
3253a525e2 glibc-compatibility: Add getauxval(). 2020-11-24 17:55:02 +03:00
Vitaly Baranov
a61359c224 glibc-compatibility: Add accept4() from musl 1.2.1. 2020-11-24 17:55:02 +03:00
Vitaly Baranov
fc67aaec20 glibc-compatibility: Add epoll_create1() from musl 1.2.1. 2020-11-24 17:55:02 +03:00
Vitaly Baranov
d949898890 glibc-compatibility: Add eventfd(), eventfd_read(), eventfd_write() from musl 1.2.1. 2020-11-24 17:55:02 +03:00
Alexander Tokmakov
60a5782c75 fix AST formatting in log messages 2020-11-22 20:23:12 +03:00
fenglv
615287ae75 Avoid bigint_cast stack overflow 2020-11-22 03:42:16 +00:00
Matwey V. Kornilov
9d509cfc56 Add missed <stdexcept>
std::logic_error is used at line 294, so the appropriate header is required.
2020-11-21 13:26:38 +03:00
alexey-milovidov
b494b18748
Merge pull request #17108 from ClickHouse/ya-make-owners
Add "OWNER" to ya.make files.
2020-11-17 05:19:46 +03:00
Alexey Milovidov
24f4fa6edf Follow Arcadia ya.make rules 2020-11-17 00:16:50 +03:00
Alexey Milovidov
3df04ce0c2 Follow Arcadia ya.make rules 2020-11-16 21:24:58 +03:00
myrrc
2430d9d20d fixed the UB when casting from double to int64_t
Corresponding upstream fix: https://github.com/cerevra/int/pull/24
2020-11-13 18:13:15 +03:00
Ivan
902091cc07
Slightly better miniselect usage (#16896)
* Slightly better miniselect usage
* Update ColumnDecimal.cpp
2020-11-13 14:28:18 +03:00
sundyli
5ef809931e
Merge branch 'master' into storage-rocksdb 2020-11-12 08:26:27 +08:00
sundy-li
c7617173c4 add sync_file_range for glibc-compatibility 2020-11-11 09:08:52 +08:00
Alexander Tokmakov
b94cc5c4e5 remove more stringstreams 2020-11-10 21:22:26 +03:00
Alexander Tokmakov
5cdfcfb307 remove other stringstreams 2020-11-09 22:12:44 +03:00
Alexander Tokmakov
a06be511df pcg serialization 2020-11-09 16:07:38 +03:00
Alexey Milovidov
b56486510f Improve Arcadia 2020-11-05 12:55:01 +03:00
Alexey Milovidov
53ef792fe5 Fix gcc build 2020-10-28 02:00:16 +03:00
Alexey Milovidov
91e80598cd Add "harmful" library 2020-10-28 02:00:16 +03:00
Mikhail Filimonov
41971e073a
Fix typos reported by codespell 2020-10-27 12:04:03 +01:00
nikitamikhaylov
8a39b65fa2 fix build and tests 2020-10-19 19:15:22 +03:00
nikitamikhaylov
7a97329209 Merge branch 'master' of github.com:ClickHouse/ClickHouse into welch-t-test 2020-10-19 18:54:26 +03:00
nikitamikhaylov
ff7601a52c add python test and fix build 2020-10-14 21:41:35 +03:00
nikitamikhaylov
252b9b2ec1 better 2020-10-14 16:54:55 +03:00
nikitamikhaylov
f9204135d8 add lgammal.c 2020-10-14 16:54:02 +03:00
Alexey Milovidov
87fe8f2a00 Merge branch 'master' into filipecaixeta-master 2020-10-14 15:27:58 +03:00
Azat Khuzhin
f7bf94b5d3 Check return value of the history_save/history_load
The coding style is different and this is the intention, to make look
like surrounding code.
2020-10-12 23:57:00 +03:00
Azat Khuzhin
f211d33841 Avoid creating separate replxx instance
This replxx object is pretty heavy and in debug build may slow down [1]
(although I cannot confirm 0.5s delay for each query in debug build) the
client and besides it is not required since ClickHouse-Extras/replxx#10,
which changes the behaviour of history_save(), and now it will not
update current session anymore, only save the history to the disk.

  [1]: https://github.com/ClickHouse/ClickHouse/pull/13086#issuecomment-667719026
2020-10-12 23:56:29 +03:00
Alexey Milovidov
a171af157e Remove seven years old trash 2020-10-11 18:52:33 +03:00
Alexey Milovidov
269b6383f5 Check for #pragma once in headers 2020-10-10 21:37:02 +03:00
alesapin
16fa71a4c9 Missed comment 2020-10-08 20:46:59 +03:00
alesapin
70f2a3328d Better atomic operations on refcount 2020-10-08 20:45:18 +03:00
alesapin
de722cd57c Fix race condition in MySQL pool 2020-10-08 18:50:09 +03:00
alesapin
c5df9433f0
Merge pull request #15239 from ClickHouse/100_percent_lld_11_for_clang_11
Build ClickHouse for release with clang-11
2020-10-02 14:59:29 +03:00
Amos Bird
7c9bbe4c29 Neutrialize thinlto's memcpy libcall gen.
(cherry picked from commit 8ffa4d395c)
2020-10-01 22:22:32 +03:00
alesapin
38e50d1078 Revert "enable FastMemcpy properly"
This reverts commit 6e23901227.
2020-10-01 10:38:06 +03:00
Amos Bird
6e23901227 enable FastMemcpy properly 2020-09-30 18:52:49 +03:00
Artem Zuikov
4fd1db73a1
Faster 256-bit multiplication (#15418) 2020-09-29 20:52:34 +03:00
tavplubix
421d3b0b86
Merge pull request #14760 from bharatnc/ncb/event_time_microsec_p2
add event_time_microseconds field for system.{trace,text,query,query_thread}_log tables
2020-09-28 18:34:21 +03:00
alesapin
071ff6c9af
Merge pull request #15063 from azat/symbolizers-settings-for-non-server
Set sanitizers options in the current shell too
2020-09-28 17:44:39 +03:00
alesapin
1adc0a8205 Fix race condition in client suggestions 2020-09-28 12:58:42 +03:00
Artem Zuikov
b4f1eb07ff
slightly better bigint plus/minus (#15320) 2020-09-28 12:07:45 +03:00
bharatnc
a351980717 TextLog - add event_time_microseconds field 2020-09-25 10:39:37 -07:00
alexey-milovidov
31ece3bda5
Merge pull request #15145 from 4ertus2/debt
Better min/max for Int128
2020-09-23 02:03:51 +03:00
Artem Zuikov
2e6edc250c better min/max for Int128 2020-09-22 14:35:46 +03:00
Alexander Kuzmenkov
dde4cf70e1 Merge remote-tracking branch 'origin/master' into HEAD 2020-09-22 14:03:59 +03:00
Alexey Milovidov
ef5363b87f Fix terribly wrong code 2020-09-19 02:05:13 +03:00
Alexey Milovidov
37facf4482 Fix clang-tidy 2020-09-19 02:05:13 +03:00
alexey-milovidov
456c970929
Merge pull request #14808 from ClickHouse/remove-header
Remove one header
2020-09-18 21:57:00 +03:00
Artem Zuikov
0520b05001
Speedup wide integers (#14859) 2020-09-18 12:51:44 +03:00
Alexey Milovidov
9df338f37b Merge branch 'master' into remove-header 2020-09-18 01:18:53 +03:00
Alexander Kuzmenkov
fb64cf210a straighten the protocol version 2020-09-17 17:37:29 +03:00
Artem Zuikov
51ba12c2c3
Try speedup build (#14809) 2020-09-15 12:55:57 +03:00
Alexey Milovidov
3795dfed14 Remove one header 2020-09-14 16:34:44 +03:00
Artem Zuikov
d274125c74
Fix wide integer left shift + refactoring (#14697) 2020-09-14 14:56:43 +03:00
Alexey Milovidov
4e197cf069 Remove unused headers 2020-09-10 19:41:46 +03:00
Vasily Nemkov
3973a17530
MySql datatypes dateTime64 and decimal (#11512) 2020-09-09 15:18:02 +03:00
Alexey Milovidov
e3924b8057 Fix "Arcadia" 2020-09-08 01:14:13 +03:00
Artem Zuikov
7c20aa2c62
Another 256-bit integers (strict 32 bytes) (#14229) 2020-09-04 16:33:02 +03:00
Artem Zuikov
d304d522cc
Refactoring: rename types to allow change bigint library (#14219) 2020-09-01 12:54:50 +03:00
Yatsishin Ilya
a47ffd191d Change my_bool to bool.
The my_bool type no longer exists, and people may have been using it in their own code since some mysql.h functions have been returning that. The recommended fix is to use bool or int, which will work both in 8.0 and older versions.

https://bugs.mysql.com/bug.php?id=85131
2020-08-28 11:59:50 +03:00
Konstantin Podshumok
ef858027d4
unbundled: fix detection of mariadb headers
Squashed:
- unbundled: add warning about mariadbclient dependencies

Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com>
2020-08-25 20:16:42 +03:00
alexey-milovidov
7ea5364299
Merge pull request #13648 from filimonov/tzdata_version2
tzdata improvements
2020-08-24 23:07:37 +03:00
myrrc
d298409660 Merge remote-tracking branch 'upstream/master' into bug/low-cardinality-arrays-optimisations 2020-08-20 12:07:02 +03:00
Artem Zuikov
becc186c91
Add support for extended precision integers and decimals (#13097) 2020-08-19 14:52:17 +03:00
Alexey Milovidov
eeb769d2d4 Remove useless code around zkutil 2020-08-18 22:02:07 +03:00
Alexey Milovidov
5ac2ed9e5b Generate ya.make #13572 2020-08-18 12:53:21 +03:00
Alexey Milovidov
b5af14d6a0 Generate ya.make 2020-08-18 12:47:29 +03:00
alexey-milovidov
1e80318b94
Merge pull request #13600 from amosbird/rlfix
Readline fix
2020-08-16 17:41:50 +03:00
alexey-milovidov
6ac1534f21
Merge pull request #13684 from azat/exceptions-from-signal-handlers
Reset signal handlers just before closing signal pipe to avoid EBADF after
2020-08-14 04:37:54 +03:00
Mikhail Filimonov
fe55ef6b2c Trying to fix TZ with plus sign inside 2020-08-13 23:28:56 +02:00
Azat Khuzhin
b7ba0b64dc Reset signal handlers just before closing signal pipe to avoid EBADF after
stack trace:

    (gdb) bt
    0  0x00007ffff7dda355 in raise () from /usr/lib/libc.so.6
    1  0x00007ffff7dc3853 in abort () from /usr/lib/libc.so.6
    2  0x0000000013a78180 in abort_message (format=format@entry=0x5781e10 "terminate_handler unexpectedly threw an exception") at abort_message.cpp:76
    3  0x0000000013a899ff in std::__terminate (func=<optimized out>) at cxa_handlers.cpp:67
    4  0x0000000013a771a1 in __cxxabiv1::call_terminate (native_exception=native_exception@entry=true, unwind_exception=unwind_exception@entry=0x7ffff70e9060) at cxa_personality.cpp:323
    5  0x0000000013a77669 in __cxxabiv1::scan_eh_tab (results=..., actions=<optimized out>, native_exception=native_exception@entry=true, unwind_exception=0x7ffff70e9060, context=context@entry=0x7fffffffc3a0) at cxa_personality.cpp:887
    6  0x0000000013a77bde in __cxxabiv1::__gxx_personality_v0 (version=<optimized out>, actions=<optimized out>, exceptionClass=<optimized out>, unwind_exception=0x7ffff70e9060, context=0x7fffffffc3a0) at cxa_personality.cpp:969
    7  0x0000000013a962d7 in unwind_phase1 (exception_object=0x7ffff70e9060, cursor=0x7fffffffc3a0, uc=0x7fffffffc2f0) at UnwindLevel1.c:98
    8  _Unwind_RaiseException (exception_object=exception_object@entry=0x7ffff70e9060) at UnwindLevel1.c:363
    9  0x0000000013a8929b in __cxxabiv1::__cxa_rethrow () at cxa_exception.cpp:607
    10 0x000000000f170ad2 in DB::WriteBuffer::next (this=0x7fffffffc510) at WriteBuffer.h:52
    11 writeSignalIDtoSignalPipe (sig=<optimized out>) at BaseDaemon.cpp:111
    12 <signal handler called>
    13 0x00007ffff7e9895b in munmap () from /usr/lib/libc.so.6
    14 0x00007ffff7f7e255 in free_stacks () from /usr/lib/libpthread.so.0
    15 0x00007ffff7f7e6aa in __deallocate_stack () from /usr/lib/libpthread.so.0
    16 0x00007ffff7f80898 in __pthread_clockjoin_ex () from /usr/lib/libpthread.so.0
    17 0x0000000013a759f7 in std::__1::__libcpp_thread_join (__t=0x7fff0aa2b090) at __threading_support:409
    18 std::__1:🧵:join (this=this@entry=0x7fff0aa2b090) at thread.cpp:56
    19 0x000000000a4c9399 in ThreadPoolImpl<std::__1::thread>::finalize (this=this@entry=0x7ffff7053900) at list:355
    20 0x000000000a4c9426 in ThreadPoolImpl<std::__1::thread>::~ThreadPoolImpl (this=0x7ffff7053900, __in_chrg=<optimized out>) at ThreadPool.cpp:172
    21 0x000000000a4c8a9c in GlobalThreadPool::~GlobalThreadPool (this=0x7ffff7053900, __in_chrg=<optimized out>) at ThreadPool.h:132
    22 std::__1::default_delete<GlobalThreadPool>::operator() (__ptr=0x7ffff7053900, this=<optimized out>) at memory:2363
    23 std::__1::unique_ptr<GlobalThreadPool, std::__1::default_delete<GlobalThreadPool> >::reset (__p=0x0, this=<optimized out>) at memory:2618
    24 std::__1::unique_ptr<GlobalThreadPool, std::__1::default_delete<GlobalThreadPool> >::~unique_ptr (this=<optimized out>, __in_chrg=<optimized out>) at memory:2572
    25 0x00007ffff7ddcc57 in __run_exit_handlers () from /usr/lib/libc.so.6
    26 0x00007ffff7ddcdfe in exit () from /usr/lib/libc.so.6
    27 0x00007ffff7dc5009 in __libc_start_main () from /usr/lib/libc.so.6
    28 0x000000000a48702e in _start () at new:340
2020-08-13 23:12:36 +03:00
myrrc
e2e38e30d0 Merge remote-tracking branch 'upstream/master' into bug/low-cardinality-arrays-optimisations 2020-08-12 19:12:08 +03:00
myrrc
82206e89dd fixed perftest long test and StringRef assert 2020-08-12 17:07:56 +03:00