Commit Graph

56182 Commits

Author SHA1 Message Date
Alexander Kuzmenkov
2eba7413e1 remove extra newline 2021-01-22 02:42:24 +03:00
dankondr
970c75860c Revert "Make extract case insensitive"
This reverts commit c409508f
2021-01-22 02:36:37 +03:00
dankondr
bc52fe2cff Revert "Make in case insensitive"
This reverts commit df50b931
2021-01-22 02:32:56 +03:00
Alexander Kuzmenkov
963699d9c8
Update run-fuzzer.sh 2021-01-22 02:26:49 +03:00
Alexey Milovidov
79229ef25a Skip Arcadia 2021-01-22 02:01:17 +03:00
Alexey Milovidov
117708abc6 Skip Arcadia 2021-01-22 01:59:56 +03:00
Alexey Milovidov
afc6f2fd8e Add http_referer to client info 2021-01-22 01:55:45 +03:00
Alexey Milovidov
056b44b64f Add a test 2021-01-22 01:49:37 +03:00
Alexander Kuzmenkov
b0fca03d79
Update run-fuzzer.sh 2021-01-22 01:13:48 +03:00
Alexey Milovidov
960d149e0b More annotations 2021-01-22 01:05:04 +03:00
Alexey Milovidov
dcd03eb155 Remove useless file 2021-01-22 00:57:00 +03:00
dankondr
41d75249a2 Add IP num/string conversions MySQL compatibility alias
Functions:
- FunctionIPv6NumToString
- FunctionIPv6StringToNum
- FunctionIPv4NumToString
- FunctionIPv4StringToNum
2021-01-22 00:19:14 +03:00
kssenii
daab2c91bb Better 2021-01-21 21:15:11 +00:00
dankondr
89b394ea57 Add toDate MySQL compatibility alias 2021-01-22 00:02:35 +03:00
Olga Revyakina
e36cffe3d4 Query fixed. 2021-01-22 00:01:52 +03:00
Olga Revyakina
cf5c0dad94 Minor fix 2021-01-21 23:56:29 +03:00
alesapin
5037d3befd
Merge pull request #19355 from ClickHouse/fix_race_test_keeper
Fix race condition in TestKeeperHandler on session finish
2021-01-21 23:53:18 +03:00
dankondr
e066add261 Add toDayOfMonth MySQL compatibility alias 2021-01-21 23:49:06 +03:00
dankondr
27bf42b67f Add toDayOfWeek MySQL compatibility alias 2021-01-21 23:46:00 +03:00
dankondr
3025a09f7e Add toDayOfYear MySQL compatibility alias 2021-01-21 23:42:08 +03:00
dankondr
685b4107d2 Add base64Decode MySQL compatibility alias 2021-01-21 23:36:26 +03:00
alexey-milovidov
1883bc546a
Merge pull request #19357 from ClickHouse/values-ubsan
Fix potential nullptr dereference in table function VALUES
2021-01-21 23:34:41 +03:00
alexey-milovidov
37c345f55e
Merge pull request #19347 from ClickHouse/array-element-ubsan
Avoid UBSan report in arrayElement
2021-01-21 23:34:19 +03:00
dankondr
54bef0568b Add base64Encode MySQL compatibility alias 2021-01-21 23:33:15 +03:00
Alexander Kuzmenkov
56687b2d84
Update run.sh 2021-01-21 23:29:01 +03:00
dankondr
b8661e5caf Add toHour MySQL compatibility alias 2021-01-21 23:28:20 +03:00
Dmitriy
0cdf184242 Fix materialize-mysql.md and index.md
Поправил согласно комментариям разработчика.
2021-01-21 23:14:49 +03:00
dankondr
c409508fbb Make extract case insensitive 2021-01-21 23:05:38 +03:00
Alexander Kuzmenkov
e9e3314026
Update run-fuzzer.sh 2021-01-21 23:05:35 +03:00
dankondr
661a00da4e Make hex case insensitive 2021-01-21 23:03:13 +03:00
kssenii
1ec463b61f Fast test fix 2021-01-21 20:02:44 +00:00
alesapin
c2e6d6cfe8 Starting nukeeper server 2021-01-21 23:01:25 +03:00
Alexander Kuzmenkov
71e663701d update the tests 2021-01-21 22:56:28 +03:00
dankondr
df50b93159 Make in case insensitive 2021-01-21 22:55:16 +03:00
Alexey Milovidov
d9cb1c1bdd Avoid UBSan report in aggregate function sum 2021-01-21 22:52:00 +03:00
dankondr
8c963c03cf Make isNull case insensitive 2021-01-21 22:44:10 +03:00
Maksim Kita
e06383e0ae Darwin fixed build issues 2021-01-21 22:32:17 +03:00
Azat Khuzhin
b0a80af888 Reduce lock contention for multiple layers of the Buffer engine
Otherwise you can see something like this for the following query:

    ```sql
    WITH
        arrayMap(x -> demangle(addressToSymbol(x)), s.trace) AS trace_array,
        arrayStringConcat(trace_array, '\n') AS trace_string
    SELECT
        p.thread_id,
        p.query_id,
        p.query,
        trace_string
    FROM
    (
        SELECT
            query_id,
            query,
            arrayJoin(thread_ids) AS thread_id
        FROM system.processes
    ) AS p
    INNER JOIN system.stack_trace AS s ON p.thread_id = s.thread_id
    ORDER BY p.query_id ASC
    SETTINGS enable_global_with_statement = 0, allow_introspection_functions = 1
    FORMAT PrettyCompactNoEscapes
    ```

Lots of the following:

    ```sql
    INSERT INTO buffer (...) VALUES

    __lll_lock_wait
    pthread_mutex_lock
    std::__1::mutex::lock()
    DB::StorageBuffer::reschedule()
    DB::BufferBlockOutputStream::write(DB::Block const&)
    ```

That will wait one of this:

    ```
    INSERT INTO buffer (...) VALUES

    ...
    DB::PushingToViewsBlockOutputStream::write(DB::Block const&)
    DB::AddingDefaultBlockOutputStream::write(DB::Block const&)
    DB::SquashingBlockOutputStream::finalize()
    DB::SquashingBlockOutputStream::writeSuffix()
    DB::PushingToViewsBlockOutputStream::writeSuffix()
    DB::StorageBuffer::writeBlockToDestination(DB::Block const&, std::__1::shared_ptr<DB::IStorage>)
    DB::StorageBuffer::flushBuffer(DB::StorageBuffer::Buffer&, bool, bool, bool)
    ```

P.S. we cannot simply unlock the buffer during flushing, see comments in
the code
2021-01-21 22:09:24 +03:00
Alexey Milovidov
cc160813ce Add a test 2021-01-21 21:44:48 +03:00
Alexey Milovidov
bb56daf026 Fix build 2021-01-21 21:42:26 +03:00
Alexey Milovidov
3d931df276 Fix buffer overflow in Uber H3 library 2021-01-21 21:40:14 +03:00
Azat Khuzhin
82e7e7d9cb Fix constant folding for expressions depends from subqueries result
Do not use subquery result, when value is unknown, for constant folding.

v2: fix simple subqueries, fixes 00597_push_down_predicate.
v3:
- use identity over introducing yet another cast analog (as suggested by @akuzm)
- simpler suitable_for_const_folding check
v4: use identity(cast()) since only cast() can provide corrent type (for
data types that does not have it's own type, i.e. DateTime)
v5: do not optimize consts if only_analyze isset, regardless the block
content
2021-01-21 21:26:50 +03:00
Azat Khuzhin
ea7528b853 identity: mark it as non suitable for constant folding 2021-01-21 21:22:23 +03:00
Azat Khuzhin
82f6c642ae identity: simple functions in oneline (coding style) 2021-01-21 21:22:23 +03:00
Azat Khuzhin
44011061b5 Add missing DROP TABLE at the beginning of 01268_mv_scalars test 2021-01-21 21:22:23 +03:00
Azat Khuzhin
95c9e57ec1 Add 01600_parts_types_metrics 2021-01-21 21:17:01 +03:00
Azat Khuzhin
974f0daeb9 Add set database_atomic_wait_for_drop_and_detach_synchronously=1 for 01600_parts_states_metrics
Without this setting the test will pass only when the table will be
actually removed by the background worker of the Atomic engine.

In CI this is not required since
database_atomic_wait_for_drop_and_detach_synchronously is set explicitly
in via tests/users.d.
2021-01-21 21:17:01 +03:00
Azat Khuzhin
926b0ddc59 Rename 01600_count_of_parts_metrics to 01600_parts_states_metrics 2021-01-21 21:17:00 +03:00
Azat Khuzhin
cb951c2116 Add metrics for MergeTree parts types
- PartsWide
- PartsCompact
- PartsInMemory
2021-01-21 21:17:00 +03:00
Azat Khuzhin
c68f7cd5b1 Measure time that spend during flush of the Buffer to the underlying 2021-01-21 21:11:39 +03:00