Compare commits

...

954 Commits

Author SHA1 Message Date
János Benjamin Antal
54238110a9
Merge 95b8d80318 into 3eb5bc1a0f 2024-09-19 01:53:56 +02:00
Yarik Briukhovetskyi
3eb5bc1a0f
Merge pull request #68963 from yariks5s/hive_partitioning_filtration
Filtering for hive partitioning
2024-09-18 22:16:58 +00:00
Robert Schulze
b94a7167a8
Merge pull request #69580 from rschu1ze/bump-libpqxx
Bump libpqxx to v7.7.5
2024-09-18 18:56:12 +00:00
János Benjamin Antal
95b8d80318 Try to run kafka tests parallel 2024-09-18 18:26:56 +00:00
Konstantin Bogdanov
64e58baba1
Merge pull request #69682 from ClickHouse/more-asserts-for-hashjoin
Try fix asserts failure in `HashJoin`
2024-09-18 18:20:27 +00:00
max-vostrikov
a3fe155579
Merge pull request #69737 from ClickHouse/test_printf
added some edge cases for printf tests
2024-09-18 17:49:57 +00:00
Antonio Andelic
a997cfad2b
Merge pull request #68108 from ClickHouse/keeper-some-improvement2
Keeper improvements package
2024-09-18 16:35:57 +00:00
maxvostrikov
f4b4b3cc35 added some edge cases for printf tests
added some edge cases for printf tests
2024-09-18 17:22:36 +02:00
Konstantin Bogdanov
cb24849396
Move assert 2024-09-18 15:24:48 +02:00
Kseniia Sumarokova
7fd2207626
Merge pull request #68504 from ClickHouse/miscellaneous-3
Miscellaneous
2024-09-18 11:21:26 +00:00
Antonio Andelic
4f73c677ac Merge branch 'master' into keeper-some-improvement2 2024-09-18 13:19:24 +02:00
Kseniia Sumarokova
69f45acfd7
Merge pull request #69672 from ClickHouse/s3queue-refactor-2
S3Queue small refactoring
2024-09-18 10:47:14 +00:00
Yarik Briukhovetskyi
4c78206d0a
Merge pull request #69718 from arruw/patch-1
Improve QuantileDD docs
2024-09-18 10:34:46 +00:00
Mikhail Artemenko
429e8ada79
Merge pull request #69690 from ClickHouse/remove_recursive_small_fixes
Remove recursive small fixes
2024-09-18 10:23:27 +00:00
mmav
06b49d18d9
Update quantileddsketch.md
Update function syntax
2024-09-18 10:45:10 +01:00
Kseniia Sumarokova
a17a8febf7
Merge pull request #69714 from tbragin/patch-15
Update README.md - Meetups
2024-09-18 09:20:05 +00:00
Robert Schulze
55529ec5a2
Merge pull request #69674 from rschu1ze/bump-pg
Bump libpq from v14.3 to v15.8
2024-09-18 09:13:13 +00:00
Yarik Briukhovetskyi
143d9f0201
Merge branch 'ClickHouse:master' into hive_partitioning_filtration 2024-09-18 11:11:04 +02:00
Antonio Andelic
3106653852 Fix watches 2024-09-18 10:47:40 +02:00
Yakov Olkhovskiy
82dbb3bb32
Merge pull request #69615 from ClickHouse/refactor-secret-finder
Unification of FunctionSecretArgumentsFinder
2024-09-18 08:17:52 +00:00
Tanya Bragin
1bcdde3e62
Update README.md - Meetups 2024-09-17 19:48:48 -07:00
Alexey Katsman
2cef99c311
Merge pull request #69576 from bigo-sg/arrayzip_allow_empty
Allow empty arguments for arrayZip/arrayZipUnaligned
2024-09-17 21:25:29 +00:00
Robert Schulze
cd7a1a9288
Merge pull request #69684 from rschu1ze/disallow-alter-table-add-inv-idx
Prohibit `ALTER TABLE ... ADD INDEX ... TYPE` inverted if setting = 0
2024-09-17 21:18:02 +00:00
Alexander Gololobov
6597a8ed04
Merge pull request #69596 from ClickHouse/fix_dedup_in_parallel_replicas_announcement
Optimize complexity of part deduplication in parallel replicas announcement
2024-09-17 20:48:12 +00:00
Kseniia Sumarokova
3b901f49e5
Merge pull request #69673 from ClickHouse/update-assert
Update assert
2024-09-17 20:39:07 +00:00
Raúl Marín
958c3effae
Merge pull request #69705 from ClickHouse/revert-69376-marco-vb/setting-stop-insert-on-full-disk
Revert "Add user-level settings min_free_diskspace_bytes_to_throw_insert and min_free_diskspace_ratio_to_throw_insert"
2024-09-17 19:49:35 +00:00
Raúl Marín
474499d240
Revert "Add user-level settings min_free_diskspace_bytes_to_throw_insert and min_free_diskspace_ratio_to_throw_insert" 2024-09-17 21:48:19 +02:00
jsc0218
839f06035f
Merge pull request #69376 from marco-vb/marco-vb/setting-stop-insert-on-full-disk
Add user-level settings min_free_diskspace_bytes_to_throw_insert and min_free_diskspace_ratio_to_throw_insert
2024-09-17 18:46:43 +00:00
Vitaly Baranov
4f88ccb6a8
Merge pull request #69201 from NikBarykin/allow_arguments_in_custom_database_engines
Allow custom settings in database engine
2024-09-17 18:26:57 +00:00
Kruglov Pavel
a226567bc2
Merge pull request #69560 from Avogar/fix-prewhere-reorder
Keep original order of conditions during move to prewhere
2024-09-17 18:22:19 +00:00
Vitaly Baranov
fcda762a27
Merge pull request #69346 from vitlibar/restore-access-dependencies
Improve restoring of access entities' dependencies
2024-09-17 18:21:55 +00:00
Mikhail Artemenko
9c185374e4 fix level sorting 2024-09-17 18:14:47 +00:00
Mikhail Artemenko
13e82d6439 fix double visit of uncommitted changes 2024-09-17 17:45:04 +00:00
Mikhail f. Shiryaev
fdee35cccc
Merge pull request #69557 from ClickHouse/integration-prepull-kill-runner
Kill runner when integration tests fail to pre-pull
2024-09-17 17:27:20 +00:00
Konstantin Bogdanov
b08e727aef
Count allocated bytes from scratch after rerange 2024-09-17 19:02:10 +02:00
Miсhael Stetsyuk
9eba103c5e
Merge pull request #69670 from ClickHouse/sync-executeToDatabaseImpl-with-private-fork
sync changes to `InterpreterDropQuery::executeToDatabaseImpl` from the private fork
2024-09-17 16:54:15 +00:00
Yarik Briukhovetskyi
f52cdfb795
Merge branch 'ClickHouse:master' into hive_partitioning_filtration 2024-09-17 18:50:43 +02:00
Konstantin Bogdanov
a210f98819
Lint 2024-09-17 18:28:27 +02:00
kssenii
e574c49e25 Fix 2024-09-17 18:19:05 +02:00
Konstantin Bogdanov
7c5d55c6b2
Lint 2024-09-17 18:10:51 +02:00
Robert Schulze
665f362601
Prohibit ALTER TABLE ... ADD INDEX ... TYPE inverted if setting = 0 2024-09-17 16:10:03 +00:00
Konstantin Bogdanov
80259659ff
More asserts 2024-09-17 18:03:19 +02:00
Alexander Gololobov
574a26c63b Use adjacent_find to check adjacent parts 2024-09-17 17:56:44 +02:00
Alexander Gololobov
3674c97ebb Fix for using part after std::move from it 2024-09-17 17:49:02 +02:00
vdimir
8508b1ba37
Merge pull request #67966 from ClickHouse/vdimir/datetime64_constant_to_ast_f
Add test cases to 03217_datetime64_constant_to_ast
2024-09-17 14:56:32 +00:00
Alexander Gololobov
190d3f04c9 More optimal check for intrsecting parts in DefaultCoordinator init 2024-09-17 16:54:49 +02:00
Alexander Gololobov
aba7de5091 Verify that there are no intersecting parts in the resulting all_parts_to_read 2024-09-17 16:53:32 +02:00
Antonio Andelic
8db3dddb3d Fix watches count and list request 2024-09-17 16:15:55 +02:00
Nikita Taranov
ffaf97a390
Merge pull request #68424 from ClickHouse/adaptive_parallel_replicas
Adaptive mark_segment_size for parallel replicas
2024-09-17 13:52:42 +00:00
Yarik Briukhovetskyi
3a7c68a052
Update src/Storages/VirtualColumnUtils.cpp
Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
2024-09-17 15:39:26 +02:00
Antonio Andelic
452fde78c7
Merge pull request #69582 from ClickHouse/keeper-better-ssl-support
Support more advanced SSL options for Keeper internal communication
2024-09-17 13:32:18 +00:00
Kseniia Sumarokova
51fa9ebf8a
Merge pull request #68520 from ClickHouse/fix-bad-exception-messages
Fix bad exception messages
2024-09-17 13:29:53 +00:00
kssenii
e30ebfa23e Add mode validation 2024-09-17 15:24:02 +02:00
Kruglov Pavel
b21be2bc54
Merge pull request #68591 from bigo-sg/orc_dict_encode
Add settings `output_format_orc_dictionary_key_size_threshold` to allow user to enable dict encoding for string column in ORC output format
2024-09-17 13:22:44 +00:00
Alexander Gololobov
14736d95c5
Merge pull request #69606 from ClickHouse/check_time_limit_in_index_analysis
Check time limits while analyzing indexes
2024-09-17 13:14:08 +00:00
Yarik Briukhovetskyi
e8d50aa97f
review 2024-09-17 15:02:33 +02:00
NikBarykin
4b69d8e2ca Fix CE 2024-09-17 15:52:20 +03:00
robot-clickhouse
5ce8604869 Automatic style fix 2024-09-17 12:37:31 +00:00
Robert Schulze
813bcd896f
Bump to v18.8 2024-09-17 12:30:12 +00:00
kssenii
3a05282bce Update assert 2024-09-17 14:26:31 +02:00
Yakov Olkhovskiy
fd0c7a1c18 Merge branch 'master' into refactor-secret-finder 2024-09-17 12:16:19 +00:00
Kseniia Sumarokova
4704fb8a3b
Merge branch 'master' into miscellaneous-3 2024-09-17 13:32:01 +02:00
Kseniia Sumarokova
0369aaea87
Merge pull request #69092 from 1on/master
Ability to limit columns for tables in MaterializedPostgreSQL
2024-09-17 11:08:05 +00:00
Kseniia Sumarokova
3f663f8e09
Merge pull request #68821 from joelynch/joelynch/disk-encrypted-missing-method
Fix zero copy bug with encrypted disk and UNFREEZE
2024-09-17 11:05:14 +00:00
Vitaly Baranov
f768717be8 Fix test. 2024-09-17 13:05:02 +02:00
Kseniia Sumarokova
64106e7b3c
Merge pull request #68696 from ucasfl/minor
Use proper ErrorCodes, replace NETWORK_ERROR by HDFS_ERROR
2024-09-17 10:57:30 +00:00
Kseniia Sumarokova
79223045c9
Merge pull request #68592 from Sergey2Gnezdilov/patch-1
Update nats.md
2024-09-17 10:56:37 +00:00
Vitaly Baranov
983b061b58 Corrections after review. 2024-09-17 12:56:10 +02:00
kssenii
3a299f382d Refactor 2024-09-17 12:52:45 +02:00
Vitaly Baranov
f8f72ccb00 Add test. 2024-09-17 12:10:31 +02:00
Vitaly Baranov
1ccd461c97 Fix restoring access entities dependant on existing ones. 2024-09-17 12:10:31 +02:00
vdimir
de308acfad
Merge pull request #69328 from ClickHouse/vdimir/integration-tests-randomize-settings
Randomize integration tests settings
2024-09-17 10:05:17 +00:00
Yarik Briukhovetskyi
cb92aaf968
fix 03232_file_path_normalizing 2024-09-17 11:26:13 +02:00
Michael Stetsyuk
5aaff37b36 sync changes to InterpreterDropQuery::executeToDatabaseImpl from the private fork 2024-09-17 09:16:52 +00:00
Robert Schulze
386d54cedf
Merge pull request #69564 from rschu1ze/untrash-libpq
Replace libpq code dump by postgresql fork and bump to v14.3
2024-09-17 09:15:38 +00:00
Yarik Briukhovetskyi
2c1c1a93c6
Merge pull request #69626 from yariks5s/small_tests_fix
Reorder some tests (follow-up to #69514)
2024-09-17 09:09:06 +00:00
Antonio Andelic
9f932fb453 Merge branch 'master' into keeper-better-ssl-support 2024-09-17 10:52:35 +02:00
Antonio Andelic
f3654b8fc8 Merge branch 'master' into keeper-some-improvement2 2024-09-17 10:35:38 +02:00
Antonio Andelic
676b6238d0 Update comments 2024-09-17 10:30:39 +02:00
Antonio Andelic
e876997ebb Merge branch 'master' into keeper-some-improvement2 2024-09-17 10:28:02 +02:00
Nikolai Kochetov
e7eaa01bb3
Merge pull request #69298 from ClickHouse/array-join-step-refactoring
Refactor ArrayJoin step.
2024-09-17 08:26:09 +00:00
Antonio Andelic
52dc9a54a7
Merge pull request #69627 from ClickHouse/keeper-fix-multi-no-auth
Fix Keeper multi request preprocessing with NOAUTH
2024-09-17 06:48:07 +00:00
Konstantin Bogdanov
b4a6d41b52
Merge pull request #69655 from ClickHouse/try-fix-02447_drop_database_replica
Try fix `02447_drop_database_replica`
2024-09-17 01:00:26 +00:00
Konstantin Bogdanov
a329150eef
Merge pull request #69601 from ClickHouse/fix-tsan-writebufferfromhttpserverresponse
Try to fix data race in `WriteBufferFromHTTPServerResponse`
2024-09-17 00:23:17 +00:00
pufit
7b94dc1813
Merge pull request #65277 from arthurpassos/multi_auth_methods
Multi auth methods
2024-09-16 23:53:33 +00:00
Konstantin Bogdanov
8c7c37de1d
temp-commit 2024-09-16 23:41:51 +02:00
Konstantin Bogdanov
6a26c5cf8e
Fix 2024-09-16 20:54:02 +02:00
Miсhael Stetsyuk
0888b9746e
Merge pull request #69588 from ClickHouse/add-sleep-for-in-enqueueQueryImpl
sleep for 50ms before retrying to acquire a lock in `DatabaseReplicatedDDLWorker::enqueueQueryImpl`
2024-09-16 18:41:59 +00:00
Robert Schulze
0424329fc0
Merge pull request #69581 from rschu1ze/remove-n
Remove superfluous `--multiquery/-n`, pt. V
2024-09-16 18:08:00 +00:00
Yarik Briukhovetskyi
0cdec0acf1
fix logical error 2024-09-16 19:13:30 +02:00
Kruglov Pavel
da993ad0a3
Merge pull request #69635 from ClickHouse/Avogar-patch-7
Update docs of JSONAsObject format with new JSON type
2024-09-16 16:24:21 +00:00
Yarik Briukhovetskyi
19dbee7cdb
Merge pull request #69625 from ClickHouse/fix-filelog-docs
Update filelog.md
2024-09-16 15:50:38 +00:00
Konstantin Bogdanov
5eb3d9496a
Merge pull request #69642 from ClickHouse/fix-invalid-clickhouse-format-invocation
Fix invalid `clickhouse-format` invocation in tests
2024-09-16 15:17:37 +00:00
Yakov Olkhovskiy
19e2197582
fix 2024-09-16 10:38:28 -04:00
Yarik Briukhovetskyi
04f23332c3
fix filter issue 2024-09-16 15:59:22 +02:00
Rich Raposa
d793e06860
Merge pull request #69622 from Olexandr88/patch-1
Docs: Update index
2024-09-16 13:12:30 +00:00
Konstantin Bogdanov
23e0e92f5f
Fix 2024-09-16 15:07:40 +02:00
Yakov Olkhovskiy
d223c4547f
fix after master merge 2024-09-16 08:35:05 -04:00
vdimir
1986fb1418
Merge pull request #68595 from ClickHouse/vdimir/fix_function_printf_style
Fix style in Functions/printf.cpp
2024-09-16 12:34:31 +00:00
Yakov Olkhovskiy
58993d3f3b
Merge branch 'master' into refactor-secret-finder 2024-09-16 08:33:16 -04:00
Kruglov Pavel
e5ae4c8e8b
Update docs of JSONAsObject format with new JSON type 2024-09-16 14:19:20 +02:00
Yarik Briukhovetskyi
dc02b168a0
fix references + remove index 2024-09-16 13:53:47 +02:00
Alexander Gololobov
8507d209c0
Merge branch 'master' into check_time_limit_in_index_analysis 2024-09-16 13:36:51 +02:00
Alexander Gololobov
f5b9d5ad34 Test for checking time limit in index analysis 2024-09-16 13:34:40 +02:00
Alexander Gololobov
4af369fbc4 Failpoint for testing slow index analysis 2024-09-16 13:34:01 +02:00
Robert Schulze
20b25566f5
Remove superfluous --multiquery/-n 2024-09-16 11:30:56 +00:00
Antonio Andelic
8cdcc431fe Fix 2024-09-16 13:30:17 +02:00
Antonio Andelic
f401eccc64 Fix Keeper multi request preprocessing with NOAUTH 2024-09-16 12:48:01 +02:00
Yarik Briukhovetskyi
6863dc7647
init 2024-09-16 12:48:01 +02:00
János Benjamin Antal
60f893bf87
Update filelog.md 2024-09-16 12:38:42 +02:00
Mikhail f. Shiryaev
f36408a666
Merge pull request #69599 from ClickHouse/local-debug
Improve debug step in actions
2024-09-16 10:20:12 +00:00
Yarik Briukhovetskyi
de85f5f251
empty commit (I've changed the changelog entry) 2024-09-16 12:15:11 +02:00
Oleksandr
85af661b9c
Docs: Update index 2024-09-16 12:57:24 +03:00
vdimir
1963e971f3
fix 2024-09-16 09:57:20 +00:00
vdimir
056c7af356
comment 2024-09-16 09:14:48 +00:00
vdimir
cf9200f1d0
Randomize integration tests settings 2024-09-16 09:14:44 +00:00
Antonio Andelic
b42c6491e4
Merge pull request #69578 from ClickHouse/issues/68932/enable_in_ci
enable removeRecursive in CI
2024-09-16 09:03:11 +00:00
Robert Schulze
1a4c7b7c61
Merge pull request #69493 from ucasfl/vector-index-insert
Speedup insert performance of vector similarity index by parallelization
2024-09-16 08:54:02 +00:00
Oleksandr
14feba8443
Docs: Update index 2024-09-16 11:42:09 +03:00
vdimir
4c4a051d5e
Merge pull request #69075 from kirillgarbar/remove-stale-moving-parts
Remove stale moving parts without zookeeper
2024-09-16 08:02:05 +00:00
Vitaly Baranov
a55cc03973
Merge pull request #69611 from vitlibar/masking-sensitive-info-in-gcs-table-function
Masking sensitive info in gcs() table function
2024-09-16 07:58:17 +00:00
Antonio Andelic
187a717872 Merge branch 'master' into keeper-better-ssl-support 2024-09-16 09:17:30 +02:00
Robert Schulze
37411bf240
Fix sizing with unconstrained thread pool size 2024-09-15 15:06:14 +00:00
Arthur Passos
5f464a6d74 trigger ic 2024-09-15 07:09:49 -03:00
Robert Schulze
733c57dae7
Merge pull request #69583 from rschu1ze/better-fix-67476
A better fix for #67476
2024-09-15 09:35:37 +00:00
李扬
4412946532
Merge branch 'master' into orc_dict_encode 2024-09-15 17:25:20 +08:00
marco-vb
03737ddcab Reduced disk size on test for faster execution. 2024-09-14 22:24:17 +00:00
marco-vb
038f56cb5e Only make checks to stop inserts if settings are being used. 2024-09-14 21:04:12 +00:00
Nikita Taranov
63577507c9 fix build 2024-09-14 21:43:27 +01:00
Nikita Taranov
9eb78773a6 Merge branch 'master' into adaptive_parallel_replicas 2024-09-14 19:31:02 +01:00
Nikita Taranov
918ead070a
Merge pull request #69602 from ClickHouse/rm_explicit_initial_announce_from_RFMT
Remove explicit announce from local replica in ReadFromMergeTree
2024-09-14 17:58:41 +00:00
Yakov Olkhovskiy
6f63a7b213 fix tidy 2024-09-14 16:46:48 +00:00
Yakov Olkhovskiy
56cfa74a14 fix 2024-09-14 13:32:52 +00:00
Yakov Olkhovskiy
dbb1d043fe unification of FunctionSecretArgumentsFinder 2024-09-14 05:46:08 +00:00
Vitaly Baranov
a461d20af9 Masking sensitive info in gcs() table function. 2024-09-13 23:03:56 +02:00
Nikita Taranov
8fd9345d2d fix 2024-09-13 21:26:58 +01:00
Yarik Briukhovetskyi
7d5203f8a7
add resize for partitioning_columns 2024-09-13 21:38:48 +02:00
Yarik Briukhovetskyi
0d1d750437
fix crash 2024-09-13 20:43:51 +02:00
Yarik Briukhovetskyi
ad31d86a15
move the block inserting 2024-09-13 19:58:19 +02:00
marco-vb
56f3030b17 Black formatting python test. 2024-09-13 17:32:33 +00:00
Yarik Briukhovetskyi
991279e5c6
revert 2024-09-13 19:23:00 +02:00
Alexander Gololobov
31ddfc6f5f Check time limit while analyzing indexes 2024-09-13 19:19:21 +02:00
Marco Vilas Boas
ddf2e07fd0
Merge branch 'ClickHouse:master' into marco-vb/setting-stop-insert-on-full-disk 2024-09-13 18:17:44 +01:00
marco-vb
5cc12ca9ee Added integration testing for newly implemented settings. 2024-09-13 17:16:16 +00:00
Miсhael Stetsyuk
98a2c1c638
Merge pull request #69274 from ClickHouse/fix-metadata-version-in-zookeeper
fix `metadata_version` in ZooKeeper
2024-09-13 17:11:21 +00:00
Nikita Taranov
bab574d674
Merge pull request #69404 from bigo-sg/69135
`have_compressed` is lost in `HashJoin::reuseJoinedData`
2024-09-13 16:39:43 +00:00
Miсhael Stetsyuk
4225ba79f9
use base/sleep.h 2024-09-13 17:35:11 +01:00
Nikita Taranov
57a6a64d8c fix 2024-09-13 17:31:47 +01:00
Nikita Taranov
de78992966
Update tests/integration/test_parallel_replicas_snapshot_from_initiator/test.py
Co-authored-by: Igor Nikonov <954088+devcrafter@users.noreply.github.com>
2024-09-13 18:25:51 +02:00
Nikita Taranov
42670a46d4 impl 2024-09-13 17:00:46 +01:00
Mikhail f. Shiryaev
b55d0b54ea
Merge steps together to minimize grouping 2024-09-13 17:35:09 +02:00
Mikhail f. Shiryaev
418ef3f8bc
Use local debug action in every action 2024-09-13 17:20:49 +02:00
Mikhail f. Shiryaev
b420bbf855
Improve debug action 2024-09-13 17:17:10 +02:00
Alexander Gololobov
e13247b67e Fix clang-18 build 2024-09-13 16:50:43 +02:00
Yarik Briukhovetskyi
c184aae686
review 2024-09-13 16:40:01 +02:00
Yarik Briukhovetskyi
14a6b0422b
disable optimize_count_from_files 2024-09-13 16:33:17 +02:00
Alexander Gololobov
2650a20628 Make dedup logic O(n*log(n)) instead of O(n^2) 2024-09-13 16:21:17 +02:00
Antonio Andelic
9a31fc385d Fixes 2024-09-13 15:58:17 +02:00
marco-vb
ddc506a677 Corrected implementation for check of new settings and fix lint of settings change history. 2024-09-13 13:48:42 +00:00
Michael Stetsyuk
2b6238a5e5 sleep for 10ms beforen retrying to acquire a lock in DatabaseReplicatedDDLWorker::enqueueQueryImpl 2024-09-13 13:41:01 +00:00
avogar
2812953a8a Try to fix tests 2024-09-13 13:37:42 +00:00
Alexander Tokmakov
8111a32c72
Merge pull request #69539 from ClickHouse/evillique-patch-2
Fix attach of ReplicatedMergeTree tables in Replicated databases
2024-09-13 13:06:21 +00:00
Antonio Andelic
492461271b Merge branch 'master' into keeper-better-ssl-support 2024-09-13 14:44:12 +02:00
Michael Stetsyuk
721e9a7356 empty 2024-09-13 12:38:58 +00:00
Michael Stetsyuk
1b1db0081f do not fix metadata_version if replica is read_only 2024-09-13 12:38:25 +00:00
Кирилл Гарбар
6a7cfd13f7 Set PRESERVE_BLOBS if part is fetched from another replica 2024-09-13 15:25:17 +03:00
Antonio Andelic
3c47f3df4b Support more advanced SSL options for Keeper internal communication 2024-09-13 14:23:01 +02:00
Arthur Passos
54e75fd4dc fix black 2024-09-13 09:04:14 -03:00
Arthur Passos
ae6e236acf update recently introduced test 2024-09-13 08:59:59 -03:00
Robert Schulze
51f3245030
A better fix for #67476
Throw an exception instead of silently ignoring two conflicting settings.
2024-09-13 11:45:15 +00:00
Mikhail Artemenko
baf6aaef1d fix tests 2024-09-13 11:32:33 +00:00
Robert Schulze
9ca149a487
Fix GWP-asan crash 2024-09-13 11:07:09 +00:00
Daniil Ivanik
2fce90ab76
Merge pull request #66782 from a-a-f/input_format_json_empty_as_default
Add support for the `input_format_json_empty_as_default` setting
2024-09-13 10:33:45 +00:00
李扬
11c7cdabf8
Merge branch 'ClickHouse:master' into orc_dict_encode 2024-09-13 18:26:20 +08:00
李扬
71553022e0
fix 03230_array_zip_unaligned 2024-09-13 18:16:13 +08:00
李扬
53e1975833
fix 01045_array_zip 2024-09-13 18:15:47 +08:00
Yarik Briukhovetskyi
e0c4a88f98
Merge pull request #69514 from aiven-sal/aiven-sal/showcolumns
Correctly handle tables' names with dots in SHOW COLUMNS and SHOW INDEX
2024-09-13 10:12:53 +00:00
János Benjamin Antal
d5c3adabde
Merge pull request #69301 from aohoyd/master
Add xml char escaping to docker's entrypoint
2024-09-13 10:11:30 +00:00
Marco Vilas Boas
8299b31d47
Merge branch 'master' into marco-vb/setting-stop-insert-on-full-disk 2024-09-13 10:44:04 +01:00
Robert Schulze
97c8d2897c
Bump to v14.13 2024-09-13 09:36:19 +00:00
lgbo-ustc
08fd6c8ab6 have_compressed is lost in reuseJoinedData 2024-09-13 17:18:27 +08:00
Nikita Taranov
f330fdb1bf
Merge pull request #69406 from canhld94/parallel_join_limit_threads
Not retaining thread in concurrent hash join threadpool
2024-09-13 09:14:48 +00:00
Mikhail Artemenko
042194e3f6 enable removeRecursive in CI 2024-09-13 08:50:28 +00:00
Arthur Passos
2c165096cd Merge branch 'master' into multi_auth_methods 2024-09-13 05:18:11 -03:00
李扬
11d2963497
fix style 2024-09-13 11:56:47 +08:00
Michael Kolupaev
e1a206c84d
Merge pull request #64953 from ClickHouse/tomic
Disallow creating refreshable MV on Linux < 3.15
2024-09-13 03:42:28 +00:00
taiyang-li
f9335a2fd5 update uts 2024-09-13 10:50:50 +08:00
taiyang-li
8a89d7b2b9 allow empty inputs for arrayZip or arrayZipUnaligned 2024-09-13 10:46:38 +08:00
Duc Canh Le
59763a937e Merge branch 'master' into parallel_join_limit_threads
Fix CI
2024-09-13 01:47:20 +00:00
Michael Kolupaev
7e99f05981 Merge remote-tracking branch 'origin/master' into tomic 2024-09-12 21:45:09 +00:00
Alexander Gololobov
09f22920d9
Merge pull request #69525 from ClickHouse/backport_mergetask
Backport MergeTask changes from private to minimize merge conflicts
2024-09-12 19:52:10 +00:00
Robert Schulze
aab0d3dd9e
Bump to 7.7.5 2024-09-12 19:42:32 +00:00
Robert Schulze
5a34b9f24e
Bump to 7.6.1 2024-09-12 19:14:41 +00:00
Robert Schulze
a0a4858e00
Scratch build of libpqxx at 7.5.3 + patches 2024-09-12 18:55:35 +00:00
Kruglov Pavel
8610a01745
Merge pull request #69147 from Avogar/fix-s3-cluster-structure
Fix propogating structure argument in s3Cluster
2024-09-12 17:24:26 +00:00
avogar
9c1f4f4545 Remove bad files 2024-09-12 17:21:28 +00:00
Antonio Andelic
f62cb32c5c
Merge pull request #69332 from ClickHouse/issues/68932/remove-recursive
Support removeRecursive natively in keeper
2024-09-12 17:14:34 +00:00
avogar
2e82e06330 Update tests 2024-09-12 16:59:25 +00:00
Kseniia Sumarokova
f50898ae98
Merge pull request #69513 from ClickHouse/s3queue-refactor
S3Queue: small refactoring
2024-09-12 16:56:59 +00:00
Кирилл Гарбар
120e38c72a Merge remote-tracking branch 'kirillgarbar/master' into remove-stale-moving-parts 2024-09-12 19:26:58 +03:00
Yakov Olkhovskiy
d3533742d5
Merge pull request #68236 from marco-vb/marco-vb/x509-san-support-wildcard
Added support for wildcard usage in x509 SubjectAltName identification.
2024-09-12 16:00:35 +00:00
Robert Schulze
4963ab603c
Switch Postgres to 2f7bae2f92, adjust build description, delete libqp
Based on the code state of July 2021 which Kseniia copied over here:
https://github.com/ClickHouse/libpq/pull/5 (found out the hard way)
2024-09-12 15:53:26 +00:00
Nikita Taranov
7b2810bea2 Merge branch 'master' into adaptive_parallel_replicas 2024-09-12 16:51:15 +01:00
Robert Schulze
e2bfce66dd
Add postgres as a submodule 2024-09-12 15:20:10 +00:00
Robert Schulze
0bb3967d14
Remove obsolete target_include_directories (/config does not exist) 2024-09-12 15:20:10 +00:00
avogar
401a3d0931 Add test 2024-09-12 15:10:29 +00:00
1on
51d770fa7a Ability to limit columns for tables in MaterializedPostgreSQL 2024-09-12 18:10:19 +03:00
Nikita Taranov
54f0a8c0e2
Merge pull request #69554 from KevinyhZou/fix_settings_join_to_sort
Fix upgrade check failure for join_to_sort settings
2024-09-12 15:07:17 +00:00
avogar
beffb92411 Keep original order of conditions during move to prewhere 2024-09-12 14:52:09 +00:00
Robert Schulze
877002f689
3% more aesthetic build description 2024-09-12 14:42:17 +00:00
Nikita Taranov
16f93ea1b3 revive separate protocol versioning for PRs 2024-09-12 15:40:51 +01:00
Nikita Taranov
1e3bc6d359 log mark_segment_size on initiator 2024-09-12 15:15:57 +01:00
Robert Schulze
bde54b96f7
Move ENABLE_LIBPQXX in a central place 2024-09-12 14:03:22 +00:00
Robert Schulze
4a9b376e2a
Fix typo 2024-09-12 14:01:26 +00:00
Robert Schulze
c9dd409baa
Merge pull request #69549 from rschu1ze/qc-with-truncated-results
Disallow query cache for queries with non-throw overflow mode
2024-09-12 13:58:38 +00:00
marco-vb
562c23eac6 Add new settings to settings change history. 2024-09-12 13:28:49 +00:00
Mikhail f. Shiryaev
8d5babf65f
Kill the runner process if integration tests fail to pre-pull 2024-09-12 15:26:21 +02:00
Mikhail f. Shiryaev
99ede620be
Add kill_ci_runner to ci_utils, will allow restarts 2024-09-12 15:24:25 +02:00
Robert Schulze
38b5ea9066
Fix docs 2024-09-12 12:43:27 +00:00
kevinyhzou
2225389474 Fix upgrade check failed for join_to_sort settings 2024-09-12 20:10:42 +08:00
Alexander Gololobov
e15b86cd9d
Merge branch 'master' into backport_mergetask 2024-09-12 13:29:59 +02:00
Alexander Gololobov
bbcde19910
Merge pull request #69383 from ClickHouse/tmp_files_lookup
Refactor temporary file usage in MergeTask with QueryPlan
2024-09-12 10:57:15 +00:00
Ilya Yatsishin
98ef5f6e10
Merge pull request #69253 from ClickHouse/restore-replace-to-null-settings-fix
Restore external tables to Null supports no settings
2024-09-12 10:40:54 +00:00
Robert Schulze
fe5e061fff
Some fixups 2024-09-12 10:38:14 +00:00
kssenii
3e3a80e714 Merge remote-tracking branch 'origin/s3queue-refactor' into s3queue-refactor 2024-09-12 12:35:59 +02:00
kssenii
6e94c9f617 Fix 2024-09-12 12:34:56 +02:00
Marco Vilas Boas
185d9401e5
Merge branch 'ClickHouse:master' into marco-vb/x509-san-support-wildcard 2024-09-12 11:08:45 +01:00
Joe Lynch
92351a67e8
Merge branch 'master' into joelynch/disk-encrypted-missing-method 2024-09-12 11:58:41 +02:00
Marco Vilas Boas
f292767778
Merge branch 'master' into marco-vb/setting-stop-insert-on-full-disk 2024-09-12 10:56:32 +01:00
marco-vb
7d36f3b764 Implemented checks for new settings. 2024-09-12 09:53:56 +00:00
marco-vb
21bd47f09e Add settings min_free_disk_bytes_to_throw_insert and min_free_disk_ratio_to_throw_insert and update documentation. 2024-09-12 09:45:43 +00:00
Alexey Katsman
d7f271c658
Merge pull request #69269 from alexkats/external-data-checksum
Use another error code for external data in buffer
2024-09-12 09:38:09 +00:00
Robert Schulze
5fe5cc8611
Disallow query cache for queries with non-throw overflow mode 2024-09-12 09:21:27 +00:00
Mikhail Artemenko
494455e4eb Merge branch 'master' into issues/68932/remove-recursive 2024-09-12 08:51:41 +00:00
Alexander Gololobov
8ea2573a9d Merge branch 'master' of github.com:ClickHouse/ClickHouse into backport_mergetask 2024-09-12 09:31:54 +02:00
Alexander Gololobov
856a66d45f Merge branch 'master' of github.com:ClickHouse/ClickHouse into tmp_files_lookup 2024-09-12 09:26:36 +02:00
flynn
f6b965872f Merge branch 'master' of github.com:ClickHouse/ClickHouse into vector-index-insert 2024-09-12 06:40:33 +00:00
Yakov Olkhovskiy
fd53b39352
bump 2024-09-12 02:33:15 -04:00
Mikhail f. Shiryaev
8a70017815
Merge pull request #69538 from ClickHouse/fix-latest-sync-commit
Get rid of broken `get_commits().reversed`
2024-09-12 05:34:35 +00:00
Yakov Olkhovskiy
c124533ef9
fix 2024-09-12 00:08:53 -04:00
flynn
22c3b71196 Make vector similarity index creation thread pool globally 2024-09-12 03:54:25 +00:00
Yakov Olkhovskiy
98c0f82f28
make it compatible with multiple runs 2024-09-11 20:45:54 -04:00
robot-clickhouse
1da5729f89 Automatic style fix 2024-09-11 21:08:43 +00:00
Nikolay Degterinsky
8e3ba4bd6c
Add test 2024-09-11 22:59:06 +02:00
Igor Nikonov
56b39c37a1
Merge pull request #64448 from ClickHouse/pr-local-plan
Local plan for parallel replicas
2024-09-11 20:44:37 +00:00
Nikolay Degterinsky
b30aabf635
Fix attach of ReplicatedMergeTree tables in Replicated databases 2024-09-11 22:38:54 +02:00
Mikhail f. Shiryaev
370ce5ef63
Get rid of broken get_commits().reversed 2024-09-11 22:37:30 +02:00
Nikita Taranov
fc83c1c7a2 use final task size in segment size calculation 2024-09-11 20:20:18 +01:00
Julia Kartseva
b5289c1f08
Merge pull request #60341 from KevinyhZou/improve_join_insert_from
Improve left/inner join performance by rerange right table by keys
2024-09-11 19:04:41 +00:00
Kseniia Sumarokova
b216e1a74b
Merge branch 'master' into s3queue-refactor 2024-09-11 20:56:11 +02:00
Yatsishin Ilya
ccc6390a9e merge remote-tracking branch 'origin/master' into restore-replace-to-null-settings-fix 2024-09-11 18:23:07 +00:00
Antonio Andelic
de4774be74
Merge pull request #69469 from yariks5s/squashing_mem_usage
Fix high memory consumption on Squashing
2024-09-11 16:52:19 +00:00
robot-clickhouse
c0a42ef877 Automatic style fix 2024-09-11 15:42:12 +00:00
Alex Katsman
9a2a6d71d2 Fix check in test_broken_projections 2024-09-11 15:32:26 +00:00
Kseniia Sumarokova
abe8f29bf8
Update test 2024-09-11 17:32:20 +02:00
Alexander Gololobov
c3416859d5 Merge branch 'master' of github.com:ClickHouse/ClickHouse into tmp_files_lookup 2024-09-11 17:22:08 +02:00
Alex Katsman
22ceaa0066 Use another error code for external data in buffer
Use CANNOT_DECOMPRESS error code for the compressed external data in
CompressedReadBufferBase for checksum validation and decompression.
2024-09-11 14:59:31 +00:00
Alexander Gololobov
f69cb73df0
Merge pull request #69167 from ClickHouse/query_plan_for_merge
Use QueryPlan for merge
2024-09-11 14:41:25 +00:00
Joe Lynch
f378047f30
Properly clean up 2024-09-11 16:02:36 +02:00
Robert Schulze
1ce4d6d8e5
Merge pull request #69511 from rschu1ze/icu-comment
CMake: Add comment about ICU data files
2024-09-11 13:58:18 +00:00
Alexander Gololobov
3aef79b5a2 Backport changes from private to minimize merge conflicts 2024-09-11 15:45:55 +02:00
Salvatore Mesoraca
dca72d2e0b Add tests for SHOW INDEX from tables with dots 2024-09-11 15:39:02 +02:00
Salvatore Mesoraca
146edca4f7 Add tests for SHOW COLUMNS from tables with dots 2024-09-11 15:35:48 +02:00
kssenii
a05610c38f Move creation and validation of table metadata before creating queue metadata & save to factory 2024-09-11 15:32:22 +02:00
Antonio Andelic
9b42af7263
Merge pull request #66648 from ClickHouse/read-cgroup-memory-usage-async-metrics
Simplify some memory tracking parts
2024-09-11 13:24:38 +00:00
Salvatore Mesoraca
3556cf92c3 Allow SHOW INDEXES to work with tables that contain dots in the name 2024-09-11 15:15:31 +02:00
Salvatore Mesoraca
075a85f15c Allow SHOW COLUMNS to work with tables that contain dots in the name 2024-09-11 15:15:08 +02:00
Robert Schulze
9e335abe17
CMake: Add comment about ICU data files 2024-09-11 13:06:17 +00:00
Igor Nikonov
c53e165118
Merge branch 'master' into pr-local-plan 2024-09-11 14:03:35 +02:00
Kseniia Sumarokova
4e0b3f8415
Merge pull request #69432 from ClickHouse/add-documnetation-for-azure-queue
Add azure-queue.md
2024-09-11 12:02:19 +00:00
Yarik Briukhovetskyi
e8cec05d08
shellcheck 2024-09-11 13:52:20 +02:00
Mikhail f. Shiryaev
22f389d415
Merge pull request #69483 from ClickHouse/logs-export-improvement
Another attempt to address EAGAIN "Resource unavailable"
2024-09-11 13:47:38 +02:00
Yarik Briukhovetskyi
2876a4e714
add retries 2024-09-11 13:32:12 +02:00
Kseniia Sumarokova
6f9d1631e2
Update aspell-ignore 2024-09-11 13:11:29 +02:00
Mikhail f. Shiryaev
c1830bc041
Escape the \n in statements 2024-09-11 13:08:58 +02:00
Nikita Taranov
bdddab6a1f
Merge pull request #69449 from ClickHouse/fix_test2
Fix test_disks_app_func
2024-09-11 11:07:18 +00:00
Yarik Briukhovetskyi
af469ffde4
remove sanitizer builds 2024-09-11 12:32:36 +02:00
Mikhail f. Shiryaev
3921f910f5
Another attempt to address EAGAIN "Resource unavailable" 2024-09-11 12:14:16 +02:00
flynn
7425d4aa1a remove blank line 2024-09-11 10:12:42 +00:00
Mikhail Artemenko
55d6672bc4 add early break for test keeper impl 2024-09-11 10:00:40 +00:00
flynn
cf12e3924f Speedup insert data with vector similarity index by add data to index parallel 2024-09-11 09:31:46 +00:00
Yarik Briukhovetskyi
fd3bd785b8
Update 03236_squashing_high_memory.sql 2024-09-11 11:17:06 +02:00
Yarik Briukhovetskyi
ccfb7ad38c
Merge pull request #69455 from yariks5s/group_concat_return_string
`groupConcat` consistency with `arrayStringConcat`
2024-09-11 08:59:48 +00:00
Robert Schulze
7a3d69b626
Merge pull request #69451 from rschu1ze/sqid-crash
Fix crash in `sqidDecode`
2024-09-11 08:56:05 +00:00
Duc Canh Le
085be6bf59 remove unwanted include
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-09-11 06:42:48 +00:00
李扬
0de3b1dacb
Merge branch 'ClickHouse:master' into orc_dict_encode 2024-09-11 12:08:06 +08:00
Yarik Briukhovetskyi
3d36f6dce3
Update 03236_squashing_high_memory.sql 2024-09-10 23:48:32 +02:00
Kseniia Sumarokova
cb1b7dc43c
Merge pull request #69454 from ClickHouse/revert-s3queue-problem
Quick fix for s3queue problem
2024-09-10 21:13:16 +00:00
Alexander Tokmakov
629d27fec8
Merge pull request #69422 from ClickHouse/add_a_setting
Add a setting to disallow DETACH PERMANENTLY in Replicated database
2024-09-10 19:56:10 +00:00
Michael Kolupaev
263cd9e1c3 Fix error message 2024-09-10 19:41:15 +00:00
Michael Kolupaev
5539faa54e Disallow creating refreshable MV on Linux < 3.15 2024-09-10 19:41:15 +00:00
Alexander Gololobov
d4aa06524b Add materialization when building indices in vertical merge 2024-09-10 20:57:55 +02:00
Alexander Gololobov
2f15fcd23f Test with sparse serialization, vertical merge and skip indices 2024-09-10 20:57:03 +02:00
Yarik Briukhovetskyi
63aebfa5d7
Update 03236_squashing_high_memory.sql 2024-09-10 20:15:36 +02:00
Yarik Briukhovetskyi
9b517a939f
Update 03236_squashing_high_memory.sql 2024-09-10 19:53:16 +02:00
Mikhail Artemenko
3e3d652320 refactor tests 2024-09-10 17:52:41 +00:00
Mikhail Artemenko
00fe1d12ee add acl test for rmr 2024-09-10 17:45:39 +00:00
Mikhail Artemenko
3730582d06 add full tree acl check 2024-09-10 17:43:35 +00:00
Antonio Andelic
df1821a579
Update tests/queries/0_stateless/03236_squashing_high_memory.sql 2024-09-10 19:32:28 +02:00
Igor Nikonov
c3dfdd41d3 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-09-10 17:24:44 +00:00
Mikhail f. Shiryaev
d093dd2c71
Merge pull request #69416 from ClickHouse/logs-export-improvement
Hide exported logs statements in GH logs
2024-09-10 19:19:47 +02:00
Nikita Taranov
8534aa07fc
Merge pull request #69400 from ClickHouse/support_more_oss_endpoints
Support more oss endpoints
2024-09-10 17:01:02 +00:00
Nikita Taranov
8fa31c0750
Merge pull request #69385 from ClickHouse/fix
Fix type mismatch
2024-09-10 16:52:57 +00:00
Alexander Tokmakov
b3a5101f34
Merge pull request #69430 from ClickHouse/tavplubix-patch-10
Update 03232_pr_not_ready_set.sql
2024-09-10 16:43:22 +00:00
Alexander Gololobov
bb82465a5f Merge branch 'master' of github.com:ClickHouse/ClickHouse into query_plan_for_merge 2024-09-10 18:27:59 +02:00
Yarik Briukhovetskyi
caab4dd8b9
fix 2024-09-10 18:20:48 +02:00
Nikita Taranov
8d5d7dd83a fix wording 2024-09-10 17:18:27 +01:00
Kseniia Sumarokova
6a6d26aeed
Update StorageObjectStorageQueue.cpp 2024-09-10 18:16:27 +02:00
Kseniia Sumarokova
b7e863b0e9
Update docs/en/engines/table-engines/integrations/azure-queue.md
Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
2024-09-10 18:13:04 +02:00
Kseniia Sumarokova
dcd1874520
Update docs/en/engines/table-engines/integrations/azure-queue.md
Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
2024-09-10 18:12:56 +02:00
Mikhail f. Shiryaev
7727b30f5c
Attempt to fix EAGAIN error 2024-09-10 18:06:32 +02:00
Joe Lynch
35df5ff28e
Add test for SYSTEM UNFREEZE with zero_copy 2024-09-10 17:52:02 +02:00
Mikhail Artemenko
8b7a5616a2 update test 2024-09-10 15:51:31 +00:00
Alexander Gololobov
e4761d40ba
Merge pull request #69429 from ClickHouse/materialize_sparse
Make `materialize()` function return full column when parameter is a sparse column
2024-09-10 15:49:29 +00:00
Robert Schulze
080193cfc3
14% more aesthetic code 2024-09-10 15:46:21 +00:00
Yarik Briukhovetskyi
f588e3c31b
rename tests 2024-09-10 17:43:50 +02:00
Yarik Briukhovetskyi
d8e670297b
groupConcat consistency 2024-09-10 17:42:27 +02:00
kssenii
d43264c44e Quick fix for s3queue problem 2024-09-10 17:41:52 +02:00
Robert Schulze
04dcf73e8f
Fix crash in sqidDecode 2024-09-10 15:35:59 +00:00
Kruglov Pavel
d226b13fd4
Merge pull request #69272 from Avogar/json-memory-usage
Reduce memory usage of inserts to JSON by using adaptive write buffer size
2024-09-10 15:23:18 +00:00
Nikita Taranov
acbeaa6d33 fix 2024-09-10 16:14:53 +01:00
Mikhail Artemenko
1aacb48bcf fix collector 2024-09-10 14:34:27 +00:00
Pablo Marcos
a34a544f4a
Merge pull request #67938 from mwoenker/incomplete-utf8-sequence
Handle incomplete sequences at end of input
2024-09-10 14:04:58 +00:00
Michael Stetsyuk
be55e1d2e1 better 2024-09-10 13:52:40 +00:00
kssenii
6719112b02 Add azure-queue.md 2024-09-10 15:10:53 +02:00
Alexander Tokmakov
30cf6ee711
Update 03232_pr_not_ready_set.sql 2024-09-10 14:30:07 +02:00
Mikhail Artemenko
0bd7ef39c4 unify processWatches 2024-09-10 12:27:34 +00:00
Mikhail Artemenko
0453d5e91a small fixes 2024-09-10 12:26:03 +00:00
Alexander Gololobov
a01229bba2 Convert sparse columns to full in materialize() 2024-09-10 14:23:31 +02:00
Alexander Gololobov
41aaf07537 Test materialize() on sparse columns 2024-09-10 14:23:19 +02:00
Nikita Taranov
5ef98cd275
Merge pull request #69413 from ClickHouse/fix_test
Fix 01603_read_with_backoff_bug
2024-09-10 12:20:12 +00:00
Antonio Andelic
bdf8c859b1 Merge branch 'master' into read-cgroup-memory-usage-async-metrics 2024-09-10 14:13:48 +02:00
Alexander Tokmakov
89dd3188bb add a setting to disallow DETACH PERMANENTLY in Replicated 2024-09-10 13:35:18 +02:00
Nikita Fomichev
24d81fe00b
Merge pull request #69394 from ClickHouse/rows-before-aggregation-compatibility
Fix 24.8 setting compatibility `rows_before_aggregation`
2024-09-10 11:33:33 +00:00
Robert Schulze
4d0941072f
Merge pull request #69367 from rschu1ze/bump-libarchive
Bump libarchive to v3.7.4
2024-09-10 11:09:37 +00:00
Nikita Taranov
61ebcdc2ed fix 2024-09-10 12:07:44 +01:00
Igor Nikonov
b0c4f6b9e7 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-09-10 11:06:10 +00:00
Nikita Taranov
1df897db27 Merge branch 'master' into adaptive_parallel_replicas 2024-09-10 12:03:46 +01:00
Mikhail f. Shiryaev
6e6e705486
Add a hostname to log; we need something to grep remote query_log 2024-09-10 12:56:19 +02:00
Sergei Trifonov
db42cf12fd
Merge pull request #68933 from Blargian/docs_toRelativeXYZ
[Docs] update `toReference*Num` docs
2024-09-10 10:48:24 +00:00
Mikhail f. Shiryaev
8b1f21e7dd
Hide exported logs statements in GH logs 2024-09-10 12:22:19 +02:00
Pablo Marcos
ac3cfef8c1
Merge pull request #69390 from pamarcos/fix-invalid-connection-logical-error
Fix undefined behavior if all connection tries fail
2024-09-10 09:45:37 +00:00
Nikita Taranov
49ea016a3d impl 2024-09-10 10:19:23 +01:00
Daniil Ivanik
25a5768adc
Merge pull request #68952 from Blargian/docs_toDateTime64XYZ
[Docs] update docs for `DateTime64OrZero/Null/Default` functions
2024-09-10 09:15:34 +00:00
Daniil Ivanik
8263815451
Merge pull request #69007 from jww0924/patch-1
[Docs] Add CKibana as third-party GUI
2024-09-10 09:14:37 +00:00
alesapin
41798be63f
Merge pull request #69339 from ClickHouse/cp-mv-docs
Docs: Add cp/mv to keeper client docs
2024-09-10 09:10:32 +00:00
kevinyhzou
597181c45e review 2024-09-10 16:32:52 +08:00
Duc Canh Le
d089a56272 only set max_free_threads_ = 0 when creating pool
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-09-10 05:51:48 +00:00
Duc Canh Le
11478b949f limit threadpool size in concurrent hash join
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-09-10 03:12:44 +00:00
Robert Schulze
6464d47d34
Bump to v3.7.4 2024-09-09 20:33:20 +00:00
Robert Schulze
e252bdc30d
Bump to v3.7.3 2024-09-09 20:27:10 +00:00
Igor Nikonov
bb063babff
Merge branch 'master' into pr-local-plan 2024-09-09 21:17:51 +02:00
Nikita Taranov
47589d4898 impl 2024-09-09 19:53:58 +01:00
Alexander Tokmakov
9ab3ee1b13
Merge pull request #66104 from ClickHouse/break_compatibility
Don't allow explicit UUIDs and ReplicatedMergeTree arguments in Replicated databases
2024-09-09 18:29:16 +00:00
Robert Schulze
2b2cd8e3e0
Merge pull request #69377 from JackyWoo/rename_statistics_count_min
Rename `count_min` statistics to `countmin`
2024-09-09 18:25:11 +00:00
Alexander Tokmakov
7fe8775361
Merge pull request #69306 from ClickHouse/tavplubix-patch-14
Update StackTrace.cpp
2024-09-09 17:55:07 +00:00
Alexander Gololobov
38b8edae97 Fix the case with empty temp file 2024-09-09 19:34:59 +02:00
Nikita Taranov
8cdc10cf65 fix settings changes 2024-09-09 18:11:03 +01:00
Kseniia Sumarokova
ef94d3422c
Merge pull request #69305 from ClickHouse/fix-segfault-deltalake
Add checks against segfault in DeltaLakeMetadata
2024-09-09 16:23:29 +00:00
Kruglov Pavel
804012b2e4
Merge pull request #69311 from Avogar/dynamic-primary-key
Mark Dynamic type as not safe primary key type to avoid issues with Fields
2024-09-09 15:33:48 +00:00
Alexander Tokmakov
936c63fd33
Merge pull request #69393 from ClickHouse/revert-69344-remove-multiquery-arg
Revert "Remove obsolete `--multiquery` parameter (follow-up to #63898), pt. V"
2024-09-09 15:33:09 +00:00
Alexander Tokmakov
d2ee805d8f
Revert "Remove obsolete --multiquery parameter (follow-up to #63898), pt. V" 2024-09-09 17:32:22 +02:00
avogar
72dbc8205b Fix unit tests 2024-09-09 15:12:17 +00:00
Robert Schulze
0a9faf05aa
Merge pull request #69361 from rschu1ze/remove-multiquery-arg-2
Remove obsolete `--multiquery` parameter (follow-up to #63898), pt. VI
2024-09-09 14:51:58 +00:00
Robert Schulze
40e887d218
Merge pull request #69344 from rschu1ze/remove-multiquery-arg
Remove obsolete `--multiquery` parameter (follow-up to #63898), pt. V
2024-09-09 14:51:50 +00:00
Robert Schulze
965977500b
Merge pull request #69240 from rschu1ze/update-icu-cmake
CMake: Update ICU build description
2024-09-09 14:40:13 +00:00
Pablo Marcos
f7dee10030 Make a more assertive exception text 2024-09-09 14:38:06 +00:00
Robert Schulze
d749869f00
Merge pull request #67707 from bigo-sg/opt_array_map
Optimize function `array()` and `map()`
2024-09-09 14:37:50 +00:00
Alexander Gololobov
4da1e10ac6 Move sorting key calculation step outside the loop 2024-09-09 16:01:00 +02:00
Pablo Marcos
67b57eb89f Fix undefined behavior if all connection tries fail
For some reason, getManyCheckedForInsert was calling getManyImpl with
skip_unavailable_endpoints=nullptr, which resulted in getManyImpl using
the `skip_unavailable_shards` settings. Since this is true by default,
min_entries was set to 0.

Having min_entries set to 0 while using PoolMode::GET_ONE was strange,
to say the least. There was an edge case where if all connection
attempts failed and min_entries was 0, it was returning an empty vector.
That was not considered to be possible by the caller and it was getting
the front entry of an empty vector, causing undefined behavior.

Conclusion: set `skip_unavailable_endpoints=false` explicitly in
getManyCheckedForInsert so that min_entries=1. In case all connections
fail, an exception will be thrown. Also, add some defensive programming
to ensure we never ever try to get the front element of an empty vector.
2024-09-09 14:00:35 +00:00
Pablo Marcos
e6e79c3c4a Fix minor typos 2024-09-09 13:35:45 +00:00
Alexander Gololobov
8c1f434b1a Do column materialization using ActionsDAG::addMaterializingOutputActions instead of a special step 2024-09-09 15:31:43 +02:00
Alexander Gololobov
1bcc4ba823 Renamed ApplyMergeStep into MergePartsStep 2024-09-09 15:30:19 +02:00
Nikita Fomichev
66572aa029 Fix 24.8 setting compatibility rows_before_aggregation
https://github.com/ClickHouse/ClickHouse/pull/66084
2024-09-09 15:25:14 +02:00
imddba
942d0fab4a
spelling fixes 2024-09-09 20:24:16 +08:00
Nikita Taranov
43d057ed0f impl 2024-09-09 13:04:45 +01:00
Alexander Gololobov
5a8bd5b4f5 Encapsulte and cleanup "rows_sources" temp file usage 2024-09-09 13:22:38 +02:00
Alexander Gololobov
7d042be8eb A simple interface to find temporary files by their logical names when building pipeline from query plan 2024-09-09 13:21:00 +02:00
Robert Schulze
c4720d9728
Minor doc fixups 2024-09-09 11:18:42 +00:00
Igor Nikonov
eda6dabe41 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-09-09 09:58:36 +00:00
Mikhail Artemenko
08368d1d65 update keeper client docs 2024-09-09 09:46:17 +00:00
Mikhail Artemenko
6309f36232 add limit option to rmr command 2024-09-09 09:44:19 +00:00
JackyWoo
6539cbd1ce Add CountMin to dictionary file and a little fixup 2024-09-09 17:34:15 +08:00
Mikhail Artemenko
2fe6991124 Merge branch 'master' into issues/68932/remove-recursive 2024-09-09 08:55:53 +00:00
JackyWoo
077b8239f5 Rename in tests 2024-09-09 11:52:58 +08:00
JackyWoo
eb800d9e39 Rename statistics of type count_min to countmin 2024-09-09 11:45:39 +08:00
taiyang-li
774ec08faf fix style 2024-09-09 11:37:27 +08:00
taiyang-li
d04997bc98 Merge branch 'opt_array_map' of https://github.com/bigo-sg/ClickHouse into opt_array_map 2024-09-09 11:36:28 +08:00
taiyang-li
f1c43472d8 change as request 2024-09-09 11:35:54 +08:00
Robert Schulze
2bbede2d93
Remove superfluous --multiquery/-n 2024-09-08 13:09:44 +00:00
Robert Schulze
483dd7eebe
Bump to v3.7.2 2024-09-08 08:55:59 +00:00
Robert Schulze
33866fb5bd
Fix config.h for v3.7.1 2024-09-08 08:38:05 +00:00
Antonio Andelic
65019c4b9b Merge branch 'master' into keeper-some-improvement2 2024-09-07 20:59:04 +02:00
Robert Schulze
5362b117bf
Remove superfluous --multiquery/-n 2024-09-07 16:20:46 +00:00
Antonio Andelic
190339c4e6 Fix snapshot sync 2024-09-07 17:34:59 +02:00
Antonio Andelic
5a86371b02 Merge branch 'master' into keeper-some-improvement2 2024-09-07 11:32:44 +02:00
Igor Nikonov
f5d49f8e10
Merge branch 'master' into adaptive_parallel_replicas 2024-09-06 23:08:30 +02:00
Igor Nikonov
42d3cd2b91 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-09-06 20:10:50 +00:00
Igor Nikonov
ebd9c294aa Fix build 2024-09-06 20:09:48 +00:00
Igor Nikonov
b436057cba Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-09-06 18:46:42 +00:00
Yarik Briukhovetskyi
a903e1a726
remove logging + fixing bug 2024-09-06 20:24:18 +02:00
Mikhail Artemenko
3431e2ec4a add dest to aspell ignore 2024-09-06 16:52:31 +00:00
Mikhail Artemenko
9d07d002f1 update keeper client docs 2024-09-06 16:20:30 +00:00
Nikolai Kochetov
ee304c7fc3 Fix tidy 2024-09-06 16:02:47 +00:00
Kseniia Sumarokova
0c18c38cac
Merge branch 'master' into fix-segfault-deltalake 2024-09-06 16:57:32 +02:00
Antonio Andelic
03c7f3817b Correct lock order 2024-09-06 15:41:04 +02:00
Mikhail Artemenko
81972b97e7 support test keeper 2024-09-06 13:23:57 +00:00
Mikhail Artemenko
068ada57ba update api 2024-09-06 12:23:57 +00:00
Alexander Tokmakov
238c9b5789
Update 01153_attach_mv_uuid.sql 2024-09-06 13:51:06 +02:00
Nikolai Kochetov
fdbf8e71ab Stable explain 2024-09-06 10:30:09 +00:00
Alexander Tokmakov
e2a7a1f662
Update StackTrace.cpp 2024-09-06 12:08:14 +02:00
Mikhail Artemenko
cf0e0b766d add test for watches 2024-09-06 09:34:26 +00:00
Mikhail Artemenko
2bbe933531 fix watches logic 2024-09-06 09:33:47 +00:00
Mikhail Artemenko
231a7c97cc move code 2024-09-06 08:34:59 +00:00
Antonio Andelic
f44eaa808d Merge branch 'master' into keeper-some-improvement2 2024-09-06 09:35:56 +02:00
Antonio Andelic
e388f6f99b Remove useless log 2024-09-06 09:35:02 +02:00
kevinyhzou
02e129f0d1 modify test 2024-09-06 10:15:43 +08:00
kevinyhzou
f8b6025e07 rename to allow_experimental_join_right_table_sorting and modify comments 2024-09-06 09:43:32 +08:00
Mikhail Artemenko
aa2721f7e4 update tests 2024-09-06 00:09:46 +00:00
Mikhail Artemenko
cb1c11c74a change traverse 2024-09-06 00:08:08 +00:00
avogar
ff86b1872f Remove extra files 2024-09-05 23:38:31 +00:00
avogar
f22876302e Mark Dynamic type as not safe primary key type to avoid issues with Fields 2024-09-05 23:37:29 +00:00
Alexander Gololobov
2df5edc1c1 Merge branch 'master' of github.com:ClickHouse/ClickHouse into query_plan_for_merge 2024-09-05 20:58:47 +02:00
Alexander Tokmakov
c6f0e29eca
Update StackTrace.cpp 2024-09-05 18:36:13 +02:00
kssenii
364ad4315b Add checks agains segfault in DeltaLakeMetadata 2024-09-05 18:20:46 +02:00
Mikhail Artemenko
c3cc2a3fb1 intro new request type 2024-09-05 16:14:50 +00:00
Miсhael Stetsyuk
c9aedee24f
Merge branch 'master' into fix-metadata-version-in-zookeeper 2024-09-05 16:52:56 +01:00
Michael Stetsyuk
32cfdc98b2 fix metadata_version in keeper 2024-09-05 15:51:37 +00:00
Kseniia Sumarokova
92507d9938
Update nats.md 2024-09-05 17:10:12 +02:00
Kseniia Sumarokova
6170c15c90
Merge branch 'master' into minor 2024-09-05 17:08:30 +02:00
Nikolai Kochetov
d23145fd19
Update emptyArrayToSingle.h 2024-09-05 16:59:14 +02:00
Alexey Olshanskiy
d17b20705a
Add char escaping to docker's entrypoint 2024-09-05 17:55:56 +03:00
Nikolai Kochetov
fb8999a885 Remove commented code. 2024-09-05 14:44:51 +00:00
Nikolai Kochetov
03ac70f988 Fising build. 2024-09-05 14:41:06 +00:00
Nikolai Kochetov
5f5acd3c44 Refactor ArrayJoin step. 2024-09-05 14:34:30 +00:00
Igor Nikonov
536e0808e3
Merge branch 'master' into pr-local-plan 2024-09-05 16:19:47 +02:00
Alexander Tokmakov
df3c5c9791
Update 00609_mv_index_in_in.sql 2024-09-05 15:51:03 +02:00
Alexander Gololobov
20eaecc4f3
Fix build 2024-09-05 13:50:26 +02:00
Alexander Gololobov
e1b2952a60
Merge branch 'master' into query_plan_for_merge 2024-09-05 13:32:12 +02:00
Mikhail Artemenko
6455e1dfa1 add ephemerals check 2024-09-05 11:14:43 +00:00
Mikhail Artemenko
ae512fe533 add test for single delete 2024-09-05 11:05:23 +00:00
Mikhail Artemenko
5180e58dca fix collector 2024-09-05 11:01:37 +00:00
avogar
b4ef10ad1c Make better 2024-09-05 08:52:22 +00:00
kevinyhzou
d14e03abad fix tests incompatible and add new test example 2024-09-05 09:54:27 +08:00
Mikhail Artemenko
c6777af485 add remove recursive support 2024-09-04 22:59:18 +00:00
Yatsishin Ilya
ef2dd93418 crazy stuff 2024-09-04 19:43:39 +00:00
Alexander Tokmakov
6eef6a7759 fix 2024-09-04 21:43:36 +02:00
avogar
b7b88737ad Treat dynamic/object structure streams as dynamic 2024-09-04 18:37:33 +00:00
avogar
0dad8b088a Fix typo 2024-09-04 18:35:10 +00:00
avogar
68a8b5a3a1 Better 2024-09-04 18:22:20 +00:00
avogar
4b322ee3c5 Reduce memory usage of inserts to JSON by using adaptive write buffer size 2024-09-04 17:12:17 +00:00
Alexander Tokmakov
35ab639d1a fix 2024-09-04 18:38:32 +02:00
Yarik Briukhovetskyi
2fa6be55ff
tests fix 2024-09-04 17:02:01 +02:00
Antonio Andelic
a3e233a537 Fix watch 2024-09-04 15:19:56 +02:00
Yarik Briukhovetskyi
8896d1b78b
try to fix tests 2024-09-04 14:46:29 +02:00
Yatsishin Ilya
dff153b59e Null supports no settings 2024-09-04 11:48:22 +00:00
avogar
f926a0fff7 Fix tidy build 2024-09-04 11:25:22 +00:00
Igor Nikonov
3898f52868 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-09-04 11:15:54 +00:00
Mikhail Artemenko
6c57adee7c add remove recursive entry point 2024-09-04 10:38:03 +00:00
Robert Schulze
6f03c51368
Update 2024-09-04 09:40:45 +00:00
Robert Schulze
1c6e960719
Sort 2024-09-04 09:35:06 +00:00
Robert Schulze
e047c7c419
Update sources 2024-09-04 09:33:26 +00:00
Robert Schulze
e28066645b
Sort 2024-09-04 09:31:06 +00:00
Antonio Andelic
955412888c Merge branch 'master' into keeper-some-improvement2 2024-09-04 11:30:29 +02:00
Antonio Andelic
9633563fbd Fix 2024-09-04 11:30:05 +02:00
kevinyhzou
49548ed4d5 update the description 2024-09-04 16:40:46 +08:00
kevinyhzou
dbf6e6c85e review fix 2024-09-04 16:05:13 +08:00
Alexander Tokmakov
a5a16aa7fa Merge branch 'master' into break_compatibility 2024-09-03 23:13:59 +02:00
Igor Nikonov
fc1228e3a4 Update settings history 2024-09-03 20:45:43 +00:00
Igor Nikonov
8629f7e592
Merge branch 'master' into pr-local-plan 2024-09-03 22:43:20 +02:00
Arthur Passos
d9a4964cd9 Merge branch 'master' into multi_auth_methods 2024-09-03 15:01:59 -03:00
NikBarykin
83854cf293 Make method of DatabaseFactory 2024-09-03 19:13:05 +03:00
NikBarykin
e874c6e1de Fix typo 2024-09-03 18:58:39 +03:00
Alexander Gololobov
472e6eb856 typo 2024-09-03 17:16:43 +02:00
Alexander Gololobov
8361724539 Build pipeline for next column for prefetching 2024-09-03 17:02:25 +02:00
Yarik Briukhovetskyi
f688b903db
empty commit 2024-09-03 15:58:22 +02:00
Yarik Briukhovetskyi
21f9669836
empty commit 2024-09-03 15:41:43 +02:00
Yarik Briukhovetskyi
1a386ae4d5
Merge branch 'ClickHouse:master' into hive_partitioning_filtration 2024-09-03 15:35:31 +02:00
Yarik Briukhovetskyi
24f4e87f8b
revert debugging in tests 2024-09-03 15:20:22 +02:00
NikBarykin
03ccf05d14 Allow custom settings in database engine 2024-09-03 16:14:15 +03:00
Alexander Gololobov
a1cec53b7c Fix updateOutputStream and Traits 2024-09-03 14:57:33 +02:00
Alexander Gololobov
6a6935cb84 Cleanup 2024-09-03 14:57:19 +02:00
marco-vb
d6ea08e812 Fixed documentation related to wildcard support. 2024-09-03 12:47:20 +00:00
Igor Nikonov
d0d2509c69
Merge branch 'master' into pr-local-plan 2024-09-03 13:31:36 +02:00
Kruglov Pavel
cec5037c4d
Update Configuration.h 2024-09-03 12:05:26 +02:00
marco-vb
919f51533a Fixed style issues. 2024-09-03 09:37:03 +00:00
Alexander Gololobov
d28cba981c Fix clang_tidy 2024-09-03 08:59:01 +02:00
Alexander Gololobov
48cacd6f31 Use query plan for column vertical merges 2024-09-02 22:36:42 +02:00
Alexander Gololobov
13f4eb3fac Fix for graphite merge mode 2024-09-02 22:24:53 +02:00
avogar
b7e1dda2e0 Remove unneded code 2024-09-02 20:13:44 +00:00
avogar
d281333db2 Better process of object storage arguments 2024-09-02 20:11:00 +00:00
marco-vb
547276780c Removed unnecessary code and restored test certificates. 2024-09-02 17:14:10 +00:00
Alexander Gololobov
7e444136bb Use QueryPlan for horizontal part of merge 2024-09-02 18:27:24 +02:00
Igor Nikonov
db8ce31bb7 Increase flaky check timeout 2024-09-02 14:08:22 +00:00
Igor Nikonov
d064692125 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-09-02 14:06:46 +00:00
vdimir
cfc931160d
Merge branch 'master' into vdimir/fix_function_printf_style 2024-09-02 16:05:02 +02:00
Antonio Andelic
79fc8d67ad More fixes 2024-09-02 15:46:04 +02:00
Arthur Passos
0bf95655aa add new line 2024-09-02 10:45:37 -03:00
Arthur Passos
15a67f10dc add cleanup code to existing tests so flaky tests pass.. 2024-09-02 09:59:28 -03:00
Kruglov Pavel
0cb8c9f148
Fix typo 2024-09-02 14:58:09 +02:00
avogar
d7aaf053f9 Fix propogating structure argument in s3Cluster 2024-09-02 12:50:12 +00:00
Igor Nikonov
1d1f41521e
Merge branch 'master' into pr-local-plan 2024-09-02 11:07:07 +02:00
Antonio Andelic
596ba574e3 Merge branch 'master' into keeper-some-improvement2 2024-09-02 09:31:02 +02:00
Antonio Andelic
e968984d17 More changes 2024-09-02 08:25:17 +02:00
Igor Nikonov
bfa27d6650 Fix 02500_remove_redundant_distinct 2024-08-31 06:11:50 +00:00
Igor Nikonov
81b8f8594c Fix tests 2024-08-30 21:23:07 +00:00
Igor Nikonov
5b4b08b711 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-30 20:06:03 +00:00
Igor Nikonov
3c29f27dd2 Fix 03228_pr_subquery_view_order_by 2024-08-30 20:04:43 +00:00
Arthur Passos
a22f9fd91f Merge branch 'master' into multi_auth_methods 2024-08-30 16:59:40 -03:00
Arthur Passos
7c766e7458 split tests again and randomize user name to be able to parallel 2024-08-30 11:41:44 -03:00
Yarik Briukhovetskyi
620640a042
just to test 2024-08-30 12:58:21 +02:00
Yarik Briukhovetskyi
ec469a117d
testing 2024-08-30 00:56:35 +02:00
Кирилл Гарбар
b2c4b771d8 Minor fixes 2024-08-29 19:33:04 +03:00
Yarik Briukhovetskyi
7a879980d8
try to fix tests 2024-08-29 18:25:11 +02:00
Arthur Passos
f9b845486a Merge branch 'master' into multi_auth_methods 2024-08-29 13:12:19 -03:00
Кирилл Гарбар
edf4e09fb2 Remove stale moving parts without zookeeper 2024-08-29 18:46:06 +03:00
Yarik Briukhovetskyi
2adc61c215
add flush logs 2024-08-29 16:39:22 +02:00
Arthur Passos
7000f214ab add head -n 1 to make sure only on occurrence of error code is grepped 2024-08-29 09:47:18 -03:00
Yarik Briukhovetskyi
afc4d08aad
add no-fasttest tag 2024-08-29 13:31:05 +02:00
李扬
3d04f3d33a
Merge branch 'ClickHouse:master' into orc_dict_encode 2024-08-29 10:16:06 +08:00
yariks5s
edc5d8dd92 fix path 2024-08-28 23:15:01 +00:00
yariks5s
d6b2a9d534 CLICKHOUSE_LOCAL -> CLIENT 2024-08-28 22:32:44 +00:00
Arthur Passos
cb6d142947 remove non clustered tests to make it faster :D 2024-08-28 18:09:30 -03:00
Arthur Passos
a690539935 fix test 2024-08-28 18:03:27 -03:00
yariks5s
dc97bd6b92 review + testing the code 2024-08-28 17:22:47 +00:00
Arthur Passos
b2795f06dc add extra line 2024-08-28 14:02:09 -03:00
Arthur Passos
7879915493 merge test fils now that they are faster 2024-08-28 14:01:24 -03:00
Arthur Passos
313b6b533f further optimize test by using http client instead of clickhouse-client 2024-08-28 13:54:31 -03:00
Arthur Passos
9f7f6c6f93 use curl client for create/drop/alter queries to make test run faster 2024-08-28 12:54:22 -03:00
李扬
553c309477
Merge branch 'master' into orc_dict_encode 2024-08-28 21:00:18 +08:00
taiyang-li
ae582120ae change as request 2024-08-28 20:56:33 +08:00
Arthur Passos
b29e00b838 add space 2024-08-28 09:17:04 -03:00
Arthur Passos
ae8d90f6b8 no replicated database 2024-08-28 09:05:25 -03:00
imddba
ad08db39e5
Add CKibana as third-party GUI 2024-08-28 20:05:06 +08:00
Kruglov Pavel
2c0ddd10a0
Fix build 2024-08-28 13:49:48 +02:00
Arthur Passos
41a4a97ca3 no parallel 2024-08-27 19:57:59 -03:00
Arthur Passos
50b3d3172c add no fast test 2024-08-27 16:48:10 -03:00
Arthur Passos
c298b20ba9 extract some tests into sql as an attempt to make them run faster for flaky check.. 2024-08-27 16:17:35 -03:00
Arthur Passos
0b29aef1a0 remove extra dot from ex message 2024-08-27 15:25:41 -03:00
Yarik Briukhovetskyi
60c6eb2610
trying to fix the test 2024-08-27 19:42:47 +02:00
Yarik Briukhovetskyi
9133505952
fix the test 2024-08-27 19:16:05 +02:00
Yarik Briukhovetskyi
2741bf00e4 chmod +x 2024-08-27 16:53:14 +00:00
Yarik Briukhovetskyi
4eca00a666
fix style 2024-08-27 18:10:41 +02:00
Arthur Passos
a0ab22e031 style 2024-08-27 13:01:10 -03:00
Arthur Passos
6f806124a3 Merge branch 'master' into multi_auth_methods 2024-08-27 12:24:53 -03:00
Arthur Passos
a65d175a81 change parsing logic a bit 2024-08-27 12:23:42 -03:00
Yarik Briukhovetskyi
c6804122cb
fix shell 2024-08-27 16:52:29 +02:00
Yarik Briukhovetskyi
189cbe25fe
init 2024-08-27 16:28:18 +02:00
Blargian
6febfc78b3 updates docs for DateTime64OrZero/Null/Default 2024-08-27 14:52:46 +02:00
Blargian
29664d12fc update example of toTime 2024-08-27 12:44:28 +02:00
Blargian
c1c4cabe9f Update toReference*Num function documentation 2024-08-27 12:41:02 +02:00
taiyang-li
aa4688a982 fix style 2024-08-27 12:25:22 +08:00
Kruglov Pavel
bf4b53390b
Merge branch 'master' into input_format_json_empty_as_default 2024-08-26 13:40:48 +02:00
taiyang-li
7aaa0289e1 revert files 2024-08-26 14:58:57 +08:00
taiyang-li
d6df83d561 add uts about orc string encode 2024-08-26 14:57:51 +08:00
taiyang-li
1011f8ef9c add uts about orc string encode 2024-08-26 14:45:41 +08:00
Igor Nikonov
d12aac7d12 Test 03228_pr_subquery_view_order_by
PR + subquery with view and order by
2024-08-23 20:11:33 +00:00
Igor Nikonov
17c1e82bc0 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-23 18:27:19 +00:00
Arthur Passos
cb7ef910e2
Update 03174_multiple_authentication_methods.sh 2024-08-23 13:50:38 -03:00
joelynch
1c6976d7a5
Fix zero copy bug with encrypted disk and UNFREEZE
When running UNFREEZE with encrypted disk, zookeeper
metadata would be erroneously removed here
src/Storages/StorageReplicatedMergeTree.cpp#L10418.
2024-08-23 17:04:39 +02:00
Arthur Passos
43e9a7ba4b Merge branch 'master' into multi_auth_methods 2024-08-22 10:57:23 -03:00
Arthur Passos
62ce2999ae minor grammar 2024-08-22 10:00:20 -03:00
Arthur Passos
91cceccb4b add setting docs 2024-08-22 09:48:53 -03:00
Arthur Passos
13d5b029a4 make max_number_of_authentication_methods=0 unlimited 2024-08-22 09:41:10 -03:00
vdimir
07f44fdb89
Merge branch 'master' into vdimir/fix_function_printf_style 2024-08-22 11:23:50 +02:00
flynn
ca40da5c03 Proper ErrorCodes 2024-08-22 09:03:02 +00:00
taiyang-li
b0a0988c5b change as request 2024-08-22 10:46:44 +08:00
Arthur Passos
d7d40db036 make sure all alters except id related are allowed even if state of user is invalid afterwards 2024-08-21 19:07:54 -03:00
Kruglov Pavel
34d02304d3
Merge branch 'master' into input_format_json_empty_as_default 2024-08-21 14:50:36 +02:00
Arthur Passos
4fd19c3ad9 do not allow reset auth to new to be used along with add identified clauses 2024-08-20 17:16:12 -03:00
Arthur Passos
f0223aedde add on cluster tests 2024-08-20 16:28:12 -03:00
Arthur Passos
1980959c8b exception message 2024-08-20 14:27:53 -03:00
Arthur Passos
27ee4dd611 throw syntax error instead of bad arguments in case of add not identified 2024-08-20 14:17:05 -03:00
kevinyhzou
add486b62a rebase and reslove conflict 2024-08-20 17:33:08 +08:00
vdimir
2fcbe2465a
Fix style in Functions/printf.cpp 2024-08-20 09:07:15 +00:00
Sergey (Finn) Gnezdilov
21e64f2aa9
Update nats.md
"kafka_handle_error_mode" fixed on "nats_handle_error_mode"
2024-08-20 11:33:13 +03:00
kevinyhzou
cfa4ca6fb1 remove useless code 2024-08-20 15:56:34 +08:00
kevinyhzou
b8e967ff9c add allowReadCaseInsentitive func 2024-08-20 15:56:34 +08:00
kevinyhzou
29c94195e1 add setting tests/performance/all_join_opt.xml 2024-08-20 15:56:34 +08:00
kevinyhzou
37c3f4a870 add threshold for table rows 2024-08-20 15:55:06 +08:00
taiyang-li
03ab625265 enable string dict encoding in orc output format 2024-08-20 15:47:26 +08:00
taiyang-li
dbd4ee44ed enable dict encoding in orc writer 2024-08-20 14:09:14 +08:00
Arthur Passos
623c507e5f fix in the right place.. 2024-08-19 16:42:48 -03:00
Arthur Passos
01f5337f69 fix serialization to fix on cluster commands 2024-08-19 15:13:39 -03:00
Nikita Taranov
d4a3a033b0
Merge branch 'master' into adaptive_parallel_replicas 2024-08-19 12:48:39 +02:00
Alexey Milovidov
165d08f088 Fix bad exception messages 2024-08-19 05:54:37 +02:00
Alexey Milovidov
e0dbc53b58 Merge branch 'master' into miscellaneous-3 2024-08-19 01:18:48 +02:00
Alexey Milovidov
f97551e2ad Fix tests 2024-08-18 22:17:16 +02:00
Nikita Taranov
c252b3c8b0 fix build 2024-08-18 18:29:48 +01:00
Nikita Taranov
30229a3bfd better 2024-08-18 17:44:16 +01:00
Nikita Taranov
8a0f41da7a
Merge branch 'master' into adaptive_parallel_replicas 2024-08-18 17:55:29 +02:00
Nikita Taranov
628a4300ba fix 2024-08-18 16:53:00 +01:00
Alexey Milovidov
f88b5988c1 Update test 2024-08-18 09:44:39 +02:00
Alexey Milovidov
4bb2f7b3f6 Miscellaneous 2024-08-18 09:09:58 +02:00
Alexey Milovidov
95edca513c Fix tests 2024-08-18 05:43:01 +02:00
Alexey Milovidov
5004e4d2cc Miscellaneous 2024-08-18 03:27:42 +02:00
Igor Nikonov
9fe65f750e Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-17 14:44:02 +00:00
Arthur Passos
accade2390 Merge branch 'master' into multi_auth_methods 2024-08-17 10:26:11 -03:00
Nikita Taranov
e7fc89ba26 add bw-compatibility test 2024-08-16 23:23:03 +01:00
Igor Nikonov
6e0a74f74d Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-16 19:35:19 +00:00
Arthur Passos
770804ffdc change default setting value to 100 2024-08-16 08:57:11 -03:00
Igor Nikonov
9dc288faa8 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-16 11:07:35 +00:00
Igor Nikonov
29fffd34ac Fix: check if table expression is present 2024-08-16 11:06:20 +00:00
Igor Nikonov
49fc4cb87b Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-15 20:48:56 +00:00
vdimir
49ce2c7619
Merge branch 'master' into vdimir/datetime64_constant_to_ast_f 2024-08-15 21:41:56 +02:00
Nikita Taranov
80d985a690 add setting change 2024-08-15 19:11:43 +01:00
Nikita Taranov
891f9c5358 fix typo 2024-08-15 18:44:37 +01:00
Nikita Taranov
cb0335446e impl 2024-08-15 18:34:06 +01:00
Arthur Passos
70e7c4e63d fix black with script 2024-08-15 12:21:06 -03:00
Arthur Passos
12e6645058 fix black 2024-08-15 12:19:36 -03:00
Arthur Passos
714a4d871c add integ tests for defa7ult value 2024-08-15 12:18:09 -03:00
Arthur Passos
72f1695014 add integ tests for new setting 2024-08-15 12:03:30 -03:00
Igor Nikonov
5d9f105fe3 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-15 14:34:15 +00:00
Arthur Passos
17c1cef52b add server setting 2024-08-15 10:30:33 -03:00
Igor Nikonov
b4e8c14729 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-15 11:12:56 +00:00
Igor Nikonov
a3978b24d0 Fix for subqueries with FINAL 2024-08-15 11:11:49 +00:00
Arthur Passos
3247f3ad08 make sure reset authentication methods can only be used on alter queries 2024-08-14 12:44:43 -03:00
Arthur Passos
026fa0a7fd fix leading id method without WITH and with type specified being allowed 2024-08-14 12:39:27 -03:00
Alexis Arnaud
29bc7cf5d5 post-review changes 2024-08-14 12:03:29 +02:00
Marco Vilas Boas
0a1f61fcbd
Merge branch 'ClickHouse:master' into marco-vb/x509-san-support-wildcard 2024-08-14 10:15:30 +01:00
Igor Nikonov
1a8f45464c Fix min_marks_to_read overflow 2024-08-13 21:05:29 +00:00
Igor Nikonov
62e45a4c8f Test 03222_parallel_replicas_min_marks_to_read_overflow 2024-08-13 21:05:15 +00:00
Alexis Arnaud
a39a4b1080 better 2024-08-13 18:30:43 +02:00
Alexis Arnaud
229fffcd56 post-review changes 2024-08-13 18:30:43 +02:00
Alexis Arnaud
3c586d80c8 post-rebase fixes 2024-08-13 18:30:43 +02:00
Alexis Arnaud
0ff90e4a5c post-review changes 2024-08-13 18:30:43 +02:00
Alexis Arnaud
5d6d378f24 renumbered tests 2024-08-13 18:30:43 +02:00
Alexis Arnaud
14dad25adc trigger build 2024-08-13 18:30:43 +02:00
Alexis Arnaud
906a181b97 fix for clang-tidy 2024-08-13 18:30:43 +02:00
Alexis Arnaud
7b09ec9ccb added input_format_json_empty_as_default to setting changes history 2024-08-13 18:30:43 +02:00
Alexis Arnaud
d5bea37c96 post-review changes 2024-08-13 18:30:43 +02:00
Alexis Arnaud
ad24989b31 slightly better comment 2024-08-13 18:30:43 +02:00
Alexis Arnaud
d36176ad85 Support for the input_format_json_empty_as_default setting 2024-08-13 18:30:43 +02:00
Igor Nikonov
5339717c11 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-13 16:16:31 +00:00
Igor Nikonov
4448880bbe Remove settings 03222_pr_final_not_supported 2024-08-13 16:15:28 +00:00
Igor Nikonov
99dcf7e60e Add 03222_pr_final_not_supported.sql 2024-08-13 15:57:09 +00:00
vdimir
64e10b2dda
Merge branch 'master' into vdimir/datetime64_constant_to_ast_f 2024-08-13 17:00:51 +02:00
Igor Nikonov
e42b58082b Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-13 14:30:33 +00:00
Igor Nikonov
8d6e2e26a5 New test for asan issue with pr 2024-08-13 14:29:52 +00:00
Arthur Passos
e8a40d9d52 Merge branch 'master' into multi_auth_methods 2024-08-13 10:30:01 -03:00
Arthur Passos
9abc001296 fix trailing comma issue 2024-08-13 10:17:05 -03:00
Antonio Andelic
c61fc591c4 Use functions instead of classes 2024-08-13 11:33:17 +02:00
Antonio Andelic
dcbc590302 Merge branch 'master' into keeper-some-improvement2 2024-08-13 09:01:10 +02:00
李扬
fb80bc2afa
Merge branch 'ClickHouse:master' into opt_array_map 2024-08-13 11:41:12 +08:00
Arthur Passos
4c6aca2eed add docs about reset auth method 2024-08-12 15:58:10 -03:00
Arthur Passos
64d50d6e5b Merge branch 'master' into multi_auth_methods 2024-08-12 15:42:37 -03:00
marco-vb
2068fbb157 Added support for single wildcard usage in x509 SubjectAltName user identification (both DNS and URI). 2024-08-12 15:39:52 +00:00
Igor Nikonov
b6f5eb1211 Fix screwed merge 2024-08-11 23:15:19 +00:00
Igor Nikonov
d04db7e26d Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-11 20:11:32 +00:00
Antonio Andelic
0d38aa98ce Merge branch 'master' into read-cgroup-memory-usage-async-metrics 2024-08-09 15:44:47 +02:00
Antonio Andelic
b6c3619543 Whitespace 2024-08-09 15:41:11 +02:00
Antonio Andelic
b2172af817 Merge branch 'master' into keeper-some-improvement2 2024-08-09 14:50:52 +02:00
vdimir
ef40cc3bae
Merge branch 'master' into vdimir/datetime64_constant_to_ast_f 2024-08-08 12:12:22 +02:00
Matt Woenker
f8a14e86d8 Add const a few places 2024-08-07 16:32:13 -04:00
Matt Woenker
d09531e48a Rename test files 2024-08-07 16:25:01 -04:00
Matt Woenker
cff7cbac94 Style fix 2024-08-07 16:21:16 -04:00
vdimir
f5c07b8938
Add test cases to 03217_datetime64_constant_to_ast 2024-08-07 09:43:13 +00:00
Antonio Andelic
5ea4844d69 Merge branch 'master' into keeper-some-improvement2 2024-08-07 11:26:33 +02:00
taiyang-li
f0f1015162 fix style 2024-08-07 10:47:13 +08:00
Matt Woenker
f4ed3f5c6d Add test 2024-08-06 16:14:26 -04:00
Matt Woenker
2a1ee419b4 Fix style issue 2024-08-06 15:53:49 -04:00
Matt Woenker
704ec8dea6 Handle incomplete sequences at end of input 2024-08-06 12:49:23 -04:00
taiyang-li
045551f509 fix bugs 2024-08-05 11:33:58 +08:00
taiyang-li
d0cb299b22 merge master 2024-08-04 22:05:01 +08:00
taiyang-li
1120a51bd2 merge master 2024-08-04 17:07:16 +08:00
taiyang-li
122c9794a6 remove useless codes 2024-08-04 17:04:04 +08:00
taiyang-li
00a9c30363 optimize map function 2024-08-04 16:16:51 +08:00
taiyang-li
a498259ec8 optimize array with mutiple arguments 2024-08-04 13:32:17 +08:00
taiyang-li
e5d4eaa458 fix bugs 2024-08-03 21:08:21 +08:00
taiyang-li
0f2024306d optimize array() with single arguments and map() with double arguments 2024-08-03 17:03:27 +08:00
Igor Nikonov
36036c3da9 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-01 20:33:41 +00:00
Igor Nikonov
85b8c11175 Fix flaky 0_stateless/02784_parallel_replicas_automatic_decision
- avoid max_threads randomzation
2024-08-01 20:32:03 +00:00
Igor Nikonov
7082a9797e Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-08-01 14:22:26 +00:00
Igor Nikonov
c5a2f3aafb Limit min_marks_for_concurrent_read 2024-08-01 14:21:54 +00:00
Igor Nikonov
936e3d9a21 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-31 11:04:01 +00:00
Igor Nikonov
0705bbb42b Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-30 16:59:07 +00:00
Igor Nikonov
7d443c6b97 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-30 16:27:50 +00:00
Igor Nikonov
bce0f46254 Simplify tests/queries/0_stateless/02967_parallel_replicas_join_algo_and_analyzer_3.sh
+ enable parallel_replicas_local_plan by default
2024-07-30 16:26:01 +00:00
Arthur Passos
fa6564dbe3 Merge branch 'master' into multi_auth_methods 2024-07-30 10:32:13 -03:00
Igor Nikonov
d711ec118c Fix build 2024-07-30 09:04:59 +00:00
Igor Nikonov
5ffa54bd70 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-30 08:00:08 +00:00
Igor Nikonov
9501bc8a75 Fix forgotten conflict 2024-07-29 20:33:06 +00:00
Igor Nikonov
cf27f2665e Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-29 20:00:55 +00:00
Igor Nikonov
ce134830b7 Disable pr local plan by default 2024-07-29 17:15:15 +00:00
Arthur Passos
ae72bd57f2 try to fix docs? is it broken at all 2024-07-29 09:50:54 -03:00
Arthur Passos
c433d9cfdb retrigger ci 2024-07-28 12:33:15 -03:00
Arthur Passos
f5ee7aaf26 update some integ tests 2024-07-28 10:04:38 -03:00
Arthur Passos
352b502559 update logout session 2024-07-26 14:47:37 -03:00
Arthur Passos
546cca1251 small comment update 2024-07-26 14:42:58 -03:00
Arthur Passos
456613e7fa minor doc change 2024-07-26 14:40:50 -03:00
Arthur Passos
5a45563f1b add note about downgrading 2024-07-26 14:36:58 -03:00
Arthur Passos
a21529f66a style 2024-07-26 11:05:05 -03:00
Antonio Andelic
91e0df33db Merge branch 'master' into read-cgroup-memory-usage-async-metrics 2024-07-26 15:55:42 +02:00
Arthur Passos
921947e368 fix tests and add new one 2024-07-26 10:45:25 -03:00
Antonio Andelic
71a5a42f8f Merge branch 'master' into read-cgroup-memory-usage-async-metrics 2024-07-26 11:17:54 +02:00
Arthur Passos
93cbd4bf9a update test 2024-07-25 17:44:38 -03:00
Arthur Passos
77d46aad05 change auth_params type from string to array<string> 2024-07-25 14:24:26 -03:00
Arthur Passos
0404a8e800 make auth_type a vector of int8_t and auth_params a json array 2024-07-25 14:14:31 -03:00
Arthur Passos
8eda32600f remove todo 2024-07-25 09:13:09 -03:00
Arthur Passos
f3f9d5f4de add notes about no_password behavior 2024-07-25 09:07:13 -03:00
Antonio Andelic
f449c2fea0 Fix 2024-07-25 08:45:08 +02:00
Igor Nikonov
420075ada0 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-24 19:51:47 +00:00
Antonio Andelic
e2e4c8ee0f Better 2024-07-24 10:21:09 +02:00
Antonio Andelic
7e026aec8b Merge branch 'master' into read-cgroup-memory-usage-async-metrics 2024-07-24 09:55:25 +02:00
Antonio Andelic
ec5459a60d Update allocated with resident if no jemalloc 2024-07-24 09:15:34 +02:00
Igor Nikonov
f49412e967 Change local replica position in parallel_replicas cluster 2024-07-23 17:16:40 +00:00
Igor Nikonov
87ad12e5fc Fix typo 2024-07-23 17:16:11 +00:00
Igor Nikonov
6a6147a97f Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-23 15:44:18 +00:00
Igor Nikonov
f5630f86e4 Fix: resize pools_to_use correctly (keep local replica in it) 2024-07-23 15:43:25 +00:00
Antonio Andelic
04d80ec276 Fix non-linux build 2024-07-23 16:13:07 +02:00
Antonio Andelic
9d92bcff46 Merge branch 'master' into read-cgroup-memory-usage-async-metrics 2024-07-23 16:09:21 +02:00
Igor Nikonov
217e50d12e Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-23 13:38:28 +00:00
Igor Nikonov
842b51c782 Try assigning replica numbers consistently independent of initiator 2024-07-23 13:30:40 +00:00
Arthur Passos
0204de640f fix test that was recently introduced 2024-07-23 09:32:59 -03:00
Antonio Andelic
ade79cfd7a More fixes 2024-07-23 12:27:08 +02:00
Antonio Andelic
5b51a35e01 Add unused variables 2024-07-23 11:31:34 +02:00
Antonio Andelic
5a1b96ac84 Style fix 2024-07-23 10:52:14 +02:00
Antonio Andelic
d78cfd030f Use cgroups as source 2024-07-23 10:33:12 +02:00
Igor Nikonov
fbaca99e3a Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-23 06:38:58 +00:00
Igor Nikonov
420716d702 Fix clang-tidy warning 2024-07-23 06:38:37 +00:00
Arthur Passos
0b151bbe8f fix conflict 2024-07-22 14:31:57 -03:00
Igor Nikonov
4483f4b389 Better logging for announcement 2024-07-22 16:39:07 +00:00
Antonio Andelic
48e7057200 Merge branch 'master' into keeper-some-improvement2 2024-07-22 16:51:20 +02:00
Igor Nikonov
9900abade6 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-22 13:45:31 +00:00
Igor Nikonov
fa0f4543b6 Fix marks multiplier for local replica to avoid overflow with fuzzer 2024-07-22 13:44:25 +00:00
Antonio Andelic
1c3f7d0fd0 Small fix 2024-07-22 15:18:13 +02:00
Antonio Andelic
a3840179cc Merge branch 'master' into read-cgroup-memory-usage-async-metrics 2024-07-22 12:58:36 +02:00
Antonio Andelic
1d1dc9c7ad
Merge branch 'master' into read-cgroup-memory-usage-async-metrics 2024-07-21 10:37:01 +01:00
Antonio Andelic
2147a96475 Better 2024-07-21 11:32:57 +02:00
Igor Nikonov
4753f4cb33 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-20 20:54:11 +00:00
Igor Nikonov
4e69cd0d52 Avoid getting callbacks from context for local plan 2024-07-20 20:53:18 +00:00
Igor Nikonov
daabf2275e Remove wrong comment 2024-07-19 21:46:14 +00:00
Igor Nikonov
75f7816c46 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-19 08:24:54 +00:00
Igor Nikonov
6db09e884b Simplify code 2024-07-19 08:24:29 +00:00
Arthur Passos
f2c22408da
Merge branch 'master' into multi_auth_methods 2024-07-18 17:13:50 -03:00
Antonio Andelic
7d66f400b2 Better 2024-07-18 17:40:17 +02:00
Igor Nikonov
7ad07657a3 Fix 2024-07-18 14:16:44 +00:00
Igor Nikonov
7523dafc06 Fix after incorrect merge conflict resolution 2024-07-18 13:09:07 +00:00
Igor Nikonov
e47fe15968 Simplify condition 2024-07-18 12:22:03 +00:00
Antonio Andelic
05c7dc582a Add some comments 2024-07-18 13:40:03 +02:00
Igor Nikonov
e438f58f21 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-18 11:34:04 +00:00
Antonio Andelic
9ec1fd1ab7 Fix non-jemalloc builds 2024-07-18 12:13:44 +02:00
Antonio Andelic
9a43183eb3 Finish background memory thread 2024-07-18 10:40:47 +02:00
Antonio Andelic
c413e7a494 Merge branch 'master' into read-cgroup-memory-usage-async-metrics 2024-07-18 09:01:54 +02:00
Antonio Andelic
21009577d8 Dedicated memory background thread 2024-07-18 09:01:20 +02:00
Antonio Andelic
97f4ec2adb Read cgroup memory usage in async metrics thread 2024-07-17 16:59:35 +02:00
Igor Nikonov
7fba824ed2 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-17 11:45:34 +00:00
Igor Nikonov
baf3408b16 Fix: fallback to local plan w/o PR in case of empty table 2024-07-17 11:45:00 +00:00
Igor Nikonov
a3d4fd9246 Fix 02950_parallel_replicas_used_count 2024-07-17 10:01:26 +00:00
Igor Nikonov
fc693cc982 Fix 02982_parallel_replicas_unexpected_cluster 2024-07-16 21:05:27 +00:00
Igor Nikonov
5347754aed Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-16 20:03:36 +00:00
Igor Nikonov
08dc1c8c37 Fallback to local execution in case of cluster(shard) has only one node 2024-07-16 19:59:16 +00:00
Igor Nikonov
0056db42be Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-16 08:57:57 +00:00
Igor Nikonov
4caf9b6e6f Better diagnostic message formatting 2024-07-16 08:57:15 +00:00
Igor Nikonov
27db36cd4f Separate converting actions in separte source file 2024-07-16 08:46:24 +00:00
Igor Nikonov
69c1e68359 Fix clang-tidy warning: remove include duplicate 2024-07-16 07:48:40 +00:00
Igor Nikonov
65ba0dd669 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-15 20:42:25 +00:00
Igor Nikonov
860b18c251 Update test for in-(reverse)-order coordinator 2024-07-15 20:40:55 +00:00
Arthur Passos
006f20858a remove dupl inc 2024-07-15 17:01:02 -03:00
Igor Nikonov
02a2f50916 Fix clang warning 2024-07-15 18:37:19 +00:00
Arthur Passos
cc02ebca75 Merge branch 'master' into multi_auth_methods 2024-07-15 10:55:40 -03:00
Igor Nikonov
fdbafdb8db Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-15 12:04:04 +00:00
Igor Nikonov
261ff133b8 Fix 02784_parallel_replicas_automatic_decision_join 2024-07-15 12:03:12 +00:00
Igor Nikonov
f7befaf68e Polish + comments 2024-07-14 18:46:14 +00:00
Igor Nikonov
9f20e33d50 Fix 2024-07-14 17:52:51 +00:00
Igor Nikonov
c494096d33 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-14 16:39:06 +00:00
Igor Nikonov
0c986cca7c Fix in-order coordinator
+ register all replicas for parts in working set
2024-07-14 16:37:00 +00:00
Igor Nikonov
32dc3fe8d1 Simplify code 2024-07-13 21:19:14 +00:00
Igor Nikonov
f42fe31396 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-12 21:21:04 +00:00
Igor Nikonov
b952a11f35 Fix 00177_memory_bound_merging 2024-07-12 21:20:23 +00:00
Arthur Passos
3ab6760412 update docs 2024-07-12 15:21:29 -03:00
Alexander Tokmakov
ae77d70a03 Merge branch 'master' into break_compatibility 2024-07-12 19:30:31 +02:00
Arthur Passos
ca0b821aaf fix a few ut 2024-07-12 14:26:24 -03:00
Igor Nikonov
e22d6035fa Cleanup 2024-07-12 14:11:04 +00:00
Igor Nikonov
4e44ecf286 Fixate setting in 02967_parallel_replicas_joins_and_analyzer 2024-07-12 13:52:33 +00:00
Igor Nikonov
6b1a63792d Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-12 13:43:34 +00:00
Igor Nikonov
04c3661b0b Randomize parallel_replicas_local_plan 2024-07-12 13:42:25 +00:00
Arthur Passos
2e9b7e8334 Removed stale comment and added log_info about skipped auth methods 2024-07-12 10:20:59 -03:00
Arthur Passos
b428327c6e trigger ci 2024-07-12 09:20:36 -03:00
Arthur Passos
8e0e2cec28 fix hilite test 2024-07-11 18:06:40 -03:00
Arthur Passos
300d4ae593 add comment back and missing file 2024-07-11 17:23:37 -03:00
Arthur Passos
ee62318348 rename test and add a few more 2024-07-11 17:21:33 -03:00
Arthur Passos
29e0d5c1e3 use comma separated instead of multiple add id add id 2024-07-11 17:04:28 -03:00
Igor Nikonov
1a8e1eb0fe Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-11 11:14:12 +00:00
Igor Nikonov
69652477f4 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-11 10:17:28 +00:00
Arthur Passos
91e8ef6776 do not allow no_pwd to co-exist with other auth methods 2024-07-10 09:11:02 -03:00
Antonio Andelic
5a96290cce Merge branch 'master' into keeper-some-improvement2 2024-07-10 12:45:43 +02:00
Arthur Passos
acc2249288 do not allow no_password to co-exist with other auth methods 2024-07-09 22:05:04 -03:00
Arthur Passos
e36776551e remove unused extern 2024-07-09 15:58:57 -03:00
Arthur Passos
cd0145113f allow other auth methods to be used if no_password is setup but not allowed 2024-07-09 15:05:24 -03:00
Alexander Tokmakov
6cb361413e fix 2024-07-09 17:56:12 +02:00
Alexander Tokmakov
b948d5ad85 Merge branch 'master' into break_compatibility 2024-07-09 15:42:09 +02:00
Alexander Tokmakov
e7105a3faa fix 2024-07-05 22:43:35 +02:00
Arthur Passos
5a2b0ea1cc simplify formatting of astauth 2024-07-05 16:08:10 -03:00
Alexander Tokmakov
0e6fd2251e fix 2024-07-05 17:57:21 +02:00
Alexander Tokmakov
ac17c7194d Merge branch 'master' into break_compatibility 2024-07-05 16:35:52 +02:00
Alexander Tokmakov
613636bb1b fix 2024-07-05 16:34:13 +02:00
Alexander Tokmakov
aa9591419d fix 2024-07-04 19:15:06 +02:00
Alexander Tokmakov
995413662b Merge branch 'master' into break_compatibility 2024-07-04 19:00:13 +02:00
Alexander Tokmakov
4e350ff44a don't allow explicit uuids and rmt args in replicated db 2024-07-04 18:56:37 +02:00
Igor Nikonov
b51e1b27db Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-03 07:51:38 +00:00
Igor Nikonov
3b31590477 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-02 20:40:04 +00:00
Igor Nikonov
6124772cd8 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-02 15:09:40 +00:00
Igor Nikonov
105d39b09f Twick number of threads 2024-07-02 15:06:19 +00:00
Arthur Passos
cc13783acd Merge branch 'master' into multi_auth_methods 2024-07-02 09:11:20 -03:00
Antonio Andelic
7e22af06f1 Merge branch 'master' into keeper-some-improvement2 2024-07-02 09:01:48 +02:00
Igor Nikonov
6b3750ff83 Clean up 2024-07-01 08:28:54 +00:00
Igor Nikonov
71b0ab94be Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-30 20:54:42 +00:00
Igor Nikonov
37fbf905dd Use only local snapshot for in order coordinator 2024-06-30 20:33:43 +00:00
Arthur Passos
6f020901a8 add a few comments 2024-06-29 18:39:01 -03:00
Arthur Passos
306d55f636 add some docs 2024-06-29 18:29:05 -03:00
Igor Nikonov
a471716a7f Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-28 22:18:07 +00:00
Igor Nikonov
ebcf455f4a Fix: progress bar for reading in order 2024-06-28 22:17:34 +00:00
Arthur Passos
27c9bb9b10 add missing reference qualifier 2024-06-28 17:06:06 -03:00
Arthur Passos
1cd253e05f fix integ test 2024-06-28 12:48:38 -03:00
Igor Nikonov
9b694e611c Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-28 14:02:28 +00:00
Arthur Passos
e9360221b7 trigger ci 2024-06-28 08:40:32 -03:00
Igor Nikonov
23d7e0148f Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-27 20:31:35 +00:00
Igor Nikonov
372b948d34 Fix: progress bar, reading in order 2024-06-27 20:30:05 +00:00
Arthur Passos
eb8a18304f rename somem stuff 2024-06-27 17:08:14 -03:00
Arthur Passos
e111958762 remmovev optional from auth data in session object 2024-06-27 14:33:28 -03:00
Arthur Passos
43a9194739 remove optional from auth_result 2024-06-27 14:21:29 -03:00
Arthur Passos
50da0cb732 remove definition of logical_error from auth.cpp 2024-06-27 12:14:08 -03:00
Arthur Passos
a948334b8b minor 2024-06-27 11:53:42 -03:00
Arthur Passos
b219b99380 small refactor 2024-06-27 11:50:16 -03:00
Arthur Passos
21de3e2961 try to fix black 2024-06-27 10:05:37 -03:00
Arthur Passos
f69a19d01d try to fix black 2024-06-27 09:20:12 -03:00
Arthur Passos
ec0d426a6f try to fix black 2024-06-27 08:52:20 -03:00
Arthur Passos
678700f137 update some other tests 2024-06-26 22:26:46 -03:00
Arthur Passos
95f584c5d0 black 2024-06-26 17:25:46 -03:00
Arthur Passos
c0e1095e66 initial fix for session_log, shall be refactored 2024-06-26 17:06:38 -03:00
Arthur Passos
938004c090 update yet another test 2024-06-26 16:40:40 -03:00
Arthur Passos
a77a0b5eb0 black 2024-06-26 13:59:57 -03:00
Arthur Passos
3e77101b16 update some other tests 2024-06-26 13:29:13 -03:00
Arthur Passos
341071402c fix wrong expected error code & add test 2024-06-26 11:00:13 -03:00
Arthur Passos
f15551b47b black 2024-06-26 09:38:55 -03:00
Arthur Passos
c2dd3bb5d2 Merge branch 'master' into multi_auth_methods 2024-06-26 09:03:58 -03:00
Arthur Passos
b93c21a041 add no-parallel to grant_and_Revoke.sql 2024-06-26 08:58:44 -03:00
Arthur Passos
4d800a8487 update test_disk_access_storage 2024-06-26 08:54:58 -03:00
Arthur Passos
11e537cb28 update some more tests 2024-06-26 08:51:30 -03:00
Igor Nikonov
60153d428d Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-26 10:12:42 +00:00
Igor Nikonov
7c6293a747 Fix test_parallel_replicas_no_replicas 2024-06-26 10:12:09 +00:00
Arthur Passos
35214a34ee update some tests 2024-06-25 22:39:30 -03:00
Arthur Passos
57afc5f035 serialize no_password 2024-06-25 20:02:19 -03:00
Igor Nikonov
3d35d31655 More cleanup 2024-06-25 16:11:04 +00:00
Igor Nikonov
64cfe1628f Cleanup ReadFromMergeTree.h 2024-06-25 15:21:44 +00:00
Igor Nikonov
0eff924475 Use parallel_replicas_local_plan in test 2024-06-25 15:11:02 +00:00
Igor Nikonov
510cb961a1 Fix 2024-06-25 14:47:38 +00:00
Igor Nikonov
318af3af95 Cleanup 2024-06-25 14:31:11 +00:00
Igor Nikonov
96b68cb920 Update setting in 02404_memory_bound_merging 2024-06-25 13:33:36 +00:00
Igor Nikonov
36793bb126 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-25 12:30:03 +00:00
Igor Nikonov
f62873b173 Fix 02404_memory_bound_merging 2024-06-25 12:29:21 +00:00
Arthur Passos
907a54e9f6 add no parallel 2024-06-24 21:21:03 -03:00
Arthur Passos
a1928bd299 no-fast test 2024-06-24 19:39:26 -03:00
Arthur Passos
c7aed3c98c Revert "dont test ssh at all, it wont work if openssl is not built"
This reverts commit 4d5676f455.
2024-06-24 19:37:46 -03:00
Arthur Passos
96cb9f13dd remove comments 2024-06-24 16:51:34 -03:00
Arthur Passos
4d5676f455 dont test ssh at all, it wont work if openssl is not built 2024-06-24 16:50:23 -03:00
Arthur Passos
5bdd49f36c do not gen at runtime, use pre-built ones 2024-06-24 16:43:19 -03:00
Arthur Passos
d4da0a0a21 use plaintext_password instead of sha256 because of cicd 2024-06-24 16:30:08 -03:00
Arthur Passos
fe0d3b3e27 initial tests 2024-06-24 15:48:46 -03:00
Igor Nikonov
afa4d7fd5c Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-24 14:32:05 +00:00
Igor Nikonov
5d91fd9717 Cleanup 2024-06-24 14:31:05 +00:00
Arthur Passos
9d19001945 Merge branch 'master' into multi_auth_methods 2024-06-22 10:52:47 -03:00
Arthur Passos
f55d15d9b9 Merge branch 'master' into multi_auth_methods 2024-06-21 15:39:02 -03:00
Arthur Passos
237abda2eb add some ut 2024-06-21 15:35:50 -03:00
Arthur Passos
08c9cc18d6 fix astcreateuserquery clone 2024-06-21 12:05:58 -03:00
Arthur Passos
55da169fe7 fix wrong condition 2024-06-21 10:30:12 -03:00
Arthur Passos
a1211a0f5a simplify syntax 2024-06-20 16:51:52 -03:00
Arthur Passos
179d54505a make progress, seems functional 2024-06-20 15:07:16 -03:00
Arthur Passos
1514dcbb34 ptal 2024-06-19 11:57:38 -03:00
Igor Nikonov
9658d37d49 Add parallel_replicas_local_plan to settings history 2024-06-19 11:27:50 +00:00
Igor Nikonov
dba6ea078f Setting parallel_replicas_local_plan 2024-06-18 19:47:07 +00:00
Igor Nikonov
4093a6bacc Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-18 13:05:16 +00:00
Igor Nikonov
7c82f45fb0 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-18 11:12:40 +00:00
Igor Nikonov
0ecefa6973 Better replicas notation in plan description 2024-06-18 11:07:15 +00:00
Igor Nikonov
366de07856 Remove prefer_localhost_replica 2024-06-18 10:39:50 +00:00
Igor Nikonov
c286188419 Update 00177_memory_bound_merging.reference 2024-06-18 10:39:13 +00:00
Antonio Andelic
ac78184fe7 Merge branch 'tracing-try-2' into keeper-some-improvement2 2024-06-18 11:04:00 +02:00
Antonio Andelic
1777ff37c0 Merge branch 'master' into keeper-some-improvement2 2024-06-18 11:03:38 +02:00
Igor Nikonov
81668cc290 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-17 12:25:13 +00:00
Igor Nikonov
c87bfe102e Fix: correct local replica exclusion
- fixes 02731_parallel_replicas_join_subquery
2024-06-17 12:24:14 +00:00
Antonio Andelic
7dca59da56 Revert "Merge branch 'use-thread-from-global-pool-in-poco-threadpool' into keeper-some-improvement"
This reverts commit 737d7484c5, reversing
changes made to b3a742304e.
2024-06-17 09:03:49 +02:00
Arthur Passos
6ac24fcf54 fix test build 2024-06-14 18:08:01 -03:00
Igor Nikonov
70a33e633c Fix 02784_parallel_replicas_automatic_decision 2024-06-14 19:53:04 +00:00
Arthur Passos
70e4933221 fix no pwd authentication 2024-06-14 14:39:55 -03:00
Igor Nikonov
08032e97fd Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-14 14:10:54 +00:00
Igor Nikonov
c2d38b3c93 Fix crash 2024-06-14 14:06:12 +00:00
Arthur Passos
c1250ccb35 append default constructed auth method upon alter without auth data 2024-06-14 10:58:57 -03:00
Arthur Passos
98e5ea5206 style fix 2024-06-14 10:02:40 -03:00
Arthur Passos
b22776d3a8 throw exception upon auth 2024-06-14 09:34:10 -03:00
Igor Nikonov
245476b34b Consistent replica id assignment 2024-06-14 12:02:47 +00:00
Igor Nikonov
048cbb17a6 Comment to 02769_parallel_replicas_unavailable_shards.sql 2024-06-13 19:55:30 +00:00
Arthur Passos
d4c1faad3b testing the waters 2024-06-13 11:24:00 -03:00
Igor Nikonov
f8afb299f6 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-12 10:30:43 +00:00
Igor Nikonov
164b5e47a8 Fix 02769_parallel_replicas_unavailable_shards 2024-06-12 10:30:15 +00:00
Igor Nikonov
eccd56c9b9 Fix style check 2024-06-11 20:16:00 +00:00
Igor Nikonov
da4ed273e3 Fix 02811_parallel_replicas_prewhere_count 2024-06-11 19:24:50 +00:00
Igor Nikonov
f46deb4e79 Fix clang-tidy 2024-06-11 16:49:51 +00:00
Igor Nikonov
f999eed376 Fix 02967_parallel_replicas_join_algo_and_analyzer 2024-06-11 16:49:11 +00:00
Antonio Andelic
0fa45c3954 More parallel storage 2024-06-11 16:39:35 +02:00
Igor Nikonov
a473ecd004 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-11 14:38:21 +00:00
Igor Nikonov
d6dec38103 Fix test_parallel_replicas_over_distributed 2024-06-11 14:37:42 +00:00
Igor Nikonov
23ca8608ba Fix 03006_parallel_replicas_prewhere 2024-06-11 13:25:19 +00:00
Antonio Andelic
c802d7d58a Writing improvements 2024-06-11 14:35:26 +02:00
Antonio Andelic
5ab06caffc Merge branch 'keeper-parallel-storage' into keeper-some-improvement2 2024-06-11 10:18:27 +02:00
Antonio Andelic
737d7484c5 Merge branch 'use-thread-from-global-pool-in-poco-threadpool' into keeper-some-improvement 2024-06-11 09:46:58 +02:00
Antonio Andelic
b3a742304e Merge branch 'master' into keeper-some-improvement 2024-06-11 09:46:41 +02:00
Igor Nikonov
bb57e0bc9c Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-10 18:54:21 +00:00
kssenii
6514d72fea Move servers pool back 2024-06-10 18:53:51 +02:00
kssenii
c3d4b429d9 Fix merge 2024-06-10 15:39:54 +02:00
kssenii
7ff848c2c8 Merge remote-tracking branch 'origin/master' into use-thread-from-global-pool-in-poco-threadpool 2024-06-10 15:20:03 +02:00
kssenii
a11ba3f437 Fix shutdown 2024-06-10 15:19:03 +02:00
kssenii
6604d94271 Ping CI: skip fast test to see all stateless runs 2024-06-07 17:11:49 +02:00
Igor Nikonov
29d56b61b3 fix 02404_memory_bound_merging 2024-06-07 14:54:00 +00:00
Igor Nikonov
0999501308 Fix crash in in-order coordinator 2024-06-07 14:35:06 +00:00
kssenii
e30fa1da4d Fix ThreadStatus 2024-06-07 15:03:13 +02:00
Igor Nikonov
44fecf66ca Fix 02967_parallel_replicas_joins_and_analyzer 2024-06-06 17:11:42 +00:00
Igor Nikonov
7be90470d5 Fix 02731_parallel_replicas_join_subquery 2024-06-06 16:49:05 +00:00
Igor Nikonov
7c1ffaec95 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-06 16:21:56 +00:00
Igor Nikonov
4f37fafe42 Fix 02771_parallel_replicas_analyzer 2024-06-06 15:57:12 +00:00
kssenii
7ea3345e0d Use ThreadFromGlobalPool in Poco::ThreadPool 2024-06-06 17:25:15 +02:00
kssenii
1e97d73bd0 Squashed commit of the following:
commit 27fe0439fa
Merge: bfb1c4c793 bb469e0d45
Author: Antonio Andelic <antonio@clickhouse.com>
Date:   Thu Jun 6 14:36:02 2024 +0200

    Merge branch 'master' into fix-global-trace-collector

commit bfb1c4c793
Author: Antonio Andelic <antonio@clickhouse.com>
Date:   Thu Jun 6 11:29:42 2024 +0200

    better

commit fcee260b25
Author: Antonio Andelic <antonio2368@users.noreply.github.com>
Date:   Thu Jun 6 11:22:48 2024 +0200

    Update src/Interpreters/TraceCollector.h

    Co-authored-by: alesapin <alesapin@clickhouse.com>

commit 1d3cf17053
Author: Antonio Andelic <antonio@clickhouse.com>
Date:   Thu Jun 6 11:11:08 2024 +0200

    Fix global trace collector
2024-06-06 17:13:37 +02:00
Igor Nikonov
f8d4aabfe0 Initiliaze working set on pipelie initialization, right after analysis 2024-06-06 14:28:17 +00:00
Antonio Andelic
f0e9703384 Some small improvements 2024-06-06 09:45:07 +02:00
Antonio Andelic
514941627b Merge branch 'master' into keeper-parallel-storage 2024-06-05 15:31:57 +02:00
Igor Nikonov
69009b886f Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-05 11:58:42 +00:00
Igor Nikonov
3210d0f471 Simple renaming 2024-06-05 11:56:12 +00:00
Igor Nikonov
f39dbac9a0 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-06-05 06:46:56 +00:00
Igor Nikonov
6476e9ad9b Temporary test fix 2024-06-05 06:45:56 +00:00
Igor Nikonov
eece76bc41 Fix build 2024-06-01 20:53:46 +00:00
Igor Nikonov
2bc236f635 Merge remote-tracking branch 'origin/pr-plan-rewrite' into pr-local-plan 2024-06-01 18:22:03 +00:00
Igor Nikonov
e8a1a800dc Fix crash with JOINs 2024-05-29 20:57:16 +00:00
Igor Nikonov
40aab93db1 Correct replica id for inorder case 2024-05-29 20:55:02 +00:00
Igor Nikonov
e28ca7ebe8 Merge remote-tracking branch 'origin/pr-plan-rewrite' into pr-local-plan 2024-05-29 10:52:59 +00:00
Igor Nikonov
d756729f38 Use local working set for parallel replicas 2024-05-28 21:04:33 +00:00
Igor Nikonov
a9b485a2c1 Disable temporary PR inorder test 2024-05-28 19:05:09 +00:00
Igor Nikonov
4916e3376e Merge remote-tracking branch 'origin/pr-plan-rewrite' into pr-local-plan 2024-05-28 15:13:30 +00:00
Igor Nikonov
0c1bd2e477 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-05-28 14:35:22 +00:00
Igor Nikonov
1aa5d70d2a Fix style 2024-05-28 13:03:24 +00:00
Igor Nikonov
29346f6073 Init coordinator separately 2024-05-28 12:16:18 +00:00
Igor Nikonov
5cdf8d336c Local reading step from merge tree 2024-05-27 12:22:18 +00:00
Igor Nikonov
be08ebd0f4 Fix 2024-05-24 13:01:30 +00:00
Igor Nikonov
fa8aafa942 Local plan for parallel replicas: save 2024-05-22 21:28:33 +00:00
Antonio Andelic
acc08c65d9 Add stopwatch 2024-05-22 11:56:45 +02:00
Antonio Andelic
f1e4403f98 Merge branch 'master' into keeper-parallel-storage 2024-05-22 11:39:57 +02:00
Antonio Andelic
b1d53f0472 Merge branch 'master' into keeper-parallel-storage 2024-04-29 15:13:19 +02:00
Antonio Andelic
bc3cfb008e Merge branch 'master' into keeper-parallel-storage 2024-03-25 13:14:57 +01:00
Antonio Andelic
9791a2ea40 Merge branch 'keeper-batch-flushes' into keeper-parallel-storage 2023-09-08 16:26:12 +00:00
Antonio Andelic
9fb9d16737 Merge branch 'keeper-batch-flushes' into keeper-parallel-storage 2023-09-06 13:30:05 +00:00
Antonio Andelic
6be1d0724a More mutex 2023-09-06 13:04:08 +00:00
Antonio Andelic
9238520490 Merge branch 'master' into keeper-parallel-storage 2023-09-06 10:57:33 +00:00
Antonio Andelic
dd1bb579df Better 2023-09-05 12:05:37 +00:00
Antonio Andelic
57943798b7 Merge branch 'master' into keeper-parallel-storage 2023-09-05 08:46:38 +00:00
Antonio Andelic
b43c3d75a2 Initial implementation 2023-09-04 14:49:49 +00:00
718 changed files with 17066 additions and 7530 deletions

View File

@ -4,15 +4,31 @@ description: Prints workflow debug info
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Print envs - name: Envs, event.json and contexts
shell: bash shell: bash
run: | run: |
echo "::group::Envs" echo '::group::Environment variables'
env env | sort
echo "::endgroup::" echo '::endgroup::'
- name: Print Event.json
shell: bash echo '::group::event.json'
run: |
echo "::group::Event.json"
python3 -m json.tool "$GITHUB_EVENT_PATH" python3 -m json.tool "$GITHUB_EVENT_PATH"
echo "::endgroup::" echo '::endgroup::'
cat << 'EOF'
::group::github context
${{ toJSON(github) }}
::endgroup::
::group::env context
${{ toJSON(env) }}
::endgroup::
::group::runner context
${{ toJSON(runner) }}
::endgroup::
::group::job context
${{ toJSON(job) }}
::endgroup::
EOF

View File

@ -27,6 +27,8 @@ jobs:
clear-repository: true # to ensure correct digests clear-repository: true # to ensure correct digests
fetch-depth: 0 # to get version fetch-depth: 0 # to get version
filter: tree:0 filter: tree:0
- name: Debug Info
uses: ./.github/actions/debug
- name: Labels check - name: Labels check
run: | run: |
cd "$GITHUB_WORKSPACE/tests/ci" cd "$GITHUB_WORKSPACE/tests/ci"

View File

@ -33,6 +33,8 @@ jobs:
clear-repository: true clear-repository: true
token: ${{secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN}} token: ${{secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN}}
fetch-depth: 0 fetch-depth: 0
- name: Debug Info
uses: ./.github/actions/debug
- name: Cherry pick - name: Cherry pick
run: | run: |
cd "$GITHUB_WORKSPACE/tests/ci" cd "$GITHUB_WORKSPACE/tests/ci"

View File

@ -56,13 +56,13 @@ jobs:
GH_TOKEN: ${{ secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN }} GH_TOKEN: ${{ secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN }}
runs-on: [self-hosted, release-maker] runs-on: [self-hosted, release-maker]
steps: steps:
- name: DebugInfo
uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6
- name: Check out repository code - name: Check out repository code
uses: ClickHouse/checkout@v1 uses: ClickHouse/checkout@v1
with: with:
token: ${{secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN}} token: ${{secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN}}
fetch-depth: 0 fetch-depth: 0
- name: Debug Info
uses: ./.github/actions/debug
- name: Prepare Release Info - name: Prepare Release Info
shell: bash shell: bash
run: | run: |

View File

@ -11,6 +11,7 @@ name: Build docker images
required: false required: false
type: boolean type: boolean
default: false default: false
jobs: jobs:
DockerBuildAarch64: DockerBuildAarch64:
runs-on: [self-hosted, style-checker-aarch64] runs-on: [self-hosted, style-checker-aarch64]

View File

@ -8,27 +8,28 @@ on: # yamllint disable-line rule:truthy
schedule: schedule:
- cron: '0 */6 * * *' - cron: '0 */6 * * *'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
RunConfig: RunConfig:
runs-on: [self-hosted, style-checker-aarch64] runs-on: [self-hosted, style-checker-aarch64]
outputs: outputs:
data: ${{ steps.runconfig.outputs.CI_DATA }} data: ${{ steps.runconfig.outputs.CI_DATA }}
steps: steps:
- name: DebugInfo
uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6
- name: Check out repository code - name: Check out repository code
uses: ClickHouse/checkout@v1 uses: ClickHouse/checkout@v1
with: with:
clear-repository: true # to ensure correct digests clear-repository: true # to ensure correct digests
fetch-depth: 0 # to get version fetch-depth: 0 # to get version
filter: tree:0 filter: tree:0
- name: Debug Info
uses: ./.github/actions/debug
- name: PrepareRunConfig - name: PrepareRunConfig
id: runconfig id: runconfig
run: | run: |
echo "::group::configure CI run" echo "::group::configure CI run"
python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --configure --workflow "$GITHUB_WORKFLOW" --outfile ${{ runner.temp }}/ci_run_data.json python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --configure --workflow "$GITHUB_WORKFLOW" --outfile ${{ runner.temp }}/ci_run_data.json
echo "::endgroup::" echo "::endgroup::"
echo "::group::CI run configure results" echo "::group::CI run configure results"
python3 -m json.tool ${{ runner.temp }}/ci_run_data.json python3 -m json.tool ${{ runner.temp }}/ci_run_data.json
echo "::endgroup::" echo "::endgroup::"

View File

@ -15,14 +15,14 @@ jobs:
outputs: outputs:
data: ${{ steps.runconfig.outputs.CI_DATA }} data: ${{ steps.runconfig.outputs.CI_DATA }}
steps: steps:
- name: DebugInfo
uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6
- name: Check out repository code - name: Check out repository code
uses: ClickHouse/checkout@v1 uses: ClickHouse/checkout@v1
with: with:
clear-repository: true # to ensure correct digests clear-repository: true # to ensure correct digests
fetch-depth: 0 # to get version fetch-depth: 0 # to get version
filter: tree:0 filter: tree:0
- name: Debug Info
uses: ./.github/actions/debug
- name: Merge sync PR - name: Merge sync PR
run: | run: |
cd "$GITHUB_WORKSPACE/tests/ci" cd "$GITHUB_WORKSPACE/tests/ci"

View File

@ -14,14 +14,14 @@ jobs:
outputs: outputs:
data: ${{ steps.runconfig.outputs.CI_DATA }} data: ${{ steps.runconfig.outputs.CI_DATA }}
steps: steps:
- name: DebugInfo
uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6
- name: Check out repository code - name: Check out repository code
uses: ClickHouse/checkout@v1 uses: ClickHouse/checkout@v1
with: with:
clear-repository: true # to ensure correct digests clear-repository: true # to ensure correct digests
fetch-depth: 0 # to get a version fetch-depth: 0 # to get a version
filter: tree:0 filter: tree:0
- name: Debug Info
uses: ./.github/actions/debug
- name: Cancel PR workflow - name: Cancel PR workflow
run: | run: |
python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --cancel-previous-run python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --cancel-previous-run

View File

@ -15,14 +15,14 @@ jobs:
outputs: outputs:
data: ${{ steps.runconfig.outputs.CI_DATA }} data: ${{ steps.runconfig.outputs.CI_DATA }}
steps: steps:
- name: DebugInfo
uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6
- name: Check out repository code - name: Check out repository code
uses: ClickHouse/checkout@v1 uses: ClickHouse/checkout@v1
with: with:
clear-repository: true # to ensure correct digests clear-repository: true # to ensure correct digests
fetch-depth: 0 # to get version fetch-depth: 0 # to get version
filter: tree:0 filter: tree:0
- name: Debug Info
uses: ./.github/actions/debug
- name: PrepareRunConfig - name: PrepareRunConfig
id: runconfig id: runconfig
run: | run: |

View File

@ -25,14 +25,14 @@ jobs:
outputs: outputs:
data: ${{ steps.runconfig.outputs.CI_DATA }} data: ${{ steps.runconfig.outputs.CI_DATA }}
steps: steps:
- name: DebugInfo
uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6
- name: Check out repository code - name: Check out repository code
uses: ClickHouse/checkout@v1 uses: ClickHouse/checkout@v1
with: with:
clear-repository: true # to ensure correct digests clear-repository: true # to ensure correct digests
fetch-depth: 0 # to get a version fetch-depth: 0 # to get a version
filter: tree:0 filter: tree:0
- name: Debug Info
uses: ./.github/actions/debug
- name: Cancel previous Sync PR workflow - name: Cancel previous Sync PR workflow
run: | run: |
python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --cancel-previous-run python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --cancel-previous-run

View File

@ -24,6 +24,8 @@ jobs:
clear-repository: true # to ensure correct digests clear-repository: true # to ensure correct digests
fetch-depth: 0 # to get version fetch-depth: 0 # to get version
filter: tree:0 filter: tree:0
- name: Debug Info
uses: ./.github/actions/debug
- name: Labels check - name: Labels check
run: | run: |
cd "$GITHUB_WORKSPACE/tests/ci" cd "$GITHUB_WORKSPACE/tests/ci"

View File

@ -62,8 +62,6 @@ jobs:
env: env:
GITHUB_JOB_OVERRIDDEN: ${{inputs.test_name}} GITHUB_JOB_OVERRIDDEN: ${{inputs.test_name}}
steps: steps:
- name: DebugInfo
uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6
- name: Check out repository code - name: Check out repository code
uses: ClickHouse/checkout@v1 uses: ClickHouse/checkout@v1
with: with:
@ -72,6 +70,8 @@ jobs:
submodules: ${{inputs.submodules}} submodules: ${{inputs.submodules}}
fetch-depth: ${{inputs.checkout_depth}} fetch-depth: ${{inputs.checkout_depth}}
filter: tree:0 filter: tree:0
- name: Debug Info
uses: ./.github/actions/debug
- name: Set build envs - name: Set build envs
run: | run: |
cat >> "$GITHUB_ENV" << 'EOF' cat >> "$GITHUB_ENV" << 'EOF'

6
.gitmodules vendored
View File

@ -170,9 +170,6 @@
[submodule "contrib/fast_float"] [submodule "contrib/fast_float"]
path = contrib/fast_float path = contrib/fast_float
url = https://github.com/fastfloat/fast_float url = https://github.com/fastfloat/fast_float
[submodule "contrib/libpq"]
path = contrib/libpq
url = https://github.com/ClickHouse/libpq
[submodule "contrib/NuRaft"] [submodule "contrib/NuRaft"]
path = contrib/NuRaft path = contrib/NuRaft
url = https://github.com/ClickHouse/NuRaft url = https://github.com/ClickHouse/NuRaft
@ -369,3 +366,6 @@
[submodule "contrib/numactl"] [submodule "contrib/numactl"]
path = contrib/numactl path = contrib/numactl
url = https://github.com/ClickHouse/numactl.git url = https://github.com/ClickHouse/numactl.git
[submodule "contrib/postgres"]
path = contrib/postgres
url = https://github.com/ClickHouse/postgres.git

View File

@ -40,17 +40,8 @@ Every month we get together with the community (users, contributors, customers,
Keep an eye out for upcoming meetups and events around the world. Somewhere else you want us to be? Please feel free to reach out to tyler `<at>` clickhouse `<dot>` com. You can also peruse [ClickHouse Events](https://clickhouse.com/company/news-events) for a list of all upcoming trainings, meetups, speaking engagements, etc. Keep an eye out for upcoming meetups and events around the world. Somewhere else you want us to be? Please feel free to reach out to tyler `<at>` clickhouse `<dot>` com. You can also peruse [ClickHouse Events](https://clickhouse.com/company/news-events) for a list of all upcoming trainings, meetups, speaking engagements, etc.
The following upcoming meetups are featuring creator of ClickHouse & CTO, Alexey Milovidov: Upcoming meetups
* [Raleigh Meetup (Deutsche Bank)](https://www.meetup.com/triangletechtalks/events/302723486/) - September 9
* [New York Meetup (Rokt)](https://www.meetup.com/clickhouse-new-york-user-group/events/302575342) - September 10
* [Chicago Meetup (Jump Capital)](https://lu.ma/43tvmrfw) - September 12
Other upcoming meetups
* [Toronto Meetup (Shopify)](https://www.meetup.com/clickhouse-toronto-user-group/events/301490855/) - September 10
* [Austin Meetup](https://www.meetup.com/clickhouse-austin-user-group/events/302558689/) - September 17
* [London Meetup](https://www.meetup.com/clickhouse-london-user-group/events/302977267) - September 17
* [Bangalore Meetup](https://www.meetup.com/clickhouse-bangalore-user-group/events/303208274/) - September 18 * [Bangalore Meetup](https://www.meetup.com/clickhouse-bangalore-user-group/events/303208274/) - September 18
* [Tel Aviv Meetup](https://www.meetup.com/clickhouse-meetup-israel/events/303095121) - September 22 * [Tel Aviv Meetup](https://www.meetup.com/clickhouse-meetup-israel/events/303095121) - September 22
* [Jakarta Meetup](https://www.meetup.com/clickhouse-indonesia-user-group/events/303191359/) - October 1 * [Jakarta Meetup](https://www.meetup.com/clickhouse-indonesia-user-group/events/303191359/) - October 1
@ -62,13 +53,20 @@ Other upcoming meetups
* [Dubai Meetup](https://www.meetup.com/clickhouse-dubai-meetup-group/events/303096989/) - November 21 * [Dubai Meetup](https://www.meetup.com/clickhouse-dubai-meetup-group/events/303096989/) - November 21
* [Paris Meetup](https://www.meetup.com/clickhouse-france-user-group/events/303096434) - November 26 * [Paris Meetup](https://www.meetup.com/clickhouse-france-user-group/events/303096434) - November 26
Recently completed events Recently completed meetups
* [ClickHouse Guangzhou User Group Meetup](https://mp.weixin.qq.com/s/GSvo-7xUoVzCsuUvlLTpCw) - August 25 * [ClickHouse Guangzhou User Group Meetup](https://mp.weixin.qq.com/s/GSvo-7xUoVzCsuUvlLTpCw) - August 25
* [Seattle Meetup (Statsig)](https://www.meetup.com/clickhouse-seattle-user-group/events/302518075/) - August 27 * [Seattle Meetup (Statsig)](https://www.meetup.com/clickhouse-seattle-user-group/events/302518075/) - August 27
* [Melbourne Meetup](https://www.meetup.com/clickhouse-australia-user-group/events/302732666/) - August 27 * [Melbourne Meetup](https://www.meetup.com/clickhouse-australia-user-group/events/302732666/) - August 27
* [Sydney Meetup](https://www.meetup.com/clickhouse-australia-user-group/events/302862966/) - September 5 * [Sydney Meetup](https://www.meetup.com/clickhouse-australia-user-group/events/302862966/) - September 5
* [Zurich Meetup](https://www.meetup.com/clickhouse-switzerland-meetup-group/events/302267429/) - September 5 * [Zurich Meetup](https://www.meetup.com/clickhouse-switzerland-meetup-group/events/302267429/) - September 5
* [San Francisco Meetup (Cloudflare)](https://www.meetup.com/clickhouse-silicon-valley-meetup-group/events/302540575) - September 5 * [San Francisco Meetup (Cloudflare)](https://www.meetup.com/clickhouse-silicon-valley-meetup-group/events/302540575) - September 5
* [Raleigh Meetup (Deutsche Bank)](https://www.meetup.com/triangletechtalks/events/302723486/) - September 9
* [New York Meetup (Rokt)](https://www.meetup.com/clickhouse-new-york-user-group/events/302575342) - September 10
* [Toronto Meetup (Shopify)](https://www.meetup.com/clickhouse-toronto-user-group/events/301490855/) - September 10
* [Chicago Meetup (Jump Capital)](https://lu.ma/43tvmrfw) - September 12
* [London Meetup](https://www.meetup.com/clickhouse-london-user-group/events/302977267) - September 17
* [Austin Meetup](https://www.meetup.com/clickhouse-austin-user-group/events/302558689/) - September 17
## Recent Recordings ## Recent Recordings
* **Recent Meetup Videos**: [Meetup Playlist](https://www.youtube.com/playlist?list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U) Whenever possible recordings of the ClickHouse Community Meetups are edited and presented as individual talks. Current featuring "Modern SQL in 2023", "Fast, Concurrent, and Consistent Asynchronous INSERTS in ClickHouse", and "Full-Text Indices: Design and Experiments" * **Recent Meetup Videos**: [Meetup Playlist](https://www.youtube.com/playlist?list=PL0Z2YDlm0b3iNDUzpY1S3L_iV4nARda_U) Whenever possible recordings of the ClickHouse Community Meetups are edited and presented as individual talks. Current featuring "Modern SQL in 2023", "Fast, Concurrent, and Consistent Asynchronous INSERTS in ClickHouse", and "Full-Text Indices: Design and Experiments"

View File

@ -188,8 +188,9 @@ namespace Crypto
pFile = fopen(keyFile.c_str(), "r"); pFile = fopen(keyFile.c_str(), "r");
if (pFile) if (pFile)
{ {
pem_password_cb * pCB = pass.empty() ? (pem_password_cb *)0 : &passCB; pem_password_cb * pCB = &passCB;
void * pPassword = pass.empty() ? (void *)0 : (void *)pass.c_str(); static constexpr char * no_password = "";
void * pPassword = pass.empty() ? (void *)no_password : (void *)pass.c_str();
if (readFunc(pFile, &pKey, pCB, pPassword)) if (readFunc(pFile, &pKey, pCB, pPassword))
{ {
fclose(pFile); fclose(pFile);
@ -225,6 +226,13 @@ namespace Crypto
error: error:
if (pFile) if (pFile)
fclose(pFile); fclose(pFile);
if (*ppKey)
{
if constexpr (std::is_same_v<K, EVP_PKEY>)
EVP_PKEY_free(*ppKey);
else
EC_KEY_free(*ppKey);
}
throw OpenSSLException("EVPKey::loadKey(string)"); throw OpenSSLException("EVPKey::loadKey(string)");
} }
@ -286,6 +294,13 @@ namespace Crypto
error: error:
if (pBIO) if (pBIO)
BIO_free(pBIO); BIO_free(pBIO);
if (*ppKey)
{
if constexpr (std::is_same_v<K, EVP_PKEY>)
EVP_PKEY_free(*ppKey);
else
EC_KEY_free(*ppKey);
}
throw OpenSSLException("EVPKey::loadKey(stream)"); throw OpenSSLException("EVPKey::loadKey(stream)");
} }

View File

@ -248,6 +248,9 @@ namespace Net
SSL_CTX * sslContext() const; SSL_CTX * sslContext() const;
/// Returns the underlying OpenSSL SSL Context object. /// Returns the underlying OpenSSL SSL Context object.
SSL_CTX * takeSslContext();
/// Takes ownership of the underlying OpenSSL SSL Context object.
Usage usage() const; Usage usage() const;
/// Returns whether the context is for use by a client or by a server /// Returns whether the context is for use by a client or by a server
/// and whether TLSv1 is required. /// and whether TLSv1 is required.
@ -401,6 +404,13 @@ namespace Net
return _pSSLContext; return _pSSLContext;
} }
inline SSL_CTX * Context::takeSslContext()
{
auto * result = _pSSLContext;
_pSSLContext = nullptr;
return result;
}
inline bool Context::extendedCertificateVerificationEnabled() const inline bool Context::extendedCertificateVerificationEnabled() const
{ {

View File

@ -106,6 +106,11 @@ Context::Context(
Context::~Context() Context::~Context()
{ {
if (_pSSLContext == nullptr)
{
return;
}
try try
{ {
SSL_CTX_free(_pSSLContext); SSL_CTX_free(_pSSLContext);

View File

@ -145,8 +145,13 @@ add_contrib (isa-l-cmake isa-l)
add_contrib (libhdfs3-cmake libhdfs3) # requires: google-protobuf, krb5, isa-l add_contrib (libhdfs3-cmake libhdfs3) # requires: google-protobuf, krb5, isa-l
add_contrib (hive-metastore-cmake hive-metastore) # requires: thrift, avro, arrow, libhdfs3 add_contrib (hive-metastore-cmake hive-metastore) # requires: thrift, avro, arrow, libhdfs3
add_contrib (cppkafka-cmake cppkafka) add_contrib (cppkafka-cmake cppkafka)
add_contrib (libpqxx-cmake libpqxx)
add_contrib (libpq-cmake libpq) option(ENABLE_LIBPQXX "Enable PostgreSQL" ${ENABLE_LIBRARIES})
if (ENABLE_LIBPQXX)
add_contrib (postgres-cmake postgres)
add_contrib (libpqxx-cmake libpqxx)
endif()
add_contrib (rocksdb-cmake rocksdb) # requires: jemalloc, snappy, zlib, lz4, zstd, liburing add_contrib (rocksdb-cmake rocksdb) # requires: jemalloc, snappy, zlib, lz4, zstd, liburing
add_contrib (nuraft-cmake NuRaft) add_contrib (nuraft-cmake NuRaft)
add_contrib (fast_float-cmake fast_float) add_contrib (fast_float-cmake fast_float)

View File

@ -15,162 +15,64 @@ set(ICUDATA_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/icudata/")
# These lists of sources were generated from build log of the original ICU build system (configure + make). # These lists of sources were generated from build log of the original ICU build system (configure + make).
set(ICUUC_SOURCES set(ICUUC_SOURCES
"${ICU_SOURCE_DIR}/common/errorcode.cpp"
"${ICU_SOURCE_DIR}/common/putil.cpp"
"${ICU_SOURCE_DIR}/common/umath.cpp"
"${ICU_SOURCE_DIR}/common/utypes.cpp"
"${ICU_SOURCE_DIR}/common/uinvchar.cpp"
"${ICU_SOURCE_DIR}/common/umutex.cpp"
"${ICU_SOURCE_DIR}/common/ucln_cmn.cpp"
"${ICU_SOURCE_DIR}/common/uinit.cpp"
"${ICU_SOURCE_DIR}/common/uobject.cpp"
"${ICU_SOURCE_DIR}/common/cmemory.cpp"
"${ICU_SOURCE_DIR}/common/charstr.cpp"
"${ICU_SOURCE_DIR}/common/cstr.cpp"
"${ICU_SOURCE_DIR}/common/udata.cpp"
"${ICU_SOURCE_DIR}/common/ucmndata.cpp"
"${ICU_SOURCE_DIR}/common/udatamem.cpp"
"${ICU_SOURCE_DIR}/common/umapfile.cpp"
"${ICU_SOURCE_DIR}/common/udataswp.cpp"
"${ICU_SOURCE_DIR}/common/utrie_swap.cpp"
"${ICU_SOURCE_DIR}/common/ucol_swp.cpp"
"${ICU_SOURCE_DIR}/common/utrace.cpp"
"${ICU_SOURCE_DIR}/common/uhash.cpp"
"${ICU_SOURCE_DIR}/common/uhash_us.cpp"
"${ICU_SOURCE_DIR}/common/uenum.cpp"
"${ICU_SOURCE_DIR}/common/ustrenum.cpp"
"${ICU_SOURCE_DIR}/common/uvector.cpp"
"${ICU_SOURCE_DIR}/common/ustack.cpp"
"${ICU_SOURCE_DIR}/common/uvectr32.cpp"
"${ICU_SOURCE_DIR}/common/uvectr64.cpp"
"${ICU_SOURCE_DIR}/common/ucnv.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_bld.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_cnv.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_io.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_cb.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_err.cpp"
"${ICU_SOURCE_DIR}/common/ucnvlat1.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_u7.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_u8.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_u16.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_u32.cpp"
"${ICU_SOURCE_DIR}/common/ucnvscsu.cpp"
"${ICU_SOURCE_DIR}/common/ucnvbocu.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_ext.cpp"
"${ICU_SOURCE_DIR}/common/ucnvmbcs.cpp"
"${ICU_SOURCE_DIR}/common/ucnv2022.cpp"
"${ICU_SOURCE_DIR}/common/ucnvhz.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_lmb.cpp"
"${ICU_SOURCE_DIR}/common/ucnvisci.cpp"
"${ICU_SOURCE_DIR}/common/ucnvdisp.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_set.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_ct.cpp"
"${ICU_SOURCE_DIR}/common/resource.cpp"
"${ICU_SOURCE_DIR}/common/uresbund.cpp"
"${ICU_SOURCE_DIR}/common/ures_cnv.cpp"
"${ICU_SOURCE_DIR}/common/uresdata.cpp"
"${ICU_SOURCE_DIR}/common/resbund.cpp"
"${ICU_SOURCE_DIR}/common/resbund_cnv.cpp"
"${ICU_SOURCE_DIR}/common/ucurr.cpp"
"${ICU_SOURCE_DIR}/common/localebuilder.cpp"
"${ICU_SOURCE_DIR}/common/localeprioritylist.cpp"
"${ICU_SOURCE_DIR}/common/messagepattern.cpp"
"${ICU_SOURCE_DIR}/common/ucat.cpp"
"${ICU_SOURCE_DIR}/common/locmap.cpp"
"${ICU_SOURCE_DIR}/common/uloc.cpp"
"${ICU_SOURCE_DIR}/common/locid.cpp"
"${ICU_SOURCE_DIR}/common/locutil.cpp"
"${ICU_SOURCE_DIR}/common/locavailable.cpp"
"${ICU_SOURCE_DIR}/common/locdispnames.cpp"
"${ICU_SOURCE_DIR}/common/locdspnm.cpp"
"${ICU_SOURCE_DIR}/common/loclikely.cpp"
"${ICU_SOURCE_DIR}/common/locresdata.cpp"
"${ICU_SOURCE_DIR}/common/lsr.cpp"
"${ICU_SOURCE_DIR}/common/loclikelysubtags.cpp"
"${ICU_SOURCE_DIR}/common/locdistance.cpp"
"${ICU_SOURCE_DIR}/common/localematcher.cpp"
"${ICU_SOURCE_DIR}/common/bytestream.cpp"
"${ICU_SOURCE_DIR}/common/stringpiece.cpp"
"${ICU_SOURCE_DIR}/common/bytesinkutil.cpp"
"${ICU_SOURCE_DIR}/common/stringtriebuilder.cpp"
"${ICU_SOURCE_DIR}/common/bytestriebuilder.cpp"
"${ICU_SOURCE_DIR}/common/bytestrie.cpp"
"${ICU_SOURCE_DIR}/common/bytestrieiterator.cpp"
"${ICU_SOURCE_DIR}/common/ucharstrie.cpp"
"${ICU_SOURCE_DIR}/common/ucharstriebuilder.cpp"
"${ICU_SOURCE_DIR}/common/ucharstrieiterator.cpp"
"${ICU_SOURCE_DIR}/common/dictionarydata.cpp"
"${ICU_SOURCE_DIR}/common/edits.cpp"
"${ICU_SOURCE_DIR}/common/appendable.cpp" "${ICU_SOURCE_DIR}/common/appendable.cpp"
"${ICU_SOURCE_DIR}/common/ustr_cnv.cpp"
"${ICU_SOURCE_DIR}/common/unistr_cnv.cpp"
"${ICU_SOURCE_DIR}/common/unistr.cpp"
"${ICU_SOURCE_DIR}/common/unistr_case.cpp"
"${ICU_SOURCE_DIR}/common/unistr_props.cpp"
"${ICU_SOURCE_DIR}/common/utf_impl.cpp"
"${ICU_SOURCE_DIR}/common/ustring.cpp"
"${ICU_SOURCE_DIR}/common/ustrcase.cpp"
"${ICU_SOURCE_DIR}/common/ucasemap.cpp"
"${ICU_SOURCE_DIR}/common/ucasemap_titlecase_brkiter.cpp"
"${ICU_SOURCE_DIR}/common/cstring.cpp"
"${ICU_SOURCE_DIR}/common/ustrfmt.cpp"
"${ICU_SOURCE_DIR}/common/ustrtrns.cpp"
"${ICU_SOURCE_DIR}/common/ustr_wcs.cpp"
"${ICU_SOURCE_DIR}/common/utext.cpp"
"${ICU_SOURCE_DIR}/common/unistr_case_locale.cpp"
"${ICU_SOURCE_DIR}/common/ustrcase_locale.cpp"
"${ICU_SOURCE_DIR}/common/unistr_titlecase_brkiter.cpp"
"${ICU_SOURCE_DIR}/common/ustr_titlecase_brkiter.cpp"
"${ICU_SOURCE_DIR}/common/normalizer2impl.cpp"
"${ICU_SOURCE_DIR}/common/normalizer2.cpp"
"${ICU_SOURCE_DIR}/common/filterednormalizer2.cpp"
"${ICU_SOURCE_DIR}/common/normlzr.cpp"
"${ICU_SOURCE_DIR}/common/unorm.cpp"
"${ICU_SOURCE_DIR}/common/unormcmp.cpp"
"${ICU_SOURCE_DIR}/common/loadednormalizer2impl.cpp"
"${ICU_SOURCE_DIR}/common/chariter.cpp"
"${ICU_SOURCE_DIR}/common/schriter.cpp"
"${ICU_SOURCE_DIR}/common/uchriter.cpp"
"${ICU_SOURCE_DIR}/common/uiter.cpp"
"${ICU_SOURCE_DIR}/common/patternprops.cpp"
"${ICU_SOURCE_DIR}/common/uchar.cpp"
"${ICU_SOURCE_DIR}/common/uprops.cpp"
"${ICU_SOURCE_DIR}/common/ucase.cpp"
"${ICU_SOURCE_DIR}/common/propname.cpp"
"${ICU_SOURCE_DIR}/common/ubidi_props.cpp"
"${ICU_SOURCE_DIR}/common/characterproperties.cpp"
"${ICU_SOURCE_DIR}/common/ubidi.cpp"
"${ICU_SOURCE_DIR}/common/ubidiwrt.cpp"
"${ICU_SOURCE_DIR}/common/ubidiln.cpp"
"${ICU_SOURCE_DIR}/common/ushape.cpp"
"${ICU_SOURCE_DIR}/common/uscript.cpp"
"${ICU_SOURCE_DIR}/common/uscript_props.cpp"
"${ICU_SOURCE_DIR}/common/usc_impl.cpp"
"${ICU_SOURCE_DIR}/common/unames.cpp"
"${ICU_SOURCE_DIR}/common/utrie.cpp"
"${ICU_SOURCE_DIR}/common/utrie2.cpp"
"${ICU_SOURCE_DIR}/common/utrie2_builder.cpp"
"${ICU_SOURCE_DIR}/common/ucptrie.cpp"
"${ICU_SOURCE_DIR}/common/umutablecptrie.cpp"
"${ICU_SOURCE_DIR}/common/bmpset.cpp" "${ICU_SOURCE_DIR}/common/bmpset.cpp"
"${ICU_SOURCE_DIR}/common/unisetspan.cpp"
"${ICU_SOURCE_DIR}/common/uset_props.cpp"
"${ICU_SOURCE_DIR}/common/uniset_props.cpp"
"${ICU_SOURCE_DIR}/common/uniset_closure.cpp"
"${ICU_SOURCE_DIR}/common/uset.cpp"
"${ICU_SOURCE_DIR}/common/uniset.cpp"
"${ICU_SOURCE_DIR}/common/usetiter.cpp"
"${ICU_SOURCE_DIR}/common/ruleiter.cpp"
"${ICU_SOURCE_DIR}/common/caniter.cpp"
"${ICU_SOURCE_DIR}/common/unifilt.cpp"
"${ICU_SOURCE_DIR}/common/unifunct.cpp"
"${ICU_SOURCE_DIR}/common/uarrsort.cpp"
"${ICU_SOURCE_DIR}/common/brkiter.cpp"
"${ICU_SOURCE_DIR}/common/ubrk.cpp"
"${ICU_SOURCE_DIR}/common/brkeng.cpp" "${ICU_SOURCE_DIR}/common/brkeng.cpp"
"${ICU_SOURCE_DIR}/common/brkiter.cpp"
"${ICU_SOURCE_DIR}/common/bytesinkutil.cpp"
"${ICU_SOURCE_DIR}/common/bytestream.cpp"
"${ICU_SOURCE_DIR}/common/bytestrie.cpp"
"${ICU_SOURCE_DIR}/common/bytestriebuilder.cpp"
"${ICU_SOURCE_DIR}/common/bytestrieiterator.cpp"
"${ICU_SOURCE_DIR}/common/caniter.cpp"
"${ICU_SOURCE_DIR}/common/characterproperties.cpp"
"${ICU_SOURCE_DIR}/common/chariter.cpp"
"${ICU_SOURCE_DIR}/common/charstr.cpp"
"${ICU_SOURCE_DIR}/common/cmemory.cpp"
"${ICU_SOURCE_DIR}/common/cstr.cpp"
"${ICU_SOURCE_DIR}/common/cstring.cpp"
"${ICU_SOURCE_DIR}/common/cwchar.cpp"
"${ICU_SOURCE_DIR}/common/dictbe.cpp" "${ICU_SOURCE_DIR}/common/dictbe.cpp"
"${ICU_SOURCE_DIR}/common/dictionarydata.cpp"
"${ICU_SOURCE_DIR}/common/dtintrv.cpp"
"${ICU_SOURCE_DIR}/common/edits.cpp"
"${ICU_SOURCE_DIR}/common/emojiprops.cpp"
"${ICU_SOURCE_DIR}/common/errorcode.cpp"
"${ICU_SOURCE_DIR}/common/filteredbrk.cpp" "${ICU_SOURCE_DIR}/common/filteredbrk.cpp"
"${ICU_SOURCE_DIR}/common/filterednormalizer2.cpp"
"${ICU_SOURCE_DIR}/common/icudataver.cpp"
"${ICU_SOURCE_DIR}/common/icuplug.cpp"
"${ICU_SOURCE_DIR}/common/loadednormalizer2impl.cpp"
"${ICU_SOURCE_DIR}/common/localebuilder.cpp"
"${ICU_SOURCE_DIR}/common/localematcher.cpp"
"${ICU_SOURCE_DIR}/common/localeprioritylist.cpp"
"${ICU_SOURCE_DIR}/common/locavailable.cpp"
"${ICU_SOURCE_DIR}/common/locbased.cpp"
"${ICU_SOURCE_DIR}/common/locdispnames.cpp"
"${ICU_SOURCE_DIR}/common/locdistance.cpp"
"${ICU_SOURCE_DIR}/common/locdspnm.cpp"
"${ICU_SOURCE_DIR}/common/locid.cpp"
"${ICU_SOURCE_DIR}/common/loclikely.cpp"
"${ICU_SOURCE_DIR}/common/loclikelysubtags.cpp"
"${ICU_SOURCE_DIR}/common/locmap.cpp"
"${ICU_SOURCE_DIR}/common/locresdata.cpp"
"${ICU_SOURCE_DIR}/common/locutil.cpp"
"${ICU_SOURCE_DIR}/common/lsr.cpp"
"${ICU_SOURCE_DIR}/common/lstmbe.cpp"
"${ICU_SOURCE_DIR}/common/messagepattern.cpp"
"${ICU_SOURCE_DIR}/common/mlbe.cpp"
"${ICU_SOURCE_DIR}/common/normalizer2.cpp"
"${ICU_SOURCE_DIR}/common/normalizer2impl.cpp"
"${ICU_SOURCE_DIR}/common/normlzr.cpp"
"${ICU_SOURCE_DIR}/common/parsepos.cpp"
"${ICU_SOURCE_DIR}/common/patternprops.cpp"
"${ICU_SOURCE_DIR}/common/pluralmap.cpp"
"${ICU_SOURCE_DIR}/common/propname.cpp"
"${ICU_SOURCE_DIR}/common/propsvec.cpp"
"${ICU_SOURCE_DIR}/common/punycode.cpp"
"${ICU_SOURCE_DIR}/common/putil.cpp"
"${ICU_SOURCE_DIR}/common/rbbi.cpp" "${ICU_SOURCE_DIR}/common/rbbi.cpp"
"${ICU_SOURCE_DIR}/common/rbbi_cache.cpp"
"${ICU_SOURCE_DIR}/common/rbbidata.cpp" "${ICU_SOURCE_DIR}/common/rbbidata.cpp"
"${ICU_SOURCE_DIR}/common/rbbinode.cpp" "${ICU_SOURCE_DIR}/common/rbbinode.cpp"
"${ICU_SOURCE_DIR}/common/rbbirb.cpp" "${ICU_SOURCE_DIR}/common/rbbirb.cpp"
@ -178,166 +80,180 @@ set(ICUUC_SOURCES
"${ICU_SOURCE_DIR}/common/rbbisetb.cpp" "${ICU_SOURCE_DIR}/common/rbbisetb.cpp"
"${ICU_SOURCE_DIR}/common/rbbistbl.cpp" "${ICU_SOURCE_DIR}/common/rbbistbl.cpp"
"${ICU_SOURCE_DIR}/common/rbbitblb.cpp" "${ICU_SOURCE_DIR}/common/rbbitblb.cpp"
"${ICU_SOURCE_DIR}/common/rbbi_cache.cpp" "${ICU_SOURCE_DIR}/common/resbund.cpp"
"${ICU_SOURCE_DIR}/common/resbund_cnv.cpp"
"${ICU_SOURCE_DIR}/common/resource.cpp"
"${ICU_SOURCE_DIR}/common/restrace.cpp"
"${ICU_SOURCE_DIR}/common/ruleiter.cpp"
"${ICU_SOURCE_DIR}/common/schriter.cpp"
"${ICU_SOURCE_DIR}/common/serv.cpp" "${ICU_SOURCE_DIR}/common/serv.cpp"
"${ICU_SOURCE_DIR}/common/servnotf.cpp"
"${ICU_SOURCE_DIR}/common/servls.cpp"
"${ICU_SOURCE_DIR}/common/servlk.cpp" "${ICU_SOURCE_DIR}/common/servlk.cpp"
"${ICU_SOURCE_DIR}/common/servlkf.cpp" "${ICU_SOURCE_DIR}/common/servlkf.cpp"
"${ICU_SOURCE_DIR}/common/servls.cpp"
"${ICU_SOURCE_DIR}/common/servnotf.cpp"
"${ICU_SOURCE_DIR}/common/servrbf.cpp" "${ICU_SOURCE_DIR}/common/servrbf.cpp"
"${ICU_SOURCE_DIR}/common/servslkf.cpp" "${ICU_SOURCE_DIR}/common/servslkf.cpp"
"${ICU_SOURCE_DIR}/common/uidna.cpp"
"${ICU_SOURCE_DIR}/common/usprep.cpp"
"${ICU_SOURCE_DIR}/common/uts46.cpp"
"${ICU_SOURCE_DIR}/common/punycode.cpp"
"${ICU_SOURCE_DIR}/common/util.cpp"
"${ICU_SOURCE_DIR}/common/util_props.cpp"
"${ICU_SOURCE_DIR}/common/parsepos.cpp"
"${ICU_SOURCE_DIR}/common/locbased.cpp"
"${ICU_SOURCE_DIR}/common/cwchar.cpp"
"${ICU_SOURCE_DIR}/common/wintz.cpp"
"${ICU_SOURCE_DIR}/common/dtintrv.cpp"
"${ICU_SOURCE_DIR}/common/ucnvsel.cpp"
"${ICU_SOURCE_DIR}/common/propsvec.cpp"
"${ICU_SOURCE_DIR}/common/ulist.cpp"
"${ICU_SOURCE_DIR}/common/uloc_tag.cpp"
"${ICU_SOURCE_DIR}/common/icudataver.cpp"
"${ICU_SOURCE_DIR}/common/icuplug.cpp"
"${ICU_SOURCE_DIR}/common/sharedobject.cpp" "${ICU_SOURCE_DIR}/common/sharedobject.cpp"
"${ICU_SOURCE_DIR}/common/simpleformatter.cpp" "${ICU_SOURCE_DIR}/common/simpleformatter.cpp"
"${ICU_SOURCE_DIR}/common/unifiedcache.cpp"
"${ICU_SOURCE_DIR}/common/uloc_keytype.cpp"
"${ICU_SOURCE_DIR}/common/ubiditransform.cpp"
"${ICU_SOURCE_DIR}/common/pluralmap.cpp"
"${ICU_SOURCE_DIR}/common/static_unicode_sets.cpp" "${ICU_SOURCE_DIR}/common/static_unicode_sets.cpp"
"${ICU_SOURCE_DIR}/common/restrace.cpp" "${ICU_SOURCE_DIR}/common/stringpiece.cpp"
"${ICU_SOURCE_DIR}/common/emojiprops.cpp" "${ICU_SOURCE_DIR}/common/stringtriebuilder.cpp"
"${ICU_SOURCE_DIR}/common/lstmbe.cpp") "${ICU_SOURCE_DIR}/common/uarrsort.cpp"
"${ICU_SOURCE_DIR}/common/ubidi.cpp"
"${ICU_SOURCE_DIR}/common/ubidi_props.cpp"
"${ICU_SOURCE_DIR}/common/ubidiln.cpp"
"${ICU_SOURCE_DIR}/common/ubiditransform.cpp"
"${ICU_SOURCE_DIR}/common/ubidiwrt.cpp"
"${ICU_SOURCE_DIR}/common/ubrk.cpp"
"${ICU_SOURCE_DIR}/common/ucase.cpp"
"${ICU_SOURCE_DIR}/common/ucasemap.cpp"
"${ICU_SOURCE_DIR}/common/ucasemap_titlecase_brkiter.cpp"
"${ICU_SOURCE_DIR}/common/ucat.cpp"
"${ICU_SOURCE_DIR}/common/uchar.cpp"
"${ICU_SOURCE_DIR}/common/ucharstrie.cpp"
"${ICU_SOURCE_DIR}/common/ucharstriebuilder.cpp"
"${ICU_SOURCE_DIR}/common/ucharstrieiterator.cpp"
"${ICU_SOURCE_DIR}/common/uchriter.cpp"
"${ICU_SOURCE_DIR}/common/ucln_cmn.cpp"
"${ICU_SOURCE_DIR}/common/ucmndata.cpp"
"${ICU_SOURCE_DIR}/common/ucnv.cpp"
"${ICU_SOURCE_DIR}/common/ucnv2022.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_bld.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_cb.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_cnv.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_ct.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_err.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_ext.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_io.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_lmb.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_set.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_u16.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_u32.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_u7.cpp"
"${ICU_SOURCE_DIR}/common/ucnv_u8.cpp"
"${ICU_SOURCE_DIR}/common/ucnvbocu.cpp"
"${ICU_SOURCE_DIR}/common/ucnvdisp.cpp"
"${ICU_SOURCE_DIR}/common/ucnvhz.cpp"
"${ICU_SOURCE_DIR}/common/ucnvisci.cpp"
"${ICU_SOURCE_DIR}/common/ucnvlat1.cpp"
"${ICU_SOURCE_DIR}/common/ucnvmbcs.cpp"
"${ICU_SOURCE_DIR}/common/ucnvscsu.cpp"
"${ICU_SOURCE_DIR}/common/ucnvsel.cpp"
"${ICU_SOURCE_DIR}/common/ucol_swp.cpp"
"${ICU_SOURCE_DIR}/common/ucptrie.cpp"
"${ICU_SOURCE_DIR}/common/ucurr.cpp"
"${ICU_SOURCE_DIR}/common/udata.cpp"
"${ICU_SOURCE_DIR}/common/udatamem.cpp"
"${ICU_SOURCE_DIR}/common/udataswp.cpp"
"${ICU_SOURCE_DIR}/common/uenum.cpp"
"${ICU_SOURCE_DIR}/common/uhash.cpp"
"${ICU_SOURCE_DIR}/common/uhash_us.cpp"
"${ICU_SOURCE_DIR}/common/uidna.cpp"
"${ICU_SOURCE_DIR}/common/uinit.cpp"
"${ICU_SOURCE_DIR}/common/uinvchar.cpp"
"${ICU_SOURCE_DIR}/common/uiter.cpp"
"${ICU_SOURCE_DIR}/common/ulist.cpp"
"${ICU_SOURCE_DIR}/common/uloc.cpp"
"${ICU_SOURCE_DIR}/common/uloc_keytype.cpp"
"${ICU_SOURCE_DIR}/common/uloc_tag.cpp"
"${ICU_SOURCE_DIR}/common/ulocale.cpp"
"${ICU_SOURCE_DIR}/common/ulocbuilder.cpp"
"${ICU_SOURCE_DIR}/common/umapfile.cpp"
"${ICU_SOURCE_DIR}/common/umath.cpp"
"${ICU_SOURCE_DIR}/common/umutablecptrie.cpp"
"${ICU_SOURCE_DIR}/common/umutex.cpp"
"${ICU_SOURCE_DIR}/common/unames.cpp"
"${ICU_SOURCE_DIR}/common/unifiedcache.cpp"
"${ICU_SOURCE_DIR}/common/unifilt.cpp"
"${ICU_SOURCE_DIR}/common/unifunct.cpp"
"${ICU_SOURCE_DIR}/common/uniset.cpp"
"${ICU_SOURCE_DIR}/common/uniset_closure.cpp"
"${ICU_SOURCE_DIR}/common/uniset_props.cpp"
"${ICU_SOURCE_DIR}/common/unisetspan.cpp"
"${ICU_SOURCE_DIR}/common/unistr.cpp"
"${ICU_SOURCE_DIR}/common/unistr_case.cpp"
"${ICU_SOURCE_DIR}/common/unistr_case_locale.cpp"
"${ICU_SOURCE_DIR}/common/unistr_cnv.cpp"
"${ICU_SOURCE_DIR}/common/unistr_props.cpp"
"${ICU_SOURCE_DIR}/common/unistr_titlecase_brkiter.cpp"
"${ICU_SOURCE_DIR}/common/unorm.cpp"
"${ICU_SOURCE_DIR}/common/unormcmp.cpp"
"${ICU_SOURCE_DIR}/common/uobject.cpp"
"${ICU_SOURCE_DIR}/common/uprops.cpp"
"${ICU_SOURCE_DIR}/common/ures_cnv.cpp"
"${ICU_SOURCE_DIR}/common/uresbund.cpp"
"${ICU_SOURCE_DIR}/common/uresdata.cpp"
"${ICU_SOURCE_DIR}/common/usc_impl.cpp"
"${ICU_SOURCE_DIR}/common/uscript.cpp"
"${ICU_SOURCE_DIR}/common/uscript_props.cpp"
"${ICU_SOURCE_DIR}/common/uset.cpp"
"${ICU_SOURCE_DIR}/common/uset_props.cpp"
"${ICU_SOURCE_DIR}/common/usetiter.cpp"
"${ICU_SOURCE_DIR}/common/ushape.cpp"
"${ICU_SOURCE_DIR}/common/usprep.cpp"
"${ICU_SOURCE_DIR}/common/ustack.cpp"
"${ICU_SOURCE_DIR}/common/ustr_cnv.cpp"
"${ICU_SOURCE_DIR}/common/ustr_titlecase_brkiter.cpp"
"${ICU_SOURCE_DIR}/common/ustr_wcs.cpp"
"${ICU_SOURCE_DIR}/common/ustrcase.cpp"
"${ICU_SOURCE_DIR}/common/ustrcase_locale.cpp"
"${ICU_SOURCE_DIR}/common/ustrenum.cpp"
"${ICU_SOURCE_DIR}/common/ustrfmt.cpp"
"${ICU_SOURCE_DIR}/common/ustring.cpp"
"${ICU_SOURCE_DIR}/common/ustrtrns.cpp"
"${ICU_SOURCE_DIR}/common/utext.cpp"
"${ICU_SOURCE_DIR}/common/utf_impl.cpp"
"${ICU_SOURCE_DIR}/common/util.cpp"
"${ICU_SOURCE_DIR}/common/util_props.cpp"
"${ICU_SOURCE_DIR}/common/utrace.cpp"
"${ICU_SOURCE_DIR}/common/utrie.cpp"
"${ICU_SOURCE_DIR}/common/utrie2.cpp"
"${ICU_SOURCE_DIR}/common/utrie2_builder.cpp"
"${ICU_SOURCE_DIR}/common/utrie_swap.cpp"
"${ICU_SOURCE_DIR}/common/uts46.cpp"
"${ICU_SOURCE_DIR}/common/utypes.cpp"
"${ICU_SOURCE_DIR}/common/uvector.cpp"
"${ICU_SOURCE_DIR}/common/uvectr32.cpp"
"${ICU_SOURCE_DIR}/common/uvectr64.cpp"
"${ICU_SOURCE_DIR}/common/wintz.cpp")
set(ICUI18N_SOURCES set(ICUI18N_SOURCES
"${ICU_SOURCE_DIR}/i18n/ucln_in.cpp" "${ICU_SOURCE_DIR}/i18n/alphaindex.cpp"
"${ICU_SOURCE_DIR}/i18n/fmtable.cpp" "${ICU_SOURCE_DIR}/i18n/anytrans.cpp"
"${ICU_SOURCE_DIR}/i18n/format.cpp"
"${ICU_SOURCE_DIR}/i18n/msgfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/umsg.cpp"
"${ICU_SOURCE_DIR}/i18n/numfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/unum.cpp"
"${ICU_SOURCE_DIR}/i18n/decimfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/dcfmtsym.cpp"
"${ICU_SOURCE_DIR}/i18n/fmtable_cnv.cpp"
"${ICU_SOURCE_DIR}/i18n/choicfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/datefmt.cpp"
"${ICU_SOURCE_DIR}/i18n/smpdtfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/reldtfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/dtfmtsym.cpp"
"${ICU_SOURCE_DIR}/i18n/udat.cpp"
"${ICU_SOURCE_DIR}/i18n/dtptngen.cpp"
"${ICU_SOURCE_DIR}/i18n/udatpg.cpp"
"${ICU_SOURCE_DIR}/i18n/nfrs.cpp"
"${ICU_SOURCE_DIR}/i18n/nfrule.cpp"
"${ICU_SOURCE_DIR}/i18n/nfsubs.cpp"
"${ICU_SOURCE_DIR}/i18n/rbnf.cpp"
"${ICU_SOURCE_DIR}/i18n/numsys.cpp"
"${ICU_SOURCE_DIR}/i18n/unumsys.cpp"
"${ICU_SOURCE_DIR}/i18n/ucsdet.cpp"
"${ICU_SOURCE_DIR}/i18n/ucal.cpp"
"${ICU_SOURCE_DIR}/i18n/calendar.cpp"
"${ICU_SOURCE_DIR}/i18n/gregocal.cpp"
"${ICU_SOURCE_DIR}/i18n/timezone.cpp"
"${ICU_SOURCE_DIR}/i18n/simpletz.cpp"
"${ICU_SOURCE_DIR}/i18n/olsontz.cpp"
"${ICU_SOURCE_DIR}/i18n/astro.cpp" "${ICU_SOURCE_DIR}/i18n/astro.cpp"
"${ICU_SOURCE_DIR}/i18n/taiwncal.cpp" "${ICU_SOURCE_DIR}/i18n/basictz.cpp"
"${ICU_SOURCE_DIR}/i18n/bocsu.cpp"
"${ICU_SOURCE_DIR}/i18n/brktrans.cpp"
"${ICU_SOURCE_DIR}/i18n/buddhcal.cpp" "${ICU_SOURCE_DIR}/i18n/buddhcal.cpp"
"${ICU_SOURCE_DIR}/i18n/persncal.cpp" "${ICU_SOURCE_DIR}/i18n/calendar.cpp"
"${ICU_SOURCE_DIR}/i18n/islamcal.cpp" "${ICU_SOURCE_DIR}/i18n/casetrn.cpp"
"${ICU_SOURCE_DIR}/i18n/japancal.cpp"
"${ICU_SOURCE_DIR}/i18n/gregoimp.cpp"
"${ICU_SOURCE_DIR}/i18n/hebrwcal.cpp"
"${ICU_SOURCE_DIR}/i18n/indiancal.cpp"
"${ICU_SOURCE_DIR}/i18n/chnsecal.cpp"
"${ICU_SOURCE_DIR}/i18n/cecal.cpp" "${ICU_SOURCE_DIR}/i18n/cecal.cpp"
"${ICU_SOURCE_DIR}/i18n/coptccal.cpp" "${ICU_SOURCE_DIR}/i18n/chnsecal.cpp"
"${ICU_SOURCE_DIR}/i18n/dangical.cpp" "${ICU_SOURCE_DIR}/i18n/choicfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/ethpccal.cpp"
"${ICU_SOURCE_DIR}/i18n/coleitr.cpp" "${ICU_SOURCE_DIR}/i18n/coleitr.cpp"
"${ICU_SOURCE_DIR}/i18n/coll.cpp" "${ICU_SOURCE_DIR}/i18n/coll.cpp"
"${ICU_SOURCE_DIR}/i18n/sortkey.cpp"
"${ICU_SOURCE_DIR}/i18n/bocsu.cpp"
"${ICU_SOURCE_DIR}/i18n/ucoleitr.cpp"
"${ICU_SOURCE_DIR}/i18n/ucol.cpp"
"${ICU_SOURCE_DIR}/i18n/ucol_res.cpp"
"${ICU_SOURCE_DIR}/i18n/ucol_sit.cpp"
"${ICU_SOURCE_DIR}/i18n/collation.cpp" "${ICU_SOURCE_DIR}/i18n/collation.cpp"
"${ICU_SOURCE_DIR}/i18n/collationsettings.cpp" "${ICU_SOURCE_DIR}/i18n/collationbuilder.cpp"
"${ICU_SOURCE_DIR}/i18n/collationcompare.cpp"
"${ICU_SOURCE_DIR}/i18n/collationdata.cpp" "${ICU_SOURCE_DIR}/i18n/collationdata.cpp"
"${ICU_SOURCE_DIR}/i18n/collationtailoring.cpp" "${ICU_SOURCE_DIR}/i18n/collationdatabuilder.cpp"
"${ICU_SOURCE_DIR}/i18n/collationdatareader.cpp" "${ICU_SOURCE_DIR}/i18n/collationdatareader.cpp"
"${ICU_SOURCE_DIR}/i18n/collationdatawriter.cpp" "${ICU_SOURCE_DIR}/i18n/collationdatawriter.cpp"
"${ICU_SOURCE_DIR}/i18n/collationfastlatin.cpp"
"${ICU_SOURCE_DIR}/i18n/collationfastlatinbuilder.cpp"
"${ICU_SOURCE_DIR}/i18n/collationfcd.cpp" "${ICU_SOURCE_DIR}/i18n/collationfcd.cpp"
"${ICU_SOURCE_DIR}/i18n/collationiterator.cpp" "${ICU_SOURCE_DIR}/i18n/collationiterator.cpp"
"${ICU_SOURCE_DIR}/i18n/utf16collationiterator.cpp"
"${ICU_SOURCE_DIR}/i18n/utf8collationiterator.cpp"
"${ICU_SOURCE_DIR}/i18n/uitercollationiterator.cpp"
"${ICU_SOURCE_DIR}/i18n/collationsets.cpp"
"${ICU_SOURCE_DIR}/i18n/collationcompare.cpp"
"${ICU_SOURCE_DIR}/i18n/collationfastlatin.cpp"
"${ICU_SOURCE_DIR}/i18n/collationkeys.cpp" "${ICU_SOURCE_DIR}/i18n/collationkeys.cpp"
"${ICU_SOURCE_DIR}/i18n/rulebasedcollator.cpp"
"${ICU_SOURCE_DIR}/i18n/collationroot.cpp" "${ICU_SOURCE_DIR}/i18n/collationroot.cpp"
"${ICU_SOURCE_DIR}/i18n/collationrootelements.cpp" "${ICU_SOURCE_DIR}/i18n/collationrootelements.cpp"
"${ICU_SOURCE_DIR}/i18n/collationdatabuilder.cpp"
"${ICU_SOURCE_DIR}/i18n/collationweights.cpp"
"${ICU_SOURCE_DIR}/i18n/collationruleparser.cpp" "${ICU_SOURCE_DIR}/i18n/collationruleparser.cpp"
"${ICU_SOURCE_DIR}/i18n/collationbuilder.cpp" "${ICU_SOURCE_DIR}/i18n/collationsets.cpp"
"${ICU_SOURCE_DIR}/i18n/collationfastlatinbuilder.cpp" "${ICU_SOURCE_DIR}/i18n/collationsettings.cpp"
"${ICU_SOURCE_DIR}/i18n/listformatter.cpp" "${ICU_SOURCE_DIR}/i18n/collationtailoring.cpp"
"${ICU_SOURCE_DIR}/i18n/ulistformatter.cpp" "${ICU_SOURCE_DIR}/i18n/collationweights.cpp"
"${ICU_SOURCE_DIR}/i18n/strmatch.cpp" "${ICU_SOURCE_DIR}/i18n/compactdecimalformat.cpp"
"${ICU_SOURCE_DIR}/i18n/usearch.cpp" "${ICU_SOURCE_DIR}/i18n/coptccal.cpp"
"${ICU_SOURCE_DIR}/i18n/search.cpp"
"${ICU_SOURCE_DIR}/i18n/stsearch.cpp"
"${ICU_SOURCE_DIR}/i18n/translit.cpp"
"${ICU_SOURCE_DIR}/i18n/utrans.cpp"
"${ICU_SOURCE_DIR}/i18n/esctrn.cpp"
"${ICU_SOURCE_DIR}/i18n/unesctrn.cpp"
"${ICU_SOURCE_DIR}/i18n/funcrepl.cpp"
"${ICU_SOURCE_DIR}/i18n/strrepl.cpp"
"${ICU_SOURCE_DIR}/i18n/tridpars.cpp"
"${ICU_SOURCE_DIR}/i18n/cpdtrans.cpp" "${ICU_SOURCE_DIR}/i18n/cpdtrans.cpp"
"${ICU_SOURCE_DIR}/i18n/rbt.cpp"
"${ICU_SOURCE_DIR}/i18n/rbt_data.cpp"
"${ICU_SOURCE_DIR}/i18n/rbt_pars.cpp"
"${ICU_SOURCE_DIR}/i18n/rbt_rule.cpp"
"${ICU_SOURCE_DIR}/i18n/rbt_set.cpp"
"${ICU_SOURCE_DIR}/i18n/nultrans.cpp"
"${ICU_SOURCE_DIR}/i18n/remtrans.cpp"
"${ICU_SOURCE_DIR}/i18n/casetrn.cpp"
"${ICU_SOURCE_DIR}/i18n/titletrn.cpp"
"${ICU_SOURCE_DIR}/i18n/tolowtrn.cpp"
"${ICU_SOURCE_DIR}/i18n/toupptrn.cpp"
"${ICU_SOURCE_DIR}/i18n/anytrans.cpp"
"${ICU_SOURCE_DIR}/i18n/name2uni.cpp"
"${ICU_SOURCE_DIR}/i18n/uni2name.cpp"
"${ICU_SOURCE_DIR}/i18n/nortrans.cpp"
"${ICU_SOURCE_DIR}/i18n/quant.cpp"
"${ICU_SOURCE_DIR}/i18n/transreg.cpp"
"${ICU_SOURCE_DIR}/i18n/brktrans.cpp"
"${ICU_SOURCE_DIR}/i18n/regexcmp.cpp"
"${ICU_SOURCE_DIR}/i18n/rematch.cpp"
"${ICU_SOURCE_DIR}/i18n/repattrn.cpp"
"${ICU_SOURCE_DIR}/i18n/regexst.cpp"
"${ICU_SOURCE_DIR}/i18n/regextxt.cpp"
"${ICU_SOURCE_DIR}/i18n/regeximp.cpp"
"${ICU_SOURCE_DIR}/i18n/uregex.cpp"
"${ICU_SOURCE_DIR}/i18n/uregexc.cpp"
"${ICU_SOURCE_DIR}/i18n/ulocdata.cpp"
"${ICU_SOURCE_DIR}/i18n/measfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/currfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/curramt.cpp"
"${ICU_SOURCE_DIR}/i18n/currunit.cpp"
"${ICU_SOURCE_DIR}/i18n/measure.cpp"
"${ICU_SOURCE_DIR}/i18n/utmscale.cpp"
"${ICU_SOURCE_DIR}/i18n/csdetect.cpp" "${ICU_SOURCE_DIR}/i18n/csdetect.cpp"
"${ICU_SOURCE_DIR}/i18n/csmatch.cpp" "${ICU_SOURCE_DIR}/i18n/csmatch.cpp"
"${ICU_SOURCE_DIR}/i18n/csr2022.cpp" "${ICU_SOURCE_DIR}/i18n/csr2022.cpp"
@ -346,60 +262,80 @@ set(ICUI18N_SOURCES
"${ICU_SOURCE_DIR}/i18n/csrsbcs.cpp" "${ICU_SOURCE_DIR}/i18n/csrsbcs.cpp"
"${ICU_SOURCE_DIR}/i18n/csrucode.cpp" "${ICU_SOURCE_DIR}/i18n/csrucode.cpp"
"${ICU_SOURCE_DIR}/i18n/csrutf8.cpp" "${ICU_SOURCE_DIR}/i18n/csrutf8.cpp"
"${ICU_SOURCE_DIR}/i18n/inputext.cpp" "${ICU_SOURCE_DIR}/i18n/curramt.cpp"
"${ICU_SOURCE_DIR}/i18n/wintzimpl.cpp" "${ICU_SOURCE_DIR}/i18n/currfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/windtfmt.cpp" "${ICU_SOURCE_DIR}/i18n/currpinf.cpp"
"${ICU_SOURCE_DIR}/i18n/winnmfmt.cpp" "${ICU_SOURCE_DIR}/i18n/currunit.cpp"
"${ICU_SOURCE_DIR}/i18n/basictz.cpp" "${ICU_SOURCE_DIR}/i18n/dangical.cpp"
"${ICU_SOURCE_DIR}/i18n/dtrule.cpp" "${ICU_SOURCE_DIR}/i18n/datefmt.cpp"
"${ICU_SOURCE_DIR}/i18n/rbtz.cpp" "${ICU_SOURCE_DIR}/i18n/dayperiodrules.cpp"
"${ICU_SOURCE_DIR}/i18n/tzrule.cpp" "${ICU_SOURCE_DIR}/i18n/dcfmtsym.cpp"
"${ICU_SOURCE_DIR}/i18n/tztrans.cpp" "${ICU_SOURCE_DIR}/i18n/decContext.cpp"
"${ICU_SOURCE_DIR}/i18n/vtzone.cpp" "${ICU_SOURCE_DIR}/i18n/decNumber.cpp"
"${ICU_SOURCE_DIR}/i18n/zonemeta.cpp" "${ICU_SOURCE_DIR}/i18n/decimfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/standardplural.cpp" "${ICU_SOURCE_DIR}/i18n/displayoptions.cpp"
"${ICU_SOURCE_DIR}/i18n/upluralrules.cpp" "${ICU_SOURCE_DIR}/i18n/double-conversion-bignum-dtoa.cpp"
"${ICU_SOURCE_DIR}/i18n/plurrule.cpp" "${ICU_SOURCE_DIR}/i18n/double-conversion-bignum.cpp"
"${ICU_SOURCE_DIR}/i18n/plurfmt.cpp" "${ICU_SOURCE_DIR}/i18n/double-conversion-cached-powers.cpp"
"${ICU_SOURCE_DIR}/i18n/selfmt.cpp" "${ICU_SOURCE_DIR}/i18n/double-conversion-double-to-string.cpp"
"${ICU_SOURCE_DIR}/i18n/double-conversion-fast-dtoa.cpp"
"${ICU_SOURCE_DIR}/i18n/double-conversion-string-to-double.cpp"
"${ICU_SOURCE_DIR}/i18n/double-conversion-strtod.cpp"
"${ICU_SOURCE_DIR}/i18n/dtfmtsym.cpp"
"${ICU_SOURCE_DIR}/i18n/dtitvfmt.cpp" "${ICU_SOURCE_DIR}/i18n/dtitvfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/dtitvinf.cpp" "${ICU_SOURCE_DIR}/i18n/dtitvinf.cpp"
"${ICU_SOURCE_DIR}/i18n/udateintervalformat.cpp" "${ICU_SOURCE_DIR}/i18n/dtptngen.cpp"
"${ICU_SOURCE_DIR}/i18n/tmunit.cpp" "${ICU_SOURCE_DIR}/i18n/dtrule.cpp"
"${ICU_SOURCE_DIR}/i18n/tmutamt.cpp" "${ICU_SOURCE_DIR}/i18n/erarules.cpp"
"${ICU_SOURCE_DIR}/i18n/tmutfmt.cpp" "${ICU_SOURCE_DIR}/i18n/esctrn.cpp"
"${ICU_SOURCE_DIR}/i18n/currpinf.cpp" "${ICU_SOURCE_DIR}/i18n/ethpccal.cpp"
"${ICU_SOURCE_DIR}/i18n/uspoof.cpp" "${ICU_SOURCE_DIR}/i18n/fmtable.cpp"
"${ICU_SOURCE_DIR}/i18n/uspoof_impl.cpp" "${ICU_SOURCE_DIR}/i18n/fmtable_cnv.cpp"
"${ICU_SOURCE_DIR}/i18n/uspoof_build.cpp" "${ICU_SOURCE_DIR}/i18n/format.cpp"
"${ICU_SOURCE_DIR}/i18n/uspoof_conf.cpp" "${ICU_SOURCE_DIR}/i18n/formatted_string_builder.cpp"
"${ICU_SOURCE_DIR}/i18n/smpdtfst.cpp" "${ICU_SOURCE_DIR}/i18n/formattedval_iterimpl.cpp"
"${ICU_SOURCE_DIR}/i18n/ztrans.cpp" "${ICU_SOURCE_DIR}/i18n/formattedval_sbimpl.cpp"
"${ICU_SOURCE_DIR}/i18n/zrule.cpp" "${ICU_SOURCE_DIR}/i18n/formattedvalue.cpp"
"${ICU_SOURCE_DIR}/i18n/vzone.cpp"
"${ICU_SOURCE_DIR}/i18n/fphdlimp.cpp" "${ICU_SOURCE_DIR}/i18n/fphdlimp.cpp"
"${ICU_SOURCE_DIR}/i18n/fpositer.cpp" "${ICU_SOURCE_DIR}/i18n/fpositer.cpp"
"${ICU_SOURCE_DIR}/i18n/ufieldpositer.cpp" "${ICU_SOURCE_DIR}/i18n/funcrepl.cpp"
"${ICU_SOURCE_DIR}/i18n/decNumber.cpp"
"${ICU_SOURCE_DIR}/i18n/decContext.cpp"
"${ICU_SOURCE_DIR}/i18n/alphaindex.cpp"
"${ICU_SOURCE_DIR}/i18n/tznames.cpp"
"${ICU_SOURCE_DIR}/i18n/tznames_impl.cpp"
"${ICU_SOURCE_DIR}/i18n/tzgnames.cpp"
"${ICU_SOURCE_DIR}/i18n/tzfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/compactdecimalformat.cpp"
"${ICU_SOURCE_DIR}/i18n/gender.cpp" "${ICU_SOURCE_DIR}/i18n/gender.cpp"
"${ICU_SOURCE_DIR}/i18n/region.cpp" "${ICU_SOURCE_DIR}/i18n/gregocal.cpp"
"${ICU_SOURCE_DIR}/i18n/scriptset.cpp" "${ICU_SOURCE_DIR}/i18n/gregoimp.cpp"
"${ICU_SOURCE_DIR}/i18n/uregion.cpp" "${ICU_SOURCE_DIR}/i18n/hebrwcal.cpp"
"${ICU_SOURCE_DIR}/i18n/reldatefmt.cpp" "${ICU_SOURCE_DIR}/i18n/indiancal.cpp"
"${ICU_SOURCE_DIR}/i18n/quantityformatter.cpp" "${ICU_SOURCE_DIR}/i18n/inputext.cpp"
"${ICU_SOURCE_DIR}/i18n/islamcal.cpp"
"${ICU_SOURCE_DIR}/i18n/iso8601cal.cpp"
"${ICU_SOURCE_DIR}/i18n/japancal.cpp"
"${ICU_SOURCE_DIR}/i18n/listformatter.cpp"
"${ICU_SOURCE_DIR}/i18n/measfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/measunit.cpp" "${ICU_SOURCE_DIR}/i18n/measunit.cpp"
"${ICU_SOURCE_DIR}/i18n/sharedbreakiterator.cpp" "${ICU_SOURCE_DIR}/i18n/measunit_extra.cpp"
"${ICU_SOURCE_DIR}/i18n/scientificnumberformatter.cpp" "${ICU_SOURCE_DIR}/i18n/measure.cpp"
"${ICU_SOURCE_DIR}/i18n/dayperiodrules.cpp" "${ICU_SOURCE_DIR}/i18n/messageformat2.cpp"
"${ICU_SOURCE_DIR}/i18n/messageformat2_arguments.cpp"
"${ICU_SOURCE_DIR}/i18n/messageformat2_checker.cpp"
"${ICU_SOURCE_DIR}/i18n/messageformat2_data_model.cpp"
"${ICU_SOURCE_DIR}/i18n/messageformat2_errors.cpp"
"${ICU_SOURCE_DIR}/i18n/messageformat2_evaluation.cpp"
"${ICU_SOURCE_DIR}/i18n/messageformat2_formattable.cpp"
"${ICU_SOURCE_DIR}/i18n/messageformat2_formatter.cpp"
"${ICU_SOURCE_DIR}/i18n/messageformat2_function_registry.cpp"
"${ICU_SOURCE_DIR}/i18n/messageformat2_parser.cpp"
"${ICU_SOURCE_DIR}/i18n/messageformat2_serializer.cpp"
"${ICU_SOURCE_DIR}/i18n/msgfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/name2uni.cpp"
"${ICU_SOURCE_DIR}/i18n/nfrs.cpp"
"${ICU_SOURCE_DIR}/i18n/nfrule.cpp"
"${ICU_SOURCE_DIR}/i18n/nfsubs.cpp"
"${ICU_SOURCE_DIR}/i18n/nortrans.cpp"
"${ICU_SOURCE_DIR}/i18n/nultrans.cpp"
"${ICU_SOURCE_DIR}/i18n/number_affixutils.cpp" "${ICU_SOURCE_DIR}/i18n/number_affixutils.cpp"
"${ICU_SOURCE_DIR}/i18n/number_asformat.cpp"
"${ICU_SOURCE_DIR}/i18n/number_capi.cpp"
"${ICU_SOURCE_DIR}/i18n/number_compact.cpp" "${ICU_SOURCE_DIR}/i18n/number_compact.cpp"
"${ICU_SOURCE_DIR}/i18n/number_currencysymbols.cpp"
"${ICU_SOURCE_DIR}/i18n/number_decimalquantity.cpp" "${ICU_SOURCE_DIR}/i18n/number_decimalquantity.cpp"
"${ICU_SOURCE_DIR}/i18n/number_decimfmtprops.cpp" "${ICU_SOURCE_DIR}/i18n/number_decimfmtprops.cpp"
"${ICU_SOURCE_DIR}/i18n/number_fluent.cpp" "${ICU_SOURCE_DIR}/i18n/number_fluent.cpp"
@ -407,7 +343,9 @@ set(ICUI18N_SOURCES
"${ICU_SOURCE_DIR}/i18n/number_grouping.cpp" "${ICU_SOURCE_DIR}/i18n/number_grouping.cpp"
"${ICU_SOURCE_DIR}/i18n/number_integerwidth.cpp" "${ICU_SOURCE_DIR}/i18n/number_integerwidth.cpp"
"${ICU_SOURCE_DIR}/i18n/number_longnames.cpp" "${ICU_SOURCE_DIR}/i18n/number_longnames.cpp"
"${ICU_SOURCE_DIR}/i18n/number_mapper.cpp"
"${ICU_SOURCE_DIR}/i18n/number_modifiers.cpp" "${ICU_SOURCE_DIR}/i18n/number_modifiers.cpp"
"${ICU_SOURCE_DIR}/i18n/number_multiplier.cpp"
"${ICU_SOURCE_DIR}/i18n/number_notation.cpp" "${ICU_SOURCE_DIR}/i18n/number_notation.cpp"
"${ICU_SOURCE_DIR}/i18n/number_output.cpp" "${ICU_SOURCE_DIR}/i18n/number_output.cpp"
"${ICU_SOURCE_DIR}/i18n/number_padding.cpp" "${ICU_SOURCE_DIR}/i18n/number_padding.cpp"
@ -415,46 +353,125 @@ set(ICUI18N_SOURCES
"${ICU_SOURCE_DIR}/i18n/number_patternstring.cpp" "${ICU_SOURCE_DIR}/i18n/number_patternstring.cpp"
"${ICU_SOURCE_DIR}/i18n/number_rounding.cpp" "${ICU_SOURCE_DIR}/i18n/number_rounding.cpp"
"${ICU_SOURCE_DIR}/i18n/number_scientific.cpp" "${ICU_SOURCE_DIR}/i18n/number_scientific.cpp"
"${ICU_SOURCE_DIR}/i18n/number_utils.cpp" "${ICU_SOURCE_DIR}/i18n/number_simple.cpp"
"${ICU_SOURCE_DIR}/i18n/number_asformat.cpp"
"${ICU_SOURCE_DIR}/i18n/number_mapper.cpp"
"${ICU_SOURCE_DIR}/i18n/number_multiplier.cpp"
"${ICU_SOURCE_DIR}/i18n/number_currencysymbols.cpp"
"${ICU_SOURCE_DIR}/i18n/number_skeletons.cpp" "${ICU_SOURCE_DIR}/i18n/number_skeletons.cpp"
"${ICU_SOURCE_DIR}/i18n/number_capi.cpp"
"${ICU_SOURCE_DIR}/i18n/double-conversion-string-to-double.cpp"
"${ICU_SOURCE_DIR}/i18n/double-conversion-double-to-string.cpp"
"${ICU_SOURCE_DIR}/i18n/double-conversion-bignum-dtoa.cpp"
"${ICU_SOURCE_DIR}/i18n/double-conversion-bignum.cpp"
"${ICU_SOURCE_DIR}/i18n/double-conversion-cached-powers.cpp"
"${ICU_SOURCE_DIR}/i18n/double-conversion-fast-dtoa.cpp"
"${ICU_SOURCE_DIR}/i18n/double-conversion-strtod.cpp"
"${ICU_SOURCE_DIR}/i18n/string_segment.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_parsednumber.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_impl.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_symbols.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_decimal.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_scientific.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_currency.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_affixes.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_compositions.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_validators.cpp"
"${ICU_SOURCE_DIR}/i18n/numrange_fluent.cpp"
"${ICU_SOURCE_DIR}/i18n/numrange_impl.cpp"
"${ICU_SOURCE_DIR}/i18n/erarules.cpp"
"${ICU_SOURCE_DIR}/i18n/formattedvalue.cpp"
"${ICU_SOURCE_DIR}/i18n/formattedval_iterimpl.cpp"
"${ICU_SOURCE_DIR}/i18n/formattedval_sbimpl.cpp"
"${ICU_SOURCE_DIR}/i18n/formatted_string_builder.cpp"
"${ICU_SOURCE_DIR}/i18n/measunit_extra.cpp"
"${ICU_SOURCE_DIR}/i18n/number_symbolswrapper.cpp" "${ICU_SOURCE_DIR}/i18n/number_symbolswrapper.cpp"
"${ICU_SOURCE_DIR}/i18n/number_usageprefs.cpp" "${ICU_SOURCE_DIR}/i18n/number_usageprefs.cpp"
"${ICU_SOURCE_DIR}/i18n/number_utils.cpp"
"${ICU_SOURCE_DIR}/i18n/numfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_affixes.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_compositions.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_currency.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_decimal.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_impl.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_parsednumber.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_scientific.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_symbols.cpp"
"${ICU_SOURCE_DIR}/i18n/numparse_validators.cpp"
"${ICU_SOURCE_DIR}/i18n/numrange_capi.cpp" "${ICU_SOURCE_DIR}/i18n/numrange_capi.cpp"
"${ICU_SOURCE_DIR}/i18n/numrange_fluent.cpp"
"${ICU_SOURCE_DIR}/i18n/numrange_impl.cpp"
"${ICU_SOURCE_DIR}/i18n/numsys.cpp"
"${ICU_SOURCE_DIR}/i18n/olsontz.cpp"
"${ICU_SOURCE_DIR}/i18n/persncal.cpp"
"${ICU_SOURCE_DIR}/i18n/pluralranges.cpp" "${ICU_SOURCE_DIR}/i18n/pluralranges.cpp"
"${ICU_SOURCE_DIR}/i18n/plurfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/plurrule.cpp"
"${ICU_SOURCE_DIR}/i18n/quant.cpp"
"${ICU_SOURCE_DIR}/i18n/quantityformatter.cpp"
"${ICU_SOURCE_DIR}/i18n/rbnf.cpp"
"${ICU_SOURCE_DIR}/i18n/rbt.cpp"
"${ICU_SOURCE_DIR}/i18n/rbt_data.cpp"
"${ICU_SOURCE_DIR}/i18n/rbt_pars.cpp"
"${ICU_SOURCE_DIR}/i18n/rbt_rule.cpp"
"${ICU_SOURCE_DIR}/i18n/rbt_set.cpp"
"${ICU_SOURCE_DIR}/i18n/rbtz.cpp"
"${ICU_SOURCE_DIR}/i18n/regexcmp.cpp"
"${ICU_SOURCE_DIR}/i18n/regeximp.cpp"
"${ICU_SOURCE_DIR}/i18n/regexst.cpp"
"${ICU_SOURCE_DIR}/i18n/regextxt.cpp"
"${ICU_SOURCE_DIR}/i18n/region.cpp"
"${ICU_SOURCE_DIR}/i18n/reldatefmt.cpp"
"${ICU_SOURCE_DIR}/i18n/reldtfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/rematch.cpp"
"${ICU_SOURCE_DIR}/i18n/remtrans.cpp"
"${ICU_SOURCE_DIR}/i18n/repattrn.cpp"
"${ICU_SOURCE_DIR}/i18n/rulebasedcollator.cpp"
"${ICU_SOURCE_DIR}/i18n/scientificnumberformatter.cpp"
"${ICU_SOURCE_DIR}/i18n/scriptset.cpp"
"${ICU_SOURCE_DIR}/i18n/search.cpp"
"${ICU_SOURCE_DIR}/i18n/selfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/sharedbreakiterator.cpp"
"${ICU_SOURCE_DIR}/i18n/simpletz.cpp"
"${ICU_SOURCE_DIR}/i18n/smpdtfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/smpdtfst.cpp"
"${ICU_SOURCE_DIR}/i18n/sortkey.cpp"
"${ICU_SOURCE_DIR}/i18n/standardplural.cpp"
"${ICU_SOURCE_DIR}/i18n/string_segment.cpp"
"${ICU_SOURCE_DIR}/i18n/strmatch.cpp"
"${ICU_SOURCE_DIR}/i18n/strrepl.cpp"
"${ICU_SOURCE_DIR}/i18n/stsearch.cpp"
"${ICU_SOURCE_DIR}/i18n/taiwncal.cpp"
"${ICU_SOURCE_DIR}/i18n/timezone.cpp"
"${ICU_SOURCE_DIR}/i18n/titletrn.cpp"
"${ICU_SOURCE_DIR}/i18n/tmunit.cpp"
"${ICU_SOURCE_DIR}/i18n/tmutamt.cpp"
"${ICU_SOURCE_DIR}/i18n/tmutfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/tolowtrn.cpp"
"${ICU_SOURCE_DIR}/i18n/toupptrn.cpp"
"${ICU_SOURCE_DIR}/i18n/translit.cpp"
"${ICU_SOURCE_DIR}/i18n/transreg.cpp"
"${ICU_SOURCE_DIR}/i18n/tridpars.cpp"
"${ICU_SOURCE_DIR}/i18n/tzfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/tzgnames.cpp"
"${ICU_SOURCE_DIR}/i18n/tznames.cpp"
"${ICU_SOURCE_DIR}/i18n/tznames_impl.cpp"
"${ICU_SOURCE_DIR}/i18n/tzrule.cpp"
"${ICU_SOURCE_DIR}/i18n/tztrans.cpp"
"${ICU_SOURCE_DIR}/i18n/ucal.cpp"
"${ICU_SOURCE_DIR}/i18n/ucln_in.cpp"
"${ICU_SOURCE_DIR}/i18n/ucol.cpp"
"${ICU_SOURCE_DIR}/i18n/ucol_res.cpp"
"${ICU_SOURCE_DIR}/i18n/ucol_sit.cpp"
"${ICU_SOURCE_DIR}/i18n/ucoleitr.cpp"
"${ICU_SOURCE_DIR}/i18n/ucsdet.cpp"
"${ICU_SOURCE_DIR}/i18n/udat.cpp"
"${ICU_SOURCE_DIR}/i18n/udateintervalformat.cpp"
"${ICU_SOURCE_DIR}/i18n/udatpg.cpp"
"${ICU_SOURCE_DIR}/i18n/ufieldpositer.cpp"
"${ICU_SOURCE_DIR}/i18n/uitercollationiterator.cpp"
"${ICU_SOURCE_DIR}/i18n/ulistformatter.cpp"
"${ICU_SOURCE_DIR}/i18n/ulocdata.cpp"
"${ICU_SOURCE_DIR}/i18n/umsg.cpp"
"${ICU_SOURCE_DIR}/i18n/unesctrn.cpp"
"${ICU_SOURCE_DIR}/i18n/uni2name.cpp"
"${ICU_SOURCE_DIR}/i18n/units_complexconverter.cpp" "${ICU_SOURCE_DIR}/i18n/units_complexconverter.cpp"
"${ICU_SOURCE_DIR}/i18n/units_converter.cpp" "${ICU_SOURCE_DIR}/i18n/units_converter.cpp"
"${ICU_SOURCE_DIR}/i18n/units_data.cpp" "${ICU_SOURCE_DIR}/i18n/units_data.cpp"
"${ICU_SOURCE_DIR}/i18n/units_router.cpp") "${ICU_SOURCE_DIR}/i18n/units_router.cpp"
"${ICU_SOURCE_DIR}/i18n/unum.cpp"
"${ICU_SOURCE_DIR}/i18n/unumsys.cpp"
"${ICU_SOURCE_DIR}/i18n/upluralrules.cpp"
"${ICU_SOURCE_DIR}/i18n/uregex.cpp"
"${ICU_SOURCE_DIR}/i18n/uregexc.cpp"
"${ICU_SOURCE_DIR}/i18n/uregion.cpp"
"${ICU_SOURCE_DIR}/i18n/usearch.cpp"
"${ICU_SOURCE_DIR}/i18n/uspoof.cpp"
"${ICU_SOURCE_DIR}/i18n/uspoof_build.cpp"
"${ICU_SOURCE_DIR}/i18n/uspoof_conf.cpp"
"${ICU_SOURCE_DIR}/i18n/uspoof_impl.cpp"
"${ICU_SOURCE_DIR}/i18n/utf16collationiterator.cpp"
"${ICU_SOURCE_DIR}/i18n/utf8collationiterator.cpp"
"${ICU_SOURCE_DIR}/i18n/utmscale.cpp"
"${ICU_SOURCE_DIR}/i18n/utrans.cpp"
"${ICU_SOURCE_DIR}/i18n/vtzone.cpp"
"${ICU_SOURCE_DIR}/i18n/vzone.cpp"
"${ICU_SOURCE_DIR}/i18n/windtfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/winnmfmt.cpp"
"${ICU_SOURCE_DIR}/i18n/wintzimpl.cpp"
"${ICU_SOURCE_DIR}/i18n/zonemeta.cpp"
"${ICU_SOURCE_DIR}/i18n/zrule.cpp"
"${ICU_SOURCE_DIR}/i18n/ztrans.cpp")
file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/empty.cpp" CONTENT " ") file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/empty.cpp" CONTENT " ")
enable_language(ASM) enable_language(ASM)
@ -464,6 +481,11 @@ if (ARCH_S390X)
else() else()
set(ICUDATA_SOURCE_FILE "${ICUDATA_SOURCE_DIR}/icudt75l_dat.S" ) set(ICUDATA_SOURCE_FILE "${ICUDATA_SOURCE_DIR}/icudt75l_dat.S" )
endif() endif()
# ^^ you might be confused how for different little endian platforms (x86, ARM) the same assembly files can be used.
# These files are indeed assembly but they only contain data ('.long' directive), which makes them portable accross CPUs.
# Only the endianness and the character set (ASCII, EBCDIC) makes a difference, also see
# https://unicode-org.github.io/icu/userguide/icu_data/#sharing-icu-data-between-platforms, 'Sharing ICU Data Between Platforms')
# (and as an experiment, try re-generating the data files on x86 vs. ARM, ... you'll get exactly the same files)
set(ICUDATA_SOURCES set(ICUDATA_SOURCES
"${ICUDATA_SOURCE_FILE}" "${ICUDATA_SOURCE_FILE}"

2
contrib/libarchive vendored

@ -1 +1 @@
Subproject commit 0c21691b177fac5f4cceca2a1ff2ddfa5d60f51c Subproject commit 313aa1fa10b657de791e3202c168a6c833bc3543

View File

@ -1,6 +1,6 @@
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/libarchive") set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/libarchive")
set(SRCS set(SRCS
"${LIBRARY_DIR}/libarchive/archive_acl.c" "${LIBRARY_DIR}/libarchive/archive_acl.c"
"${LIBRARY_DIR}/libarchive/archive_blake2sp_ref.c" "${LIBRARY_DIR}/libarchive/archive_blake2sp_ref.c"
"${LIBRARY_DIR}/libarchive/archive_blake2s_ref.c" "${LIBRARY_DIR}/libarchive/archive_blake2s_ref.c"
@ -135,7 +135,7 @@ set(SRCS
) )
add_library(_libarchive ${SRCS}) add_library(_libarchive ${SRCS})
target_include_directories(_libarchive PUBLIC target_include_directories(_libarchive PUBLIC
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
"${LIBRARY_DIR}/libarchive" "${LIBRARY_DIR}/libarchive"
) )
@ -157,7 +157,7 @@ if (TARGET ch_contrib::zlib)
endif() endif()
if (TARGET ch_contrib::zstd) if (TARGET ch_contrib::zstd)
target_compile_definitions(_libarchive PUBLIC HAVE_ZSTD_H=1 HAVE_LIBZSTD=1 HAVE_LIBZSTD_COMPRESSOR=1) target_compile_definitions(_libarchive PUBLIC HAVE_ZSTD_H=1 HAVE_LIBZSTD=1 HAVE_ZSTD_compressStream=1)
target_link_libraries(_libarchive PRIVATE ch_contrib::zstd) target_link_libraries(_libarchive PRIVATE ch_contrib::zstd)
endif() endif()
@ -179,4 +179,4 @@ if (OS_LINUX)
) )
endif() endif()
add_library(ch_contrib::libarchive ALIAS _libarchive) add_library(ch_contrib::libarchive ALIAS _libarchive)

View File

@ -334,13 +334,16 @@ typedef uint64_t uintmax_t;
/* #undef ARCHIVE_XATTR_LINUX */ /* #undef ARCHIVE_XATTR_LINUX */
/* Version number of bsdcpio */ /* Version number of bsdcpio */
#define BSDCPIO_VERSION_STRING "3.7.0" #define BSDCPIO_VERSION_STRING "3.7.4"
/* Version number of bsdtar */ /* Version number of bsdtar */
#define BSDTAR_VERSION_STRING "3.7.0" #define BSDTAR_VERSION_STRING "3.7.4"
/* Version number of bsdcat */ /* Version number of bsdcat */
#define BSDCAT_VERSION_STRING "3.7.0" #define BSDCAT_VERSION_STRING "3.7.4"
/* Version number of bsdunzip */
#define BSDUNZIP_VERSION_STRING "3.7.4"
/* Define to 1 if you have the `acl_create_entry' function. */ /* Define to 1 if you have the `acl_create_entry' function. */
/* #undef HAVE_ACL_CREATE_ENTRY */ /* #undef HAVE_ACL_CREATE_ENTRY */
@ -642,8 +645,8 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `getgrnam_r' function. */ /* Define to 1 if you have the `getgrnam_r' function. */
#define HAVE_GETGRNAM_R 1 #define HAVE_GETGRNAM_R 1
/* Define to 1 if platform uses `optreset` to reset `getopt` */ /* Define to 1 if you have the `getline' function. */
#define HAVE_GETOPT_OPTRESET 1 #define HAVE_GETLINE 1
/* Define to 1 if you have the `getpid' function. */ /* Define to 1 if you have the `getpid' function. */
#define HAVE_GETPID 1 #define HAVE_GETPID 1
@ -750,6 +753,12 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `pcreposix' library (-lpcreposix). */ /* Define to 1 if you have the `pcreposix' library (-lpcreposix). */
/* #undef HAVE_LIBPCREPOSIX */ /* #undef HAVE_LIBPCREPOSIX */
/* Define to 1 if you have the `pcre2-8' library (-lpcre2-8). */
/* #undef HAVE_LIBPCRE2 */
/* Define to 1 if you have the `pcreposix' library (-lpcre2posix). */
/* #undef HAVE_LIBPCRE2POSIX */
/* Define to 1 if you have the `xml2' library (-lxml2). */ /* Define to 1 if you have the `xml2' library (-lxml2). */
#define HAVE_LIBXML2 1 #define HAVE_LIBXML2 1
@ -765,9 +774,8 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `zstd' library (-lzstd). */ /* Define to 1 if you have the `zstd' library (-lzstd). */
/* #undef HAVE_LIBZSTD */ /* #undef HAVE_LIBZSTD */
/* Define to 1 if you have the `zstd' library (-lzstd) with compression /* Define to 1 if you have the ZSTD_compressStream function. */
support. */ /* #undef HAVE_ZSTD_compressStream */
/* #undef HAVE_LIBZSTD_COMPRESSOR */
/* Define to 1 if you have the <limits.h> header file. */ /* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1 #define HAVE_LIMITS_H 1
@ -923,6 +931,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the <pcreposix.h> header file. */ /* Define to 1 if you have the <pcreposix.h> header file. */
/* #undef HAVE_PCREPOSIX_H */ /* #undef HAVE_PCREPOSIX_H */
/* Define to 1 if you have the <pcre2posix.h> header file. */
/* #undef HAVE_PCRE2POSIX_H */
/* Define to 1 if you have the `pipe' function. */ /* Define to 1 if you have the `pipe' function. */
#define HAVE_PIPE 1 #define HAVE_PIPE 1
@ -1029,6 +1040,12 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `strrchr' function. */ /* Define to 1 if you have the `strrchr' function. */
#define HAVE_STRRCHR 1 #define HAVE_STRRCHR 1
/* Define to 1 if the system has the type `struct statfs'. */
/* #undef HAVE_STRUCT_STATFS */
/* Define to 1 if `f_iosize' is a member of `struct statfs'. */
/* #undef HAVE_STRUCT_STATFS_F_IOSIZE */
/* Define to 1 if `f_namemax' is a member of `struct statfs'. */ /* Define to 1 if `f_namemax' is a member of `struct statfs'. */
/* #undef HAVE_STRUCT_STATFS_F_NAMEMAX */ /* #undef HAVE_STRUCT_STATFS_F_NAMEMAX */
@ -1077,6 +1094,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `symlink' function. */ /* Define to 1 if you have the `symlink' function. */
#define HAVE_SYMLINK 1 #define HAVE_SYMLINK 1
/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1
/* Define to 1 if you have the <sys/acl.h> header file. */ /* Define to 1 if you have the <sys/acl.h> header file. */
/* #undef HAVE_SYS_ACL_H */ /* #undef HAVE_SYS_ACL_H */
@ -1273,13 +1293,13 @@ typedef uint64_t uintmax_t;
/* #undef HAVE__MKGMTIME */ /* #undef HAVE__MKGMTIME */
/* Define as const if the declaration of iconv() needs const. */ /* Define as const if the declaration of iconv() needs const. */
#define ICONV_CONST #define ICONV_CONST
/* Version number of libarchive as a single integer */ /* Version number of libarchive as a single integer */
#define LIBARCHIVE_VERSION_NUMBER "3007000" #define LIBARCHIVE_VERSION_NUMBER "3007004"
/* Version number of libarchive */ /* Version number of libarchive */
#define LIBARCHIVE_VERSION_STRING "3.7.0" #define LIBARCHIVE_VERSION_STRING "3.7.4"
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing /* Define to 1 if `lstat' dereferences a symlink specified with a trailing
slash. */ slash. */
@ -1333,7 +1353,7 @@ typedef uint64_t uintmax_t;
#endif /* SAFE_TO_DEFINE_EXTENSIONS */ #endif /* SAFE_TO_DEFINE_EXTENSIONS */
/* Version number of package */ /* Version number of package */
#define VERSION "3.7.0" #define VERSION "3.7.4"
/* Number of bits in a file offset, on hosts where this is settable. */ /* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */ /* #undef _FILE_OFFSET_BITS */

1
contrib/libpq vendored

@ -1 +0,0 @@
Subproject commit 2446f2c85650b56df9d4ebc4c2ea7f4b01beee57

View File

@ -1,78 +0,0 @@
if (NOT ENABLE_LIBPQXX)
return()
endif()
set(LIBPQ_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libpq")
set(SRCS
"${LIBPQ_SOURCE_DIR}/fe-auth.c"
"${LIBPQ_SOURCE_DIR}/fe-auth-scram.c"
"${LIBPQ_SOURCE_DIR}/fe-connect.c"
"${LIBPQ_SOURCE_DIR}/fe-exec.c"
"${LIBPQ_SOURCE_DIR}/fe-lobj.c"
"${LIBPQ_SOURCE_DIR}/fe-misc.c"
"${LIBPQ_SOURCE_DIR}/fe-print.c"
"${LIBPQ_SOURCE_DIR}/fe-trace.c"
"${LIBPQ_SOURCE_DIR}/fe-protocol3.c"
"${LIBPQ_SOURCE_DIR}/fe-secure.c"
"${LIBPQ_SOURCE_DIR}/fe-secure-common.c"
"${LIBPQ_SOURCE_DIR}/fe-secure-openssl.c"
"${LIBPQ_SOURCE_DIR}/legacy-pqsignal.c"
"${LIBPQ_SOURCE_DIR}/libpq-events.c"
"${LIBPQ_SOURCE_DIR}/pqexpbuffer.c"
"${LIBPQ_SOURCE_DIR}/common/scram-common.c"
"${LIBPQ_SOURCE_DIR}/common/sha2.c"
"${LIBPQ_SOURCE_DIR}/common/sha1.c"
"${LIBPQ_SOURCE_DIR}/common/md5.c"
"${LIBPQ_SOURCE_DIR}/common/md5_common.c"
"${LIBPQ_SOURCE_DIR}/common/hmac_openssl.c"
"${LIBPQ_SOURCE_DIR}/common/cryptohash.c"
"${LIBPQ_SOURCE_DIR}/common/saslprep.c"
"${LIBPQ_SOURCE_DIR}/common/unicode_norm.c"
"${LIBPQ_SOURCE_DIR}/common/ip.c"
"${LIBPQ_SOURCE_DIR}/common/jsonapi.c"
"${LIBPQ_SOURCE_DIR}/common/wchar.c"
"${LIBPQ_SOURCE_DIR}/common/base64.c"
"${LIBPQ_SOURCE_DIR}/common/link-canary.c"
"${LIBPQ_SOURCE_DIR}/common/fe_memutils.c"
"${LIBPQ_SOURCE_DIR}/common/string.c"
"${LIBPQ_SOURCE_DIR}/common/pg_get_line.c"
"${LIBPQ_SOURCE_DIR}/common/stringinfo.c"
"${LIBPQ_SOURCE_DIR}/common/psprintf.c"
"${LIBPQ_SOURCE_DIR}/common/encnames.c"
"${LIBPQ_SOURCE_DIR}/common/logging.c"
"${LIBPQ_SOURCE_DIR}/port/snprintf.c"
"${LIBPQ_SOURCE_DIR}/port/strlcpy.c"
"${LIBPQ_SOURCE_DIR}/port/strerror.c"
"${LIBPQ_SOURCE_DIR}/port/inet_net_ntop.c"
"${LIBPQ_SOURCE_DIR}/port/getpeereid.c"
"${LIBPQ_SOURCE_DIR}/port/chklocale.c"
"${LIBPQ_SOURCE_DIR}/port/noblock.c"
"${LIBPQ_SOURCE_DIR}/port/pg_strong_random.c"
"${LIBPQ_SOURCE_DIR}/port/pgstrcasecmp.c"
"${LIBPQ_SOURCE_DIR}/port/thread.c"
"${LIBPQ_SOURCE_DIR}/port/path.c"
)
add_library(_libpq ${SRCS})
add_definitions(-DHAVE_BIO_METH_NEW)
add_definitions(-DHAVE_HMAC_CTX_NEW)
add_definitions(-DHAVE_HMAC_CTX_FREE)
target_include_directories (_libpq SYSTEM PUBLIC ${LIBPQ_SOURCE_DIR})
target_include_directories (_libpq SYSTEM PUBLIC "${LIBPQ_SOURCE_DIR}/include")
target_include_directories (_libpq SYSTEM PRIVATE "${LIBPQ_SOURCE_DIR}/configs")
# NOTE: this is a dirty hack to avoid and instead pg_config.h should be shipped
# for different OS'es like for jemalloc, not one generic for all OS'es like
# now.
if (OS_DARWIN OR OS_FREEBSD OR USE_MUSL)
target_compile_definitions(_libpq PRIVATE -DSTRERROR_R_INT=1)
endif()
target_link_libraries (_libpq PRIVATE OpenSSL::SSL)
add_library(ch_contrib::libpq ALIAS _libpq)

2
contrib/libpqxx vendored

@ -1 +1 @@
Subproject commit c995193a3a14d71f4711f1f421f65a1a1db64640 Subproject commit 41e4c331564167cca97ad6eccbd5b8879c2ca044

View File

@ -1,16 +1,9 @@
option(ENABLE_LIBPQXX "Enalbe libpqxx" ${ENABLE_LIBRARIES})
if (NOT ENABLE_LIBPQXX)
message(STATUS "Not using libpqxx")
return()
endif()
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/libpqxx") set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/libpqxx")
set (SRCS set (SRCS
"${LIBRARY_DIR}/src/strconv.cxx"
"${LIBRARY_DIR}/src/array.cxx" "${LIBRARY_DIR}/src/array.cxx"
"${LIBRARY_DIR}/src/binarystring.cxx" "${LIBRARY_DIR}/src/binarystring.cxx"
"${LIBRARY_DIR}/src/blob.cxx"
"${LIBRARY_DIR}/src/connection.cxx" "${LIBRARY_DIR}/src/connection.cxx"
"${LIBRARY_DIR}/src/cursor.cxx" "${LIBRARY_DIR}/src/cursor.cxx"
"${LIBRARY_DIR}/src/encodings.cxx" "${LIBRARY_DIR}/src/encodings.cxx"
@ -19,59 +12,25 @@ set (SRCS
"${LIBRARY_DIR}/src/field.cxx" "${LIBRARY_DIR}/src/field.cxx"
"${LIBRARY_DIR}/src/largeobject.cxx" "${LIBRARY_DIR}/src/largeobject.cxx"
"${LIBRARY_DIR}/src/notification.cxx" "${LIBRARY_DIR}/src/notification.cxx"
"${LIBRARY_DIR}/src/params.cxx"
"${LIBRARY_DIR}/src/pipeline.cxx" "${LIBRARY_DIR}/src/pipeline.cxx"
"${LIBRARY_DIR}/src/result.cxx" "${LIBRARY_DIR}/src/result.cxx"
"${LIBRARY_DIR}/src/robusttransaction.cxx" "${LIBRARY_DIR}/src/robusttransaction.cxx"
"${LIBRARY_DIR}/src/row.cxx"
"${LIBRARY_DIR}/src/sql_cursor.cxx" "${LIBRARY_DIR}/src/sql_cursor.cxx"
"${LIBRARY_DIR}/src/strconv.cxx"
"${LIBRARY_DIR}/src/stream_from.cxx" "${LIBRARY_DIR}/src/stream_from.cxx"
"${LIBRARY_DIR}/src/stream_to.cxx" "${LIBRARY_DIR}/src/stream_to.cxx"
"${LIBRARY_DIR}/src/subtransaction.cxx" "${LIBRARY_DIR}/src/subtransaction.cxx"
"${LIBRARY_DIR}/src/time.cxx"
"${LIBRARY_DIR}/src/transaction.cxx" "${LIBRARY_DIR}/src/transaction.cxx"
"${LIBRARY_DIR}/src/transaction_base.cxx" "${LIBRARY_DIR}/src/transaction_base.cxx"
"${LIBRARY_DIR}/src/row.cxx"
"${LIBRARY_DIR}/src/params.cxx"
"${LIBRARY_DIR}/src/util.cxx" "${LIBRARY_DIR}/src/util.cxx"
"${LIBRARY_DIR}/src/version.cxx" "${LIBRARY_DIR}/src/version.cxx"
"${LIBRARY_DIR}/src/wait.cxx"
) )
# Need to explicitly include each header file, because in the directory include/pqxx there are also files add_library(_libpqxx ${SRCS})
# like just 'array'. So if including the whole directory with `target_include_directories`, it will make
# conflicts with all includes of <array>.
set (HDRS
"${LIBRARY_DIR}/include/pqxx/array.hxx"
"${LIBRARY_DIR}/include/pqxx/params.hxx"
"${LIBRARY_DIR}/include/pqxx/binarystring.hxx"
"${LIBRARY_DIR}/include/pqxx/composite.hxx"
"${LIBRARY_DIR}/include/pqxx/connection.hxx"
"${LIBRARY_DIR}/include/pqxx/cursor.hxx"
"${LIBRARY_DIR}/include/pqxx/dbtransaction.hxx"
"${LIBRARY_DIR}/include/pqxx/errorhandler.hxx"
"${LIBRARY_DIR}/include/pqxx/except.hxx"
"${LIBRARY_DIR}/include/pqxx/field.hxx"
"${LIBRARY_DIR}/include/pqxx/isolation.hxx"
"${LIBRARY_DIR}/include/pqxx/largeobject.hxx"
"${LIBRARY_DIR}/include/pqxx/nontransaction.hxx"
"${LIBRARY_DIR}/include/pqxx/notification.hxx"
"${LIBRARY_DIR}/include/pqxx/pipeline.hxx"
"${LIBRARY_DIR}/include/pqxx/prepared_statement.hxx"
"${LIBRARY_DIR}/include/pqxx/result.hxx"
"${LIBRARY_DIR}/include/pqxx/robusttransaction.hxx"
"${LIBRARY_DIR}/include/pqxx/row.hxx"
"${LIBRARY_DIR}/include/pqxx/separated_list.hxx"
"${LIBRARY_DIR}/include/pqxx/strconv.hxx"
"${LIBRARY_DIR}/include/pqxx/stream_from.hxx"
"${LIBRARY_DIR}/include/pqxx/stream_to.hxx"
"${LIBRARY_DIR}/include/pqxx/subtransaction.hxx"
"${LIBRARY_DIR}/include/pqxx/transaction.hxx"
"${LIBRARY_DIR}/include/pqxx/transaction_base.hxx"
"${LIBRARY_DIR}/include/pqxx/types.hxx"
"${LIBRARY_DIR}/include/pqxx/util.hxx"
"${LIBRARY_DIR}/include/pqxx/version.hxx"
"${LIBRARY_DIR}/include/pqxx/zview.hxx"
)
add_library(_libpqxx ${SRCS} ${HDRS})
target_link_libraries(_libpqxx PUBLIC ch_contrib::libpq) target_link_libraries(_libpqxx PUBLIC ch_contrib::libpq)
target_include_directories (_libpqxx SYSTEM BEFORE PUBLIC "${LIBRARY_DIR}/include") target_include_directories (_libpqxx SYSTEM BEFORE PUBLIC "${LIBRARY_DIR}/include")

1
contrib/postgres vendored Submodule

@ -0,0 +1 @@
Subproject commit cfd77000af28469fcb650485bad65a35e7649e41

View File

@ -0,0 +1,78 @@
# Build description for libpq which is part of the PostgreSQL sources
set(POSTGRES_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/postgres")
set(LIBPQ_SOURCE_DIR "${POSTGRES_SOURCE_DIR}/src/interfaces/libpq")
set(LIBPQ_CMAKE_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/postgres-cmake")
set(SRCS
"${LIBPQ_SOURCE_DIR}/fe-auth.c"
"${LIBPQ_SOURCE_DIR}/fe-auth-scram.c"
"${LIBPQ_SOURCE_DIR}/fe-connect.c"
"${LIBPQ_SOURCE_DIR}/fe-exec.c"
"${LIBPQ_SOURCE_DIR}/fe-lobj.c"
"${LIBPQ_SOURCE_DIR}/fe-misc.c"
"${LIBPQ_SOURCE_DIR}/fe-print.c"
"${LIBPQ_SOURCE_DIR}/fe-trace.c"
"${LIBPQ_SOURCE_DIR}/fe-protocol3.c"
"${LIBPQ_SOURCE_DIR}/fe-secure.c"
"${LIBPQ_SOURCE_DIR}/fe-secure-common.c"
"${LIBPQ_SOURCE_DIR}/fe-secure-openssl.c"
"${LIBPQ_SOURCE_DIR}/legacy-pqsignal.c"
"${LIBPQ_SOURCE_DIR}/libpq-events.c"
"${LIBPQ_SOURCE_DIR}/pqexpbuffer.c"
"${POSTGRES_SOURCE_DIR}/src/common/scram-common.c"
"${POSTGRES_SOURCE_DIR}/src/common/sha2.c"
"${POSTGRES_SOURCE_DIR}/src/common/sha1.c"
"${POSTGRES_SOURCE_DIR}/src/common/md5.c"
"${POSTGRES_SOURCE_DIR}/src/common/md5_common.c"
"${POSTGRES_SOURCE_DIR}/src/common/hmac_openssl.c"
"${POSTGRES_SOURCE_DIR}/src/common/cryptohash.c"
"${POSTGRES_SOURCE_DIR}/src/common/saslprep.c"
"${POSTGRES_SOURCE_DIR}/src/common/unicode_norm.c"
"${POSTGRES_SOURCE_DIR}/src/common/ip.c"
"${POSTGRES_SOURCE_DIR}/src/common/jsonapi.c"
"${POSTGRES_SOURCE_DIR}/src/common/wchar.c"
"${POSTGRES_SOURCE_DIR}/src/common/base64.c"
"${POSTGRES_SOURCE_DIR}/src/common/link-canary.c"
"${POSTGRES_SOURCE_DIR}/src/common/fe_memutils.c"
"${POSTGRES_SOURCE_DIR}/src/common/string.c"
"${POSTGRES_SOURCE_DIR}/src/common/pg_get_line.c"
"${POSTGRES_SOURCE_DIR}/src/common/stringinfo.c"
"${POSTGRES_SOURCE_DIR}/src/common/psprintf.c"
"${POSTGRES_SOURCE_DIR}/src/common/encnames.c"
"${POSTGRES_SOURCE_DIR}/src/common/logging.c"
"${POSTGRES_SOURCE_DIR}/src/port/snprintf.c"
"${POSTGRES_SOURCE_DIR}/src/port/strlcpy.c"
"${POSTGRES_SOURCE_DIR}/src/port/strerror.c"
"${POSTGRES_SOURCE_DIR}/src/port/inet_net_ntop.c"
"${POSTGRES_SOURCE_DIR}/src/port/getpeereid.c"
"${POSTGRES_SOURCE_DIR}/src/port/chklocale.c"
"${POSTGRES_SOURCE_DIR}/src/port/noblock.c"
"${POSTGRES_SOURCE_DIR}/src/port/pg_strong_random.c"
"${POSTGRES_SOURCE_DIR}/src/port/pgstrcasecmp.c"
"${POSTGRES_SOURCE_DIR}/src/port/thread.c"
"${POSTGRES_SOURCE_DIR}/src/port/path.c"
)
add_library(_libpq ${SRCS})
add_definitions(-DHAVE_BIO_METH_NEW)
add_definitions(-DHAVE_HMAC_CTX_NEW)
add_definitions(-DHAVE_HMAC_CTX_FREE)
target_include_directories (_libpq SYSTEM PUBLIC ${LIBPQ_SOURCE_DIR})
target_include_directories (_libpq SYSTEM PUBLIC "${POSTGRES_SOURCE_DIR}/src/include")
target_include_directories (_libpq SYSTEM PUBLIC "${LIBPQ_CMAKE_SOURCE_DIR}") # pre-generated headers
# NOTE: this is a dirty hack to avoid and instead pg_config.h should be shipped
# for different OS'es like for jemalloc, not one generic for all OS'es like
# now.
if (OS_DARWIN OR OS_FREEBSD OR USE_MUSL)
target_compile_definitions(_libpq PRIVATE -DSTRERROR_R_INT=1)
endif()
target_link_libraries (_libpq PRIVATE OpenSSL::SSL)
add_library(ch_contrib::libpq ALIAS _libpq)

View File

@ -0,0 +1,943 @@
/* src/include/pg_config.h. Generated from pg_config.h.in by configure. */
/* src/include/pg_config.h.in. Generated from configure.in by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* The normal alignment of `double', in bytes. */
#define ALIGNOF_DOUBLE 4
/* The normal alignment of `int', in bytes. */
#define ALIGNOF_INT 4
/* The normal alignment of `long', in bytes. */
#define ALIGNOF_LONG 4
/* The normal alignment of `long long int', in bytes. */
#define ALIGNOF_LONG_LONG_INT 4
/* The normal alignment of `short', in bytes. */
#define ALIGNOF_SHORT 2
/* Size of a disk block --- this also limits the size of a tuple. You can set
it bigger if you need bigger tuples (although TOAST should reduce the need
to have large tuples, since fields can be spread across multiple tuples).
BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ is
currently 2^15 (32768). This is determined by the 15-bit widths of the
lp_off and lp_len fields in ItemIdData (see include/storage/itemid.h).
Changing BLCKSZ requires an initdb. */
#define BLCKSZ 8192
/* Define to the default TCP port number on which the server listens and to
which clients will try to connect. This can be overridden at run-time, but
it's convenient if your clients have the right default compiled in.
(--with-pgport=PORTNUM) */
#define DEF_PGPORT 5432
/* Define to the default TCP port number as a string constant. */
#define DEF_PGPORT_STR "5432"
/* Define to the file name extension of dynamically-loadable modules. */
#define DLSUFFIX ".so"
/* Define to build with GSSAPI support. (--with-gssapi) */
//#define ENABLE_GSS 0
/* Define to 1 if you want National Language Support. (--enable-nls) */
/* #undef ENABLE_NLS */
/* Define to 1 to build client libraries as thread-safe code.
(--enable-thread-safety) */
#define ENABLE_THREAD_SAFETY 1
/* Define to nothing if C supports flexible array members, and to 1 if it does
not. That way, with a declaration like `struct s { int n; double
d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
compilers. When computing the size of such an object, don't use 'sizeof
(struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
MSVC and with C++ compilers. */
#define FLEXIBLE_ARRAY_MEMBER /**/
/* float4 values are passed by value if 'true', by reference if 'false' */
#define FLOAT4PASSBYVAL true
/* float8, int8, and related values are passed by value if 'true', by
reference if 'false' */
#define FLOAT8PASSBYVAL false
/* Define to 1 if gettimeofday() takes only 1 argument. */
/* #undef GETTIMEOFDAY_1ARG */
#ifdef GETTIMEOFDAY_1ARG
# define gettimeofday(a,b) gettimeofday(a)
#endif
/* Define to 1 if you have the `append_history' function. */
/* #undef HAVE_APPEND_HISTORY */
/* Define to 1 if you want to use atomics if available. */
#define HAVE_ATOMICS 1
/* Define to 1 if you have the <atomic.h> header file. */
/* #undef HAVE_ATOMIC_H */
/* Define to 1 if you have the `cbrt' function. */
#define HAVE_CBRT 1
/* Define to 1 if you have the `class' function. */
/* #undef HAVE_CLASS */
/* Define to 1 if you have the <crtdefs.h> header file. */
/* #undef HAVE_CRTDEFS_H */
/* Define to 1 if you have the `crypt' function. */
#define HAVE_CRYPT 1
/* Define to 1 if you have the <crypt.h> header file. */
#define HAVE_CRYPT_H 1
/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
don't. */
#define HAVE_DECL_FDATASYNC 1
/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you
don't. */
#define HAVE_DECL_F_FULLFSYNC 0
/* Define to 1 if you have the declaration of `posix_fadvise', and to 0 if you
don't. */
#define HAVE_DECL_POSIX_FADVISE 1
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#define HAVE_DECL_SNPRINTF 1
/* Define to 1 if you have the declaration of `sigwait', and to 0 if you don't. */
#define HAVE_DECL_SIGWAIT 1
/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
don't. */
#if OS_DARWIN
#define HAVE_DECL_STRLCAT 1
#endif
/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
don't. */
#if OS_DARWIN
#define HAVE_DECL_STRLCPY 1
#endif
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
don't. */
#define HAVE_DECL_SYS_SIGLIST 1
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
don't. */
#define HAVE_DECL_VSNPRINTF 1
/* Define to 1 if you have the <dld.h> header file. */
/* #undef HAVE_DLD_H */
/* Define to 1 if you have the `dlopen' function. */
#define HAVE_DLOPEN 1
/* Define to 1 if you have the <editline/history.h> header file. */
/* #undef HAVE_EDITLINE_HISTORY_H */
/* Define to 1 if you have the <editline/readline.h> header file. */
#define HAVE_EDITLINE_READLINE_H 1
/* Define to 1 if you have the `fdatasync' function. */
#define HAVE_FDATASYNC 1
/* Define to 1 if you have the `fls' function. */
/* #undef HAVE_FLS */
/* Define to 1 if you have the `fpclass' function. */
/* #undef HAVE_FPCLASS */
/* Define to 1 if you have the `fp_class' function. */
/* #undef HAVE_FP_CLASS */
/* Define to 1 if you have the `fp_class_d' function. */
/* #undef HAVE_FP_CLASS_D */
/* Define to 1 if you have the <fp_class.h> header file. */
/* #undef HAVE_FP_CLASS_H */
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#define HAVE_FSEEKO 1
/* Define to 1 if your compiler understands __func__. */
#define HAVE_FUNCNAME__FUNC 1
/* Define to 1 if your compiler understands __FUNCTION__. */
/* #undef HAVE_FUNCNAME__FUNCTION */
/* Define to 1 if you have __atomic_compare_exchange_n(int *, int *, int). */
/* #undef HAVE_GCC__ATOMIC_INT32_CAS */
/* Define to 1 if you have __atomic_compare_exchange_n(int64 *, int *, int64).
*/
/* #undef HAVE_GCC__ATOMIC_INT64_CAS */
/* Define to 1 if you have __sync_lock_test_and_set(char *) and friends. */
#define HAVE_GCC__SYNC_CHAR_TAS 1
/* Define to 1 if you have __sync_compare_and_swap(int *, int, int). */
/* #undef HAVE_GCC__SYNC_INT32_CAS */
/* Define to 1 if you have __sync_lock_test_and_set(int *) and friends. */
#define HAVE_GCC__SYNC_INT32_TAS 1
/* Define to 1 if you have __sync_compare_and_swap(int64 *, int64, int64). */
/* #undef HAVE_GCC__SYNC_INT64_CAS */
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `gethostbyname_r' function. */
#define HAVE_GETHOSTBYNAME_R 1
/* Define to 1 if you have the `getifaddrs' function. */
#define HAVE_GETIFADDRS 1
/* Define to 1 if you have the `getopt' function. */
#define HAVE_GETOPT 1
/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
/* Define to 1 if you have the `getopt_long' function. */
#define HAVE_GETOPT_LONG 1
/* Define to 1 if you have the `getpeereid' function. */
/* #undef HAVE_GETPEEREID */
/* Define to 1 if you have the `getpeerucred' function. */
/* #undef HAVE_GETPEERUCRED */
/* Define to 1 if you have the `getpwuid_r' function. */
#define HAVE_GETPWUID_R 1
/* Define to 1 if you have the `getrlimit' function. */
#define HAVE_GETRLIMIT 1
/* Define to 1 if you have the `getrusage' function. */
#define HAVE_GETRUSAGE 1
/* Define to 1 if you have the `gettimeofday' function. */
/* #undef HAVE_GETTIMEOFDAY */
/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
//#define HAVE_GSSAPI_GSSAPI_H 0
/* Define to 1 if you have the <gssapi.h> header file. */
/* #undef HAVE_GSSAPI_H */
/* Define to 1 if you have the <history.h> header file. */
/* #undef HAVE_HISTORY_H */
/* Define to 1 if you have the `history_truncate_file' function. */
#define HAVE_HISTORY_TRUNCATE_FILE 1
/* Define to 1 if you have the <ieeefp.h> header file. */
/* #undef HAVE_IEEEFP_H */
/* Define to 1 if you have the <ifaddrs.h> header file. */
#define HAVE_IFADDRS_H 1
/* Define to 1 if you have the `inet_aton' function. */
#define HAVE_INET_ATON 1
/* Define to 1 if you have the `inet_pton' function. */
#define HAVE_INET_PTON 1
/* Define to 1 if the system has the type `int64'. */
/* #undef HAVE_INT64 */
/* Define to 1 if the system has the type `int8'. */
/* #undef HAVE_INT8 */
/* Define to 1 if the system has the type `intptr_t'. */
#define HAVE_INTPTR_T 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the global variable 'int opterr'. */
#define HAVE_INT_OPTERR 1
/* Define to 1 if you have the global variable 'int optreset'. */
/* #undef HAVE_INT_OPTRESET */
/* Define to 1 if you have the global variable 'int timezone'. */
#define HAVE_INT_TIMEZONE 1
/* Define to 1 if you have support for IPv6. */
#define HAVE_IPV6 1
/* Define to 1 if you have isinf(). */
#define HAVE_ISINF 1
/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
/* Define to 1 if you have the <ldap.h> header file. */
//#define HAVE_LDAP_H 0
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#define HAVE_LIBCRYPTO 1
/* Define to 1 if you have the `ldap' library (-lldap). */
//#define HAVE_LIBLDAP 0
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the `pam' library (-lpam). */
#define HAVE_LIBPAM 1
/* Define if you have a function readline library */
#define HAVE_LIBREADLINE 1
/* Define to 1 if you have the `selinux' library (-lselinux). */
/* #undef HAVE_LIBSELINUX */
/* Define to 1 if you have the `ssl' library (-lssl). */
#define HAVE_LIBSSL 0
/* Define to 1 if you have the `wldap32' library (-lwldap32). */
/* #undef HAVE_LIBWLDAP32 */
/* Define to 1 if you have the `xml2' library (-lxml2). */
#define HAVE_LIBXML2 1
/* Define to 1 if you have the `xslt' library (-lxslt). */
#define HAVE_LIBXSLT 1
/* Define to 1 if you have the `z' library (-lz). */
#define HAVE_LIBZ 1
/* Define to 1 if you have the `zstd' library (-lzstd). */
/* #undef HAVE_LIBZSTD */
/* Define to 1 if constants of type 'long long int' should have the suffix LL.
*/
#define HAVE_LL_CONSTANTS 1
/* Define to 1 if the system has the type `locale_t'. */
#define HAVE_LOCALE_T 1
/* Define to 1 if `long int' works and is 64 bits. */
/* #undef HAVE_LONG_INT_64 */
/* Define to 1 if the system has the type `long long int'. */
#define HAVE_LONG_LONG_INT 1
/* Define to 1 if `long long int' works and is 64 bits. */
#define HAVE_LONG_LONG_INT_64 1
/* Define to 1 if you have the <mbarrier.h> header file. */
/* #undef HAVE_MBARRIER_H */
/* Define to 1 if you have the `mbstowcs_l' function. */
/* #undef HAVE_MBSTOWCS_L */
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */
/* #undef HAVE_MINIDUMP_TYPE */
/* Define to 1 if you have the `mkdtemp' function. */
#define HAVE_MKDTEMP 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <netinet/tcp.h> header file. */
#define HAVE_NETINET_TCP_H 1
/* Define to 1 if you have the <net/if.h> header file. */
#define HAVE_NET_IF_H 1
/* Define to 1 if you have the <ossp/uuid.h> header file. */
/* #undef HAVE_OSSP_UUID_H */
/* Define to 1 if you have the <pam/pam_appl.h> header file. */
/* #undef HAVE_PAM_PAM_APPL_H */
/* Define to 1 if you have the `poll' function. */
#define HAVE_POLL 1
/* Define to 1 if you have the <poll.h> header file. */
#define HAVE_POLL_H 1
/* Define to 1 if you have a POSIX-conforming sigwait declaration. */
/* #undef HAVE_POSIX_DECL_SIGWAIT */
/* Define to 1 if you have the `posix_fadvise' function. */
#define HAVE_POSIX_FADVISE 1
/* Define to 1 if you have the declaration of `preadv', and to 0 if you don't. */
/* #undef HAVE_DECL_PREADV */
/* Define to 1 if you have the declaration of `pwritev', and to 0 if you don't. */
/* #define HAVE_DECL_PWRITEV */
/* Define to 1 if you have the `X509_get_signature_info' function. */
/* #undef HAVE_X509_GET_SIGNATURE_INFO */
/* Define to 1 if you have the POSIX signal interface. */
#define HAVE_POSIX_SIGNALS 1
/* Define to 1 if the assembler supports PPC's LWARX mutex hint bit. */
/* #undef HAVE_PPC_LWARX_MUTEX_HINT */
/* Define to 1 if you have the `pstat' function. */
/* #undef HAVE_PSTAT */
/* Define to 1 if the PS_STRINGS thing exists. */
/* #undef HAVE_PS_STRINGS */
/* Define to 1 if you have the `pthread_is_threaded_np' function. */
/* #undef HAVE_PTHREAD_IS_THREADED_NP */
/* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* Define to 1 if you have the <readline.h> header file. */
/* #undef HAVE_READLINE_H */
/* Define to 1 if you have the <readline/history.h> header file. */
#define HAVE_READLINE_HISTORY_H 1
/* Define to 1 if you have the <readline/readline.h> header file. */
/* #undef HAVE_READLINE_READLINE_H */
/* Define to 1 if you have the `readlink' function. */
#define HAVE_READLINK 1
/* Define to 1 if you have the `rint' function. */
#define HAVE_RINT 1
/* Define to 1 if you have the `rl_completion_matches' function. */
#define HAVE_RL_COMPLETION_MATCHES 1
/* Define to 1 if you have the `rl_filename_completion_function' function. */
#define HAVE_RL_FILENAME_COMPLETION_FUNCTION 1
/* Define to 1 if you have the `rl_reset_screen_size' function. */
/* #undef HAVE_RL_RESET_SCREEN_SIZE */
/* Define to 1 if you have the `rl_variable_bind' function. */
#define HAVE_RL_VARIABLE_BIND 1
/* Define to 1 if you have the <security/pam_appl.h> header file. */
#define HAVE_SECURITY_PAM_APPL_H 1
/* Define to 1 if you have the `setproctitle' function. */
/* #undef HAVE_SETPROCTITLE */
/* Define to 1 if you have the `setsid' function. */
#define HAVE_SETSID 1
/* Define to 1 if you have the `shm_open' function. */
#define HAVE_SHM_OPEN 1
/* Define to 1 if the system has the type `socklen_t'. */
#define HAVE_SOCKLEN_T 1
/* Define to 1 if you have the `sigprocmask' function. */
#define HAVE_SIGPROCMASK 1
/* Define to 1 if you have sigsetjmp(). */
#define HAVE_SIGSETJMP 1
/* Define to 1 if the system has the type `sig_atomic_t'. */
#define HAVE_SIG_ATOMIC_T 1
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
/* Define to 1 if you have spinlocks. */
#define HAVE_SPINLOCKS 1
/* Define to 1 if you have the `SSL_CTX_set_num_tickets' function. */
/* #define HAVE_SSL_CTX_SET_NUM_TICKETS */
/* Define to 1 if you have the `SSL_get_current_compression' function. */
#define HAVE_SSL_GET_CURRENT_COMPRESSION 0
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the `strerror_r' function. */
#define HAVE_STRERROR_R 1
/* Define to 1 if you have the <strings.h> header file. */
//#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strlcat' function. */
/* #undef HAVE_STRLCAT */
/* Define to 1 if you have the `strlcpy' function. */
/* #undef HAVE_STRLCPY */
/* Define to 1 if you have the `strtoll' function. */
#define HAVE_STRTOLL 1
#if (!OS_DARWIN)
#define HAVE_STRCHRNUL 1
#endif
/* Define to 1 if you have the `strtoq' function. */
/* #undef HAVE_STRTOQ */
/* Define to 1 if you have the `strtoull' function. */
#define HAVE_STRTOULL 1
/* Define to 1 if you have the `strtouq' function. */
/* #undef HAVE_STRTOUQ */
/* Define to 1 if the system has the type `struct addrinfo'. */
#define HAVE_STRUCT_ADDRINFO 1
/* Define to 1 if the system has the type `struct cmsgcred'. */
/* #undef HAVE_STRUCT_CMSGCRED */
/* Define to 1 if the system has the type `struct option'. */
#define HAVE_STRUCT_OPTION 1
/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
/* Define to 1 if `ss_len' is a member of `struct sockaddr_storage'. */
/* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN */
/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */
/* Define to 1 if `__ss_len' is a member of `struct sockaddr_storage'. */
/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */
/* Define to 1 if `tm_zone' is a member of `struct tm'. */
#define HAVE_STRUCT_TM_TM_ZONE 1
/* Define to 1 if you have the `symlink' function. */
#define HAVE_SYMLINK 1
/* Define to 1 if you have the `sync_file_range' function. */
/* #undef HAVE_SYNC_FILE_RANGE */
/* Define to 1 if you have the syslog interface. */
#define HAVE_SYSLOG 1
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1
/* Define to 1 if you have the <sys/ipc.h> header file. */
#define HAVE_SYS_IPC_H 1
/* Define to 1 if you have the <sys/personality.h> header file. */
/* #undef HAVE_SYS_PERSONALITY_H */
/* Define to 1 if you have the <sys/poll.h> header file. */
#define HAVE_SYS_POLL_H 1
/* Define to 1 if you have the <sys/pstat.h> header file. */
/* #undef HAVE_SYS_PSTAT_H */
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/sem.h> header file. */
#define HAVE_SYS_SEM_H 1
/* Define to 1 if you have the <sys/shm.h> header file. */
#define HAVE_SYS_SHM_H 1
/* Define to 1 if you have the <sys/signalfd.h> header file. */
/* #undef HAVE_SYS_SIGNALFD_H */
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/sockio.h> header file. */
/* #undef HAVE_SYS_SOCKIO_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/tas.h> header file. */
/* #undef HAVE_SYS_TAS_H */
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/ucred.h> header file. */
#if (OS_DARWIN || OS_FREEBSD)
#define HAVE_SYS_UCRED_H 1
#endif
/* Define to 1 if you have the <sys/un.h> header file. */
#define HAVE_SYS_UN_H 1
#define _GNU_SOURCE 1 /* Needed for glibc struct ucred */
/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
`HAVE_STRUCT_TM_TM_ZONE' instead. */
#define HAVE_TM_ZONE 1
/* Define to 1 if you have the `towlower' function. */
#define HAVE_TOWLOWER 1
/* Define to 1 if you have the external array `tzname'. */
#define HAVE_TZNAME 1
/* Define to 1 if you have the <ucred.h> header file. */
/* #undef HAVE_UCRED_H */
/* Define to 1 if the system has the type `uint64'. */
/* #undef HAVE_UINT64 */
/* Define to 1 if the system has the type `uint8'. */
/* #undef HAVE_UINT8 */
/* Define to 1 if the system has the type `uintptr_t'. */
#define HAVE_UINTPTR_T 1
/* Define to 1 if the system has the type `union semun'. */
/* #undef HAVE_UNION_SEMUN */
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have unix sockets. */
#define HAVE_UNIX_SOCKETS 1
/* Define to 1 if you have the `unsetenv' function. */
#define HAVE_UNSETENV 1
/* Define to 1 if the system has the type `unsigned long long int'. */
#define HAVE_UNSIGNED_LONG_LONG_INT 1
/* Define to 1 if you have the `utime' function. */
#define HAVE_UTIME 1
/* Define to 1 if you have the `utimes' function. */
#define HAVE_UTIMES 1
/* Define to 1 if you have the <utime.h> header file. */
#define HAVE_UTIME_H 1
/* Define to 1 if you have BSD UUID support. */
/* #undef HAVE_UUID_BSD */
/* Define to 1 if you have E2FS UUID support. */
/* #undef HAVE_UUID_E2FS */
/* Define to 1 if you have the <uuid.h> header file. */
#define HAVE_UUID_H 1
/* Define to 1 if you have OSSP UUID support. */
#define HAVE_UUID_OSSP 1
/* Define to 1 if you have the <uuid/uuid.h> header file. */
/* #undef HAVE_UUID_UUID_H */
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
/* Define to 1 if you have the <wchar.h> header file. */
#define HAVE_WCHAR_H 1
/* Define to 1 if you have the `wcstombs' function. */
#define HAVE_WCSTOMBS 1
/* Define to 1 if you have the `wcstombs_l' function. */
/* #undef HAVE_WCSTOMBS_L */
/* Define to 1 if you have the <wctype.h> header file. */
#define HAVE_WCTYPE_H 1
/* Define to 1 if you have the <winldap.h> header file. */
/* #undef HAVE_WINLDAP_H */
/* Define to 1 if your compiler understands __builtin_bswap32. */
/* #undef HAVE__BUILTIN_BSWAP32 */
/* Define to 1 if your compiler understands __builtin_constant_p. */
#define HAVE__BUILTIN_CONSTANT_P 1
/* Define to 1 if your compiler understands __builtin_frame_address. */
/* #undef HAVE__BUILTIN_FRAME_ADDRESS */
/* Define to 1 if your compiler understands __builtin_types_compatible_p. */
#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1
/* Define to 1 if your compiler understands __builtin_unreachable. */
/* #undef HAVE__BUILTIN_UNREACHABLE */
/* Define to 1 if you have __cpuid. */
/* #undef HAVE__CPUID */
/* Define to 1 if you have __get_cpuid. */
/* #undef HAVE__GET_CPUID */
/* Define to 1 if your compiler understands _Static_assert. */
/* #undef HAVE__STATIC_ASSERT */
/* Define to 1 if your compiler understands __VA_ARGS__ in macros. */
#define HAVE__VA_ARGS 1
/* Define to the appropriate snprintf length modifier for 64-bit ints. */
#define INT64_MODIFIER "ll"
/* Define to 1 if `locale_t' requires <xlocale.h>. */
/* #undef LOCALE_T_IN_XLOCALE */
/* Define as the maximum alignment requirement of any C data type. */
#define MAXIMUM_ALIGNOF 4
/* Define bytes to use libc memset(). */
#define MEMSET_LOOP_LIMIT 1024
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "PostgreSQL"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "PostgreSQL 9.5.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "postgresql"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "9.5.4"
/* Define to the name of a signed 128-bit integer type. */
/* #undef PG_INT128_TYPE */
/* Define to the name of a signed 64-bit integer type. */
#define PG_INT64_TYPE long long int
/* Define to the name of the default PostgreSQL service principal in Kerberos
(GSSAPI). (--with-krb-srvnam=NAME) */
#define PG_KRB_SRVNAM "postgres"
/* PostgreSQL major version as a string */
#define PG_MAJORVERSION "9.5"
/* Define to gnu_printf if compiler supports it, else printf. */
#define PG_PRINTF_ATTRIBUTE printf
/* Define to 1 if "static inline" works without unwanted warnings from
compilations where static inline functions are defined but not called. */
#define PG_USE_INLINE 1
/* PostgreSQL version as a string */
#define PG_VERSION "9.5.4"
/* PostgreSQL version as a number */
#define PG_VERSION_NUM 90504
/* A string containing the version number, platform, and C compiler */
#define PG_VERSION_STR "PostgreSQL 9.5.4 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55), 32-bit"
/* Define to 1 to allow profiling output to be saved separately for each
process. */
/* #undef PROFILE_PID_DIR */
/* RELSEG_SIZE is the maximum number of blocks allowed in one disk file. Thus,
the maximum size of a single file is RELSEG_SIZE * BLCKSZ; relations bigger
than that are divided into multiple files. RELSEG_SIZE * BLCKSZ must be
less than your OS' limit on file size. This is often 2 GB or 4GB in a
32-bit operating system, unless you have large file support enabled. By
default, we make the limit 1 GB to avoid any possible integer-overflow
problems within the OS. A limit smaller than necessary only means we divide
a large relation into more chunks than necessary, so it seems best to err
in the direction of a small limit. A power-of-2 value is recommended to
save a few cycles in md.c, but is not absolutely required. Changing
RELSEG_SIZE requires an initdb. */
#define RELSEG_SIZE 131072
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if strerror_r() returns a int. */
/* #undef STRERROR_R_INT */
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */
/* Define to 1 to build with assertion checks. (--enable-cassert) */
/* #undef USE_ASSERT_CHECKING */
/* Define to 1 to build with Bonjour support. (--with-bonjour) */
/* #undef USE_BONJOUR */
/* Define to 1 if you want float4 values to be passed by value.
(--enable-float4-byval) */
#define USE_FLOAT4_BYVAL 1
/* Define to 1 if you want float8, int8, etc values to be passed by value.
(--enable-float8-byval) */
/* #undef USE_FLOAT8_BYVAL */
/* Define to 1 if you want 64-bit integer timestamp and interval support.
(--enable-integer-datetimes) */
#define USE_INTEGER_DATETIMES 1
/* Define to 1 to build with LDAP support. (--with-ldap) */
//#define USE_LDAP 0
/* Define to 1 to build with XML support. (--with-libxml) */
#define USE_LIBXML 1
/* Define to 1 to use XSLT support when building contrib/xml2.
(--with-libxslt) */
#define USE_LIBXSLT 1
/* Define to select named POSIX semaphores. */
/* #undef USE_NAMED_POSIX_SEMAPHORES */
/* Define to build with OpenSSL support. (--with-openssl) */
#define USE_OPENSSL 0
#define USE_OPENSSL_RANDOM 0
#define FRONTEND 1
/* Define to 1 to build with PAM support. (--with-pam) */
#define USE_PAM 1
/* Use replacement snprintf() functions. */
/* #undef USE_REPL_SNPRINTF */
/* Define to 1 to use Intel SSE 4.2 CRC instructions with a runtime check. */
#define USE_SLICING_BY_8_CRC32C 1
/* Define to 1 use Intel SSE 4.2 CRC instructions. */
/* #undef USE_SSE42_CRC32C */
/* Define to 1 to use Intel SSSE 4.2 CRC instructions with a runtime check. */
/* #undef USE_SSE42_CRC32C_WITH_RUNTIME_CHECK */
/* Define to select SysV-style semaphores. */
#define USE_SYSV_SEMAPHORES 1
/* Define to select SysV-style shared memory. */
#define USE_SYSV_SHARED_MEMORY 1
/* Define to select unnamed POSIX semaphores. */
/* #undef USE_UNNAMED_POSIX_SEMAPHORES */
/* Define to select Win32-style semaphores. */
/* #undef USE_WIN32_SEMAPHORES */
/* Define to select Win32-style shared memory. */
/* #undef USE_WIN32_SHARED_MEMORY */
/* Define to 1 to build with ZSTD support. (--with-zstd) */
/* #undef USE_ZSTD */
/* Define to 1 if `wcstombs_l' requires <xlocale.h>. */
/* #undef WCSTOMBS_L_IN_XLOCALE */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Size of a WAL file block. This need have no particular relation to BLCKSZ.
XLOG_BLCKSZ must be a power of 2, and if your system supports O_DIRECT I/O,
XLOG_BLCKSZ must be a multiple of the alignment requirement for direct-I/O
buffers, else direct I/O may fail. Changing XLOG_BLCKSZ requires an initdb.
*/
#define XLOG_BLCKSZ 8192
/* XLOG_SEG_SIZE is the size of a single WAL file. This must be a power of 2
and larger than XLOG_BLCKSZ (preferably, a great deal larger than
XLOG_BLCKSZ). Changing XLOG_SEG_SIZE requires an initdb. */
#define XLOG_SEG_SIZE (16 * 1024 * 1024)
/* Number of bits in a file offset, on hosts where this is settable. */
#define _FILE_OFFSET_BITS 64
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
/* #undef _LARGEFILE_SOURCE */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to the type of a signed integer type wide enough to hold a pointer,
if such a type exists, and if the system does not define it. */
/* #undef intptr_t */
/* Define to empty if the C compiler does not understand signed types. */
/* #undef signed */
/* Define to the type of an unsigned integer type wide enough to hold a
pointer, if such a type exists, and if the system does not define it. */
/* #undef uintptr_t */

View File

@ -0,0 +1,7 @@
/*
* * src/include/pg_config_ext.h.in. This is generated manually, not by
* * autoheader, since we want to limit which symbols get defined here.
* */
/* Define to the name of a signed 64-bit integer type. */
#define PG_INT64_TYPE long long int

View File

@ -0,0 +1,34 @@
#if defined(OS_DARWIN)
/* src/include/port/darwin.h */
#define __darwin__ 1
#if HAVE_DECL_F_FULLFSYNC /* not present before macOS 10.3 */
#define HAVE_FSYNC_WRITETHROUGH
#endif
#else
/* src/include/port/linux.h */
/*
* As of July 2007, all known versions of the Linux kernel will sometimes
* return EIDRM for a shmctl() operation when EINVAL is correct (it happens
* when the low-order 15 bits of the supplied shm ID match the slot number
* assigned to a newer shmem segment). We deal with this by assuming that
* EIDRM means EINVAL in PGSharedMemoryIsInUse(). This is reasonably safe
* since in fact Linux has no excuse for ever returning EIDRM; it doesn't
* track removed segments in a way that would allow distinguishing them from
* private ones. But someday that code might get upgraded, and we'd have
* to have a kernel version test here.
*/
#define HAVE_LINUX_EIDRM_BUG
/*
* Set the default wal_sync_method to fdatasync. With recent Linux versions,
* xlogdefs.h's normal rules will prefer open_datasync, which (a) doesn't
* perform better and (b) causes outright failures on ext4 data=journal
* filesystems, because those don't support O_DIRECT.
*/
#define PLATFORM_DEFAULT_SYNC_METHOD SYNC_METHOD_FDATASYNC
#endif

View File

@ -0,0 +1,12 @@
#define PGBINDIR "/bin"
#define PGSHAREDIR "/share"
#define SYSCONFDIR "/etc"
#define INCLUDEDIR "/include"
#define PKGINCLUDEDIR "/include"
#define INCLUDEDIRSERVER "/include/server"
#define LIBDIR "/lib"
#define PKGLIBDIR "/lib"
#define LOCALEDIR "/share/locale"
#define DOCDIR "/doc"
#define HTMLDIR "/doc"
#define MANDIR "/man"

View File

View File

@ -109,7 +109,7 @@ if [ -n "$CLICKHOUSE_USER" ] && [ "$CLICKHOUSE_USER" != "default" ] || [ -n "$CL
<networks> <networks>
<ip>::/0</ip> <ip>::/0</ip>
</networks> </networks>
<password>${CLICKHOUSE_PASSWORD}</password> <password><![CDATA[${CLICKHOUSE_PASSWORD//]]>/]]]]><![CDATA[>}]]></password>
<quota>default</quota> <quota>default</quota>
<access_management>${CLICKHOUSE_ACCESS_MANAGEMENT}</access_management> <access_management>${CLICKHOUSE_ACCESS_MANAGEMENT}</access_management>
</${CLICKHOUSE_USER}> </${CLICKHOUSE_USER}>

View File

@ -124,6 +124,8 @@ function setup_logs_replication
check_logs_credentials || return 0 check_logs_credentials || return 0
__set_connection_args __set_connection_args
echo "My hostname is ${HOSTNAME}"
echo 'Create all configured system logs' echo 'Create all configured system logs'
clickhouse-client --query "SYSTEM FLUSH LOGS" clickhouse-client --query "SYSTEM FLUSH LOGS"
@ -184,7 +186,17 @@ function setup_logs_replication
/^TTL /d /^TTL /d
') ')
echo -e "Creating remote destination table ${table}_${hash} with statement:\n${statement}" >&2 echo -e "Creating remote destination table ${table}_${hash} with statement:" >&2
echo "::group::${table}"
# there's the only way big "$statement" can be printed without causing EAGAIN error
# cat: write error: Resource temporarily unavailable
statement_print="${statement}"
if [ "${#statement_print}" -gt 4000 ]; then
statement_print="${statement::1999}\n…\n${statement:${#statement}-1999}"
fi
echo -e "$statement_print"
echo "::endgroup::"
echo "$statement" | clickhouse-client --database_replicated_initial_query_timeout_sec=10 \ echo "$statement" | clickhouse-client --database_replicated_initial_query_timeout_sec=10 \
--distributed_ddl_task_timeout=30 --distributed_ddl_output_mode=throw_only_active \ --distributed_ddl_task_timeout=30 --distributed_ddl_output_mode=throw_only_active \

View File

@ -13,16 +13,17 @@ Here is a complete list of available database engines. Follow the links for more
- [Atomic](../../engines/database-engines/atomic.md) - [Atomic](../../engines/database-engines/atomic.md)
- [MySQL](../../engines/database-engines/mysql.md) - [Lazy](../../engines/database-engines/lazy.md)
- [MaterializedPostgreSQL](../../engines/database-engines/materialized-postgresql.md)
- [MaterializedMySQL](../../engines/database-engines/materialized-mysql.md) - [MaterializedMySQL](../../engines/database-engines/materialized-mysql.md)
- [Lazy](../../engines/database-engines/lazy.md) - [MySQL](../../engines/database-engines/mysql.md)
- [PostgreSQL](../../engines/database-engines/postgresql.md) - [PostgreSQL](../../engines/database-engines/postgresql.md)
- [MaterializedPostgreSQL](../../engines/database-engines/materialized-postgresql.md)
- [Replicated](../../engines/database-engines/replicated.md) - [Replicated](../../engines/database-engines/replicated.md)
- [SQLite](../../engines/database-engines/sqlite.md) - [SQLite](../../engines/database-engines/sqlite.md)

View File

@ -155,6 +155,12 @@ Replication of [**TOAST**](https://www.postgresql.org/docs/9.5/storage-toast.htm
Sets a comma-separated list of PostgreSQL database tables, which will be replicated via [MaterializedPostgreSQL](../../engines/database-engines/materialized-postgresql.md) database engine. Sets a comma-separated list of PostgreSQL database tables, which will be replicated via [MaterializedPostgreSQL](../../engines/database-engines/materialized-postgresql.md) database engine.
Each table can have subset of replicated columns in brackets. If subset of columns is omitted, then all columns for table will be replicated.
``` sql
materialized_postgresql_tables_list = 'table1(co1, col2),table2,table3(co3, col5, col7)
```
Default value: empty list — means whole PostgreSQL database will be replicated. Default value: empty list — means whole PostgreSQL database will be replicated.
### `materialized_postgresql_schema` {#materialized-postgresql-schema} ### `materialized_postgresql_schema` {#materialized-postgresql-schema}

View File

@ -0,0 +1,72 @@
---
slug: /en/engines/table-engines/integrations/azure-queue
sidebar_position: 181
sidebar_label: AzureQueue
---
# AzureQueue Table Engine
This engine provides an integration with [Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs) ecosystem, allowing streaming data import.
## Create Table {#creating-a-table}
``` sql
CREATE TABLE test (name String, value UInt32)
ENGINE = AzureQueue(...)
[SETTINGS]
[mode = '',]
[after_processing = 'keep',]
[keeper_path = '',]
...
```
**Engine parameters**
`AzureQueue` parameters are the same as `AzureBlobStorage` table engine supports. See parameters section [here](../../../engines/table-engines/integrations/azureBlobStorage.md).
**Example**
```sql
CREATE TABLE azure_queue_engine_table (name String, value UInt32)
ENGINE=AzureQueue('DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite1:10000/devstoreaccount1/data/')
SETTINGS
mode = 'unordered'
```
## Settings {#settings}
The set of supported settings is the same as for `S3Queue` table engine, but without `s3queue_` prefix. See [full list of settings settings](../../../engines/table-engines/integrations/s3queue.md#settings).
## Description {#description}
`SELECT` is not particularly useful for streaming import (except for debugging), because each file can be imported only once. It is more practical to create real-time threads using [materialized views](../../../sql-reference/statements/create/view.md). To do this:
1. Use the engine to create a table for consuming from specified path in S3 and consider it a data stream.
2. Create a table with the desired structure.
3. Create a materialized view that converts data from the engine and puts it into a previously created table.
When the `MATERIALIZED VIEW` joins the engine, it starts collecting data in the background.
Example:
``` sql
CREATE TABLE azure_queue_engine_table (name String, value UInt32)
ENGINE=AzureQueue('<endpoint>', 'CSV', 'gzip')
SETTINGS
mode = 'unordered';
CREATE TABLE stats (name String, value UInt32)
ENGINE = MergeTree() ORDER BY name;
CREATE MATERIALIZED VIEW consumer TO stats
AS SELECT name, value FROM azure_queue_engine_table;
SELECT * FROM stats ORDER BY name;
```
## Virtual columns {#virtual-columns}
- `_path` — Path to the file.
- `_file` — Name of the file.
For more information about virtual columns see [here](../../../engines/table-engines/index.md#table_engines-virtual_columns).

View File

@ -112,7 +112,7 @@ Example:
``` ```
The NATS server configuration can be added using the ClickHouse config file. The NATS server configuration can be added using the ClickHouse config file.
More specifically you can add Redis password for NATS engine: More specifically you can add Redis password for NATS engine:
``` xml ``` xml
<nats> <nats>
@ -167,7 +167,7 @@ If you want to change the target table by using `ALTER`, we recommend disabling
- `_subject` - NATS message subject. Data type: `String`. - `_subject` - NATS message subject. Data type: `String`.
Additional virtual columns when `kafka_handle_error_mode='stream'`: Additional virtual columns when `nats_handle_error_mode='stream'`:
- `_raw_message` - Raw message that couldn't be parsed successfully. Data type: `Nullable(String)`. - `_raw_message` - Raw message that couldn't be parsed successfully. Data type: `Nullable(String)`.
- `_error` - Exception message happened during failed parsing. Data type: `Nullable(String)`. - `_error` - Exception message happened during failed parsing. Data type: `Nullable(String)`.

View File

@ -35,7 +35,7 @@ CREATE TABLE s3_engine_table (name String, value UInt32)
[SETTINGS ...] [SETTINGS ...]
``` ```
### Engine parameters ### Engine parameters {#parameters}
- `path` — Bucket url with path to file. Supports following wildcards in readonly mode: `*`, `**`, `?`, `{abc,def}` and `{N..M}` where `N`, `M` — numbers, `'abc'`, `'def'` — strings. For more information see [below](#wildcards-in-path). - `path` — Bucket url with path to file. Supports following wildcards in readonly mode: `*`, `**`, `?`, `{abc,def}` and `{N..M}` where `N`, `M` — numbers, `'abc'`, `'def'` — strings. For more information see [below](#wildcards-in-path).
- `NOSIGN` - If this keyword is provided in place of credentials, all the requests will not be signed. - `NOSIGN` - If this keyword is provided in place of credentials, all the requests will not be signed.

View File

@ -5,6 +5,7 @@ sidebar_label: S3Queue
--- ---
# S3Queue Table Engine # S3Queue Table Engine
This engine provides integration with [Amazon S3](https://aws.amazon.com/s3/) ecosystem and allows streaming import. This engine is similar to the [Kafka](../../../engines/table-engines/integrations/kafka.md), [RabbitMQ](../../../engines/table-engines/integrations/rabbitmq.md) engines, but provides S3-specific features. This engine provides integration with [Amazon S3](https://aws.amazon.com/s3/) ecosystem and allows streaming import. This engine is similar to the [Kafka](../../../engines/table-engines/integrations/kafka.md), [RabbitMQ](../../../engines/table-engines/integrations/rabbitmq.md) engines, but provides S3-specific features.
## Create Table {#creating-a-table} ## Create Table {#creating-a-table}
@ -16,27 +17,25 @@ CREATE TABLE s3_queue_engine_table (name String, value UInt32)
[mode = '',] [mode = '',]
[after_processing = 'keep',] [after_processing = 'keep',]
[keeper_path = '',] [keeper_path = '',]
[s3queue_loading_retries = 0,] [loading_retries = 0,]
[s3queue_processing_threads_num = 1,] [processing_threads_num = 1,]
[s3queue_enable_logging_to_s3queue_log = 0,] [enable_logging_to_s3queue_log = 0,]
[s3queue_polling_min_timeout_ms = 1000,] [polling_min_timeout_ms = 1000,]
[s3queue_polling_max_timeout_ms = 10000,] [polling_max_timeout_ms = 10000,]
[s3queue_polling_backoff_ms = 0,] [polling_backoff_ms = 0,]
[s3queue_tracked_file_ttl_sec = 0,] [tracked_file_ttl_sec = 0,]
[s3queue_tracked_files_limit = 1000,] [tracked_files_limit = 1000,]
[s3queue_cleanup_interval_min_ms = 10000,] [cleanup_interval_min_ms = 10000,]
[s3queue_cleanup_interval_max_ms = 30000,] [cleanup_interval_max_ms = 30000,]
``` ```
Starting with `24.7` settings without `s3queue_` prefix are also supported. :::warning
Before `24.7`, it is required to use `s3queue_` prefix for all settings apart from `mode`, `after_processing` and `keeper_path`.
:::
**Engine parameters** **Engine parameters**
- `path` — Bucket url with path to file. Supports following wildcards in readonly mode: `*`, `**`, `?`, `{abc,def}` and `{N..M}` where `N`, `M` — numbers, `'abc'`, `'def'` — strings. For more information see [below](#wildcards-in-path). `S3Queue` parameters are the same as `S3` table engine supports. See parameters section [here](../../../engines/table-engines/integrations/s3.md#parameters).
- `NOSIGN` - If this keyword is provided in place of credentials, all the requests will not be signed.
- `format` — The [format](../../../interfaces/formats.md#formats) of the file.
- `aws_access_key_id`, `aws_secret_access_key` - Long-term credentials for the [AWS](https://aws.amazon.com/) account user. You can use these to authenticate your requests. Parameter is optional. If credentials are not specified, they are used from the configuration file. For more information see [Using S3 for Data Storage](../mergetree-family/mergetree.md#table_engine-mergetree-s3).
- `compression` — Compression type. Supported values: `none`, `gzip/gz`, `brotli/br`, `xz/LZMA`, `zstd/zst`. Parameter is optional. By default, it will autodetect compression by file extension.
**Example** **Example**

View File

@ -107,6 +107,10 @@ The vector similarity index currently does not work with per-table, non-default
[here](https://github.com/ClickHouse/ClickHouse/pull/51325#issuecomment-1605920475)). If necessary, the value must be changed in config.xml. [here](https://github.com/ClickHouse/ClickHouse/pull/51325#issuecomment-1605920475)). If necessary, the value must be changed in config.xml.
::: :::
Vector index creation is known to be slow. To speed the process up, index creation can be parallelized. The maximum number of threads can be
configured using server configuration
setting [max_build_vector_similarity_index_thread_pool_size](../../../operations/server-configuration-parameters/settings.md#server_configuration_parameters_max_build_vector_similarity_index_thread_pool_size).
ANN indexes are built during column insertion and merge. As a result, `INSERT` and `OPTIMIZE` statements will be slower than for ordinary ANN indexes are built during column insertion and merge. As a result, `INSERT` and `OPTIMIZE` statements will be slower than for ordinary
tables. ANNIndexes are ideally used only with immutable or rarely changed data, respectively when are far more read requests than write tables. ANNIndexes are ideally used only with immutable or rarely changed data, respectively when are far more read requests than write
requests. requests.

View File

@ -995,34 +995,42 @@ They can be used for prewhere optimization only if we enable `set allow_statisti
The minimum and maximum column value which allows to estimate the selectivity of range filters on numeric columns. The minimum and maximum column value which allows to estimate the selectivity of range filters on numeric columns.
Syntax: `minmax`
- `TDigest` - `TDigest`
[TDigest](https://github.com/tdunning/t-digest) sketches which allow to compute approximate percentiles (e.g. the 90th percentile) for numeric columns. [TDigest](https://github.com/tdunning/t-digest) sketches which allow to compute approximate percentiles (e.g. the 90th percentile) for numeric columns.
Syntax: `tdigest`
- `Uniq` - `Uniq`
[HyperLogLog](https://en.wikipedia.org/wiki/HyperLogLog) sketches which provide an estimation how many distinct values a column contains. [HyperLogLog](https://en.wikipedia.org/wiki/HyperLogLog) sketches which provide an estimation how many distinct values a column contains.
- `count_min` Syntax: `uniq`
[Count-min](https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch) sketches which provide an approximate count of the frequency of each value in a column. - `CountMin`
[CountMin](https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch) sketches which provide an approximate count of the frequency of each value in a column.
Syntax `countmin`
### Supported Data Types {#supported-data-types} ### Supported Data Types {#supported-data-types}
| | (U)Int* | Float* | Decimal(*) | Date* | Boolean | Enum* | (Fixed)String | | | (U)Int*, Float*, Decimal(*), Date*, Boolean, Enum* | String or FixedString |
|-----------|---------|--------|------------|-------|---------|-------|------------------| |-----------|----------------------------------------------------|-----------------------|
| count_min | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | CountMin | ✔ | ✔ |
| MinMax | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✗ | | MinMax | ✔ | ✗ |
| TDigest | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✗ | | TDigest | ✔ | ✗ |
| Uniq | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | | Uniq | ✔ | ✔ |
### Supported Operations {#supported-operations} ### Supported Operations {#supported-operations}
| | Equality filters (==) | Range filters (>, >=, <, <=) | | | Equality filters (==) | Range filters (>, >=, <, <=) |
|-----------|-----------------------|------------------------------| |-----------|-----------------------|------------------------------|
| count_min | ✔ | ✗ | | CountMin | ✔ | ✗ |
| MinMax | ✗ | ✔ | | MinMax | ✗ | ✔ |
| TDigest | ✗ | ✔ | | TDigest | ✗ | ✔ |
| Uniq | ✔ | ✗ | | Uniq | ✔ | ✗ |

View File

@ -97,7 +97,7 @@ If you want to change the target table by using `ALTER`, we recommend disabling
- `_filename` - Name of the log file. Data type: `LowCardinality(String)`. - `_filename` - Name of the log file. Data type: `LowCardinality(String)`.
- `_offset` - Offset in the log file. Data type: `UInt64`. - `_offset` - Offset in the log file. Data type: `UInt64`.
Additional virtual columns when `kafka_handle_error_mode='stream'`: Additional virtual columns when `handle_error_mode='stream'`:
- `_raw_record` - Raw record that couldn't be parsed successfully. Data type: `Nullable(String)`. - `_raw_record` - Raw record that couldn't be parsed successfully. Data type: `Nullable(String)`.
- `_error` - Exception message happened during failed parsing. Data type: `Nullable(String)`. - `_error` - Exception message happened during failed parsing. Data type: `Nullable(String)`.

View File

@ -826,17 +826,17 @@ Result:
## JSONAsObject {#jsonasobject} ## JSONAsObject {#jsonasobject}
In this format, a single JSON object is interpreted as a single [Object('json')](/docs/en/sql-reference/data-types/json.md) value. If the input has several JSON objects (comma separated), they are interpreted as separate rows. If the input data is enclosed in square brackets, it is interpreted as an array of JSONs. In this format, a single JSON object is interpreted as a single [JSON](/docs/en/sql-reference/data-types/newjson.md) value. If the input has several JSON objects (comma separated), they are interpreted as separate rows. If the input data is enclosed in square brackets, it is interpreted as an array of JSONs.
This format can only be parsed for a table with a single field of type [Object('json')](/docs/en/sql-reference/data-types/json.md). The remaining columns must be set to [DEFAULT](/docs/en/sql-reference/statements/create/table.md/#default) or [MATERIALIZED](/docs/en/sql-reference/statements/create/table.md/#materialized). This format can only be parsed for a table with a single field of type [JSON](/docs/en/sql-reference/data-types/newjson.md). The remaining columns must be set to [DEFAULT](/docs/en/sql-reference/statements/create/table.md/#default) or [MATERIALIZED](/docs/en/sql-reference/statements/create/table.md/#materialized).
**Examples** **Examples**
Query: Query:
``` sql ``` sql
SET allow_experimental_object_type = 1; SET allow_experimental_json_type = 1;
CREATE TABLE json_as_object (json Object('json')) ENGINE = Memory; CREATE TABLE json_as_object (json JSON) ENGINE = Memory;
INSERT INTO json_as_object (json) FORMAT JSONAsObject {"foo":{"bar":{"x":"y"},"baz":1}},{},{"any json stucture":1} INSERT INTO json_as_object (json) FORMAT JSONAsObject {"foo":{"bar":{"x":"y"},"baz":1}},{},{"any json stucture":1}
SELECT * FROM json_as_object FORMAT JSONEachRow; SELECT * FROM json_as_object FORMAT JSONEachRow;
``` ```
@ -844,9 +844,9 @@ SELECT * FROM json_as_object FORMAT JSONEachRow;
Result: Result:
``` response ``` response
{"json":{"any json stucture":0,"foo":{"bar":{"x":"y"},"baz":1}}} {"json":{"foo":{"bar":{"x":"y"},"baz":"1"}}}
{"json":{"any json stucture":0,"foo":{"bar":{"x":""},"baz":0}}} {"json":{}}
{"json":{"any json stucture":1,"foo":{"bar":{"x":""},"baz":0}}} {"json":{"any json stucture":"1"}}
``` ```
**An array of JSON objects** **An array of JSON objects**
@ -854,35 +854,34 @@ Result:
Query: Query:
``` sql ``` sql
SET allow_experimental_object_type = 1; SET allow_experimental_json_type = 1;
CREATE TABLE json_square_brackets (field Object('json')) ENGINE = Memory; CREATE TABLE json_square_brackets (field JSON) ENGINE = Memory;
INSERT INTO json_square_brackets FORMAT JSONAsObject [{"id": 1, "name": "name1"}, {"id": 2, "name": "name2"}]; INSERT INTO json_square_brackets FORMAT JSONAsObject [{"id": 1, "name": "name1"}, {"id": 2, "name": "name2"}];
SELECT * FROM json_square_brackets FORMAT JSONEachRow; SELECT * FROM json_square_brackets FORMAT JSONEachRow;
``` ```
Result: Result:
```response ```response
{"field":{"id":1,"name":"name1"}} {"field":{"id":"1","name":"name1"}}
{"field":{"id":2,"name":"name2"}} {"field":{"id":"2","name":"name2"}}
``` ```
**Columns with default values** **Columns with default values**
```sql ```sql
SET allow_experimental_object_type = 1; SET allow_experimental_json_type = 1;
CREATE TABLE json_as_object (json Object('json'), time DateTime MATERIALIZED now()) ENGINE = Memory; CREATE TABLE json_as_object (json JSON, time DateTime MATERIALIZED now()) ENGINE = Memory;
INSERT INTO json_as_object (json) FORMAT JSONAsObject {"foo":{"bar":{"x":"y"},"baz":1}}; INSERT INTO json_as_object (json) FORMAT JSONAsObject {"foo":{"bar":{"x":"y"},"baz":1}};
INSERT INTO json_as_object (json) FORMAT JSONAsObject {}; INSERT INTO json_as_object (json) FORMAT JSONAsObject {};
INSERT INTO json_as_object (json) FORMAT JSONAsObject {"any json stucture":1} INSERT INTO json_as_object (json) FORMAT JSONAsObject {"any json stucture":1}
SELECT * FROM json_as_object FORMAT JSONEachRow SELECT time, json FROM json_as_object FORMAT JSONEachRow
``` ```
```resonse ```resonse
{"json":{"any json stucture":0,"foo":{"bar":{"x":"y"},"baz":1}},"time":"2024-07-25 17:02:45"} {"time":"2024-09-16 12:18:10","json":{}}
{"json":{"any json stucture":0,"foo":{"bar":{"x":""},"baz":0}},"time":"2024-07-25 17:02:47"} {"time":"2024-09-16 12:18:13","json":{"any json stucture":"1"}}
{"json":{"any json stucture":1,"foo":{"bar":{"x":""},"baz":0}},"time":"2024-07-25 17:02:50"} {"time":"2024-09-16 12:18:08","json":{"foo":{"bar":{"x":"y"},"baz":"1"}}}
``` ```
## JSONCompact {#jsoncompact} ## JSONCompact {#jsoncompact}
@ -1396,6 +1395,7 @@ SELECT * FROM json_each_row_nested
- [input_format_json_ignore_unknown_keys_in_named_tuple](/docs/en/operations/settings/settings-formats.md/#input_format_json_ignore_unknown_keys_in_named_tuple) - ignore unknown keys in json object for named tuples. Default value - `false`. - [input_format_json_ignore_unknown_keys_in_named_tuple](/docs/en/operations/settings/settings-formats.md/#input_format_json_ignore_unknown_keys_in_named_tuple) - ignore unknown keys in json object for named tuples. Default value - `false`.
- [input_format_json_compact_allow_variable_number_of_columns](/docs/en/operations/settings/settings-formats.md/#input_format_json_compact_allow_variable_number_of_columns) - allow variable number of columns in JSONCompact/JSONCompactEachRow format, ignore extra columns and use default values on missing columns. Default value - `false`. - [input_format_json_compact_allow_variable_number_of_columns](/docs/en/operations/settings/settings-formats.md/#input_format_json_compact_allow_variable_number_of_columns) - allow variable number of columns in JSONCompact/JSONCompactEachRow format, ignore extra columns and use default values on missing columns. Default value - `false`.
- [input_format_json_throw_on_bad_escape_sequence](/docs/en/operations/settings/settings-formats.md/#input_format_json_throw_on_bad_escape_sequence) - throw an exception if JSON string contains bad escape sequence. If disabled, bad escape sequences will remain as is in the data. Default value - `true`. - [input_format_json_throw_on_bad_escape_sequence](/docs/en/operations/settings/settings-formats.md/#input_format_json_throw_on_bad_escape_sequence) - throw an exception if JSON string contains bad escape sequence. If disabled, bad escape sequences will remain as is in the data. Default value - `true`.
- [input_format_json_empty_as_default](/docs/en/operations/settings/settings-formats.md/#input_format_json_empty_as_default) - treat empty fields in JSON input as default values. Default value - `false`. For complex default expressions [input_format_defaults_for_omitted_fields](/docs/en/operations/settings/settings-formats.md/#input_format_defaults_for_omitted_fields) must be enabled too.
- [output_format_json_quote_64bit_integers](/docs/en/operations/settings/settings-formats.md/#output_format_json_quote_64bit_integers) - controls quoting of 64-bit integers in JSON output format. Default value - `true`. - [output_format_json_quote_64bit_integers](/docs/en/operations/settings/settings-formats.md/#output_format_json_quote_64bit_integers) - controls quoting of 64-bit integers in JSON output format. Default value - `true`.
- [output_format_json_quote_64bit_floats](/docs/en/operations/settings/settings-formats.md/#output_format_json_quote_64bit_floats) - controls quoting of 64-bit floats in JSON output format. Default value - `false`. - [output_format_json_quote_64bit_floats](/docs/en/operations/settings/settings-formats.md/#output_format_json_quote_64bit_floats) - controls quoting of 64-bit floats in JSON output format. Default value - `false`.
- [output_format_json_quote_denormals](/docs/en/operations/settings/settings-formats.md/#output_format_json_quote_denormals) - enables '+nan', '-nan', '+inf', '-inf' outputs in JSON output format. Default value - `false`. - [output_format_json_quote_denormals](/docs/en/operations/settings/settings-formats.md/#output_format_json_quote_denormals) - enables '+nan', '-nan', '+inf', '-inf' outputs in JSON output format. Default value - `false`.

View File

@ -233,6 +233,16 @@ Features:
- Useful tools: Zookeeper data exploration, query EXPLAIN, kill queries, etc. - Useful tools: Zookeeper data exploration, query EXPLAIN, kill queries, etc.
- Visualization metric charts: queries and resource usage, number of merges/mutation, merge performance, query performance, etc. - Visualization metric charts: queries and resource usage, number of merges/mutation, merge performance, query performance, etc.
### CKibana {#ckibana}
[CKibana](https://github.com/TongchengOpenSource/ckibana) is a lightweight service that allows you to effortlessly search, explore, and visualize ClickHouse data using the native Kibana UI.
Features:
- Translates chart requests from the native Kibana UI into ClickHouse query syntax.
- Supports advanced features such as sampling and caching to enhance query performance.
- Minimizes the learning cost for users after migrating from ElasticSearch to ClickHouse.
## Commercial {#commercial} ## Commercial {#commercial}
### DataGrip {#datagrip} ### DataGrip {#datagrip}

View File

@ -6,7 +6,7 @@ import SelfManaged from '@site/docs/en/_snippets/_self_managed_only_no_roadmap.m
<SelfManaged /> <SelfManaged />
[SSL 'strict' option](../server-configuration-parameters/settings.md#server_configuration_parameters-openssl) enables mandatory certificate validation for the incoming connections. In this case, only connections with trusted certificates can be established. Connections with untrusted certificates will be rejected. Thus, certificate validation allows to uniquely authenticate an incoming connection. `Common Name` or `subjectAltName extension` field of the certificate is used to identify the connected user. This allows to associate multiple certificates with the same user. Additionally, reissuing and revoking of the certificates does not affect the ClickHouse configuration. [SSL 'strict' option](../server-configuration-parameters/settings.md#server_configuration_parameters-openssl) enables mandatory certificate validation for the incoming connections. In this case, only connections with trusted certificates can be established. Connections with untrusted certificates will be rejected. Thus, certificate validation allows to uniquely authenticate an incoming connection. `Common Name` or `subjectAltName extension` field of the certificate is used to identify the connected user. `subjectAltName extension` supports the usage of one wildcard '*' in the server configuration. This allows to associate multiple certificates with the same user. Additionally, reissuing and revoking of the certificates does not affect the ClickHouse configuration.
To enable SSL certificate authentication, a list of `Common Name`'s or `Subject Alt Name`'s for each ClickHouse user must be specified in the settings file `users.xml `: To enable SSL certificate authentication, a list of `Common Name`'s or `Subject Alt Name`'s for each ClickHouse user must be specified in the settings file `users.xml `:
@ -30,6 +30,12 @@ To enable SSL certificate authentication, a list of `Common Name`'s or `Subject
</ssl_certificates> </ssl_certificates>
<!-- Other settings --> <!-- Other settings -->
</user_name_2> </user_name_2>
<user_name_3>
<ssl_certificates>
<!-- Wildcard support -->
<subject_alt_name>URI:spiffe://foo.com/*/bar</subject_alt_name>
</ssl_certificates>
</user_name_3>
</users> </users>
</clickhouse> </clickhouse>
``` ```

View File

@ -491,6 +491,14 @@ Type: Double
Default: 0.9 Default: 0.9
## max_build_vector_similarity_index_thread_pool_size {#server_configuration_parameters_max_build_vector_similarity_index_thread_pool_size}
The maximum number of threads to use for building vector indexes. 0 means all cores.
Type: UInt64
Default: 16
## cgroups_memory_usage_observer_wait_time ## cgroups_memory_usage_observer_wait_time
Interval in seconds during which the server's maximum allowed memory consumption is adjusted by the corresponding threshold in cgroups. (see Interval in seconds during which the server's maximum allowed memory consumption is adjusted by the corresponding threshold in cgroups. (see
@ -3142,3 +3150,15 @@ Default value: "default"
**See Also** **See Also**
- [Workload Scheduling](/docs/en/operations/workload-scheduling.md) - [Workload Scheduling](/docs/en/operations/workload-scheduling.md)
## max_authentication_methods_per_user {#max_authentication_methods_per_user}
The maximum number of authentication methods a user can be created with or altered to.
Changing this setting does not affect existing users. Create/alter authentication-related queries will fail if they exceed the limit specified in this setting.
Non authentication create/alter queries will succeed.
Type: UInt64
Default value: 100
Zero means unlimited

View File

@ -752,6 +752,17 @@ Possible values:
Default value: 0. Default value: 0.
### input_format_json_empty_as_default {#input_format_json_empty_as_default}
When enabled, replace empty input fields in JSON with default values. For complex default expressions `input_format_defaults_for_omitted_fields` must be enabled too.
Possible values:
+ 0 — Disable.
+ 1 — Enable.
Default value: 0.
## TSV format settings {#tsv-format-settings} ## TSV format settings {#tsv-format-settings}
### input_format_tsv_empty_as_default {#input_format_tsv_empty_as_default} ### input_format_tsv_empty_as_default {#input_format_tsv_empty_as_default}

View File

@ -47,13 +47,15 @@ keeper foo bar
- `ls '[path]'` -- Lists the nodes for the given path (default: cwd) - `ls '[path]'` -- Lists the nodes for the given path (default: cwd)
- `cd '[path]'` -- Changes the working path (default `.`) - `cd '[path]'` -- Changes the working path (default `.`)
- `cp '<src>' '<dest>'` -- Copies 'src' node to 'dest' path
- `mv '<src>' '<dest>'` -- Moves 'src' node to the 'dest' path
- `exists '<path>'` -- Returns `1` if node exists, `0` otherwise - `exists '<path>'` -- Returns `1` if node exists, `0` otherwise
- `set '<path>' <value> [version]` -- Updates the node's value. Only updates if version matches (default: -1) - `set '<path>' <value> [version]` -- Updates the node's value. Only updates if version matches (default: -1)
- `create '<path>' <value> [mode]` -- Creates new node with the set value - `create '<path>' <value> [mode]` -- Creates new node with the set value
- `touch '<path>'` -- Creates new node with an empty string as value. Doesn't throw an exception if the node already exists - `touch '<path>'` -- Creates new node with an empty string as value. Doesn't throw an exception if the node already exists
- `get '<path>'` -- Returns the node's value - `get '<path>'` -- Returns the node's value
- `rm '<path>' [version]` -- Removes the node only if version matches (default: -1) - `rm '<path>' [version]` -- Removes the node only if version matches (default: -1)
- `rmr '<path>'` -- Recursively deletes path. Confirmation required - `rmr '<path>' [limit]` -- Recursively deletes path if the subtree size is smaller than the limit. Confirmation required (default limit = 100)
- `flwc <command>` -- Executes four-letter-word command - `flwc <command>` -- Executes four-letter-word command
- `help` -- Prints this message - `help` -- Prints this message
- `get_direct_children_number '[path]'` -- Get numbers of direct children nodes under a specific path - `get_direct_children_number '[path]'` -- Get numbers of direct children nodes under a specific path

View File

@ -9,7 +9,7 @@ Computes an approximate [quantile](https://en.wikipedia.org/wiki/Quantile) of a
**Syntax** **Syntax**
``` sql ``` sql
quantileDDsketch[relative_accuracy, (level)](expr) quantileDD(relative_accuracy, [level])(expr)
``` ```
**Arguments** **Arguments**

View File

@ -1636,37 +1636,329 @@ SELECT toStartOfInterval(toDateTime('2023-01-01 14:45:00'), INTERVAL 1 MINUTE, t
Converts a date with time to a certain fixed date, while preserving the time. Converts a date with time to a certain fixed date, while preserving the time.
**Syntax**
```sql
toTime(date[,timezone])
```
**Arguments**
- `date` — Date to convert to a time. [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md).
- `timezone` (optional) — Timezone for the returned value. [String](../data-types/string.md).
**Returned value**
- DateTime with date equated to `1970-01-02` while preserving the time. [DateTime](../data-types/datetime.md).
:::note
If the `date` input argument contained sub-second components,
they will be dropped in the returned `DateTime` value with second-accuracy.
:::
**Example**
Query:
```sql
SELECT toTime(toDateTime64('1970-12-10 01:20:30.3000',3)) AS result, toTypeName(result);
```
Result:
```response
┌──────────────result─┬─toTypeName(result)─┐
│ 1970-01-02 01:20:30 │ DateTime │
└─────────────────────┴────────────────────┘
```
## toRelativeYearNum ## toRelativeYearNum
Converts a date, or date with time, to the number of the year, starting from a certain fixed point in the past. Converts a date, or date with time, to the number of years elapsed since a certain fixed point in the past.
**Syntax**
```sql
toRelativeYearNum(date)
```
**Arguments**
- `date` — Date or date with time. [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md).
**Returned value**
- The number of years from a fixed reference point in the past. [UInt16](../data-types/int-uint.md).
**Example**
Query:
```sql
SELECT
toRelativeYearNum(toDate('2002-12-08')) AS y1,
toRelativeYearNum(toDate('2010-10-26')) AS y2
```
Result:
```response
┌───y1─┬───y2─┐
│ 2002 │ 2010 │
└──────┴──────┘
```
## toRelativeQuarterNum ## toRelativeQuarterNum
Converts a date, or date with time, to the number of the quarter, starting from a certain fixed point in the past. Converts a date, or date with time, to the number of quarters elapsed since a certain fixed point in the past.
**Syntax**
```sql
toRelativeQuarterNum(date)
```
**Arguments**
- `date` — Date or date with time. [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md).
**Returned value**
- The number of quarters from a fixed reference point in the past. [UInt32](../data-types/int-uint.md).
**Example**
Query:
```sql
SELECT
toRelativeQuarterNum(toDate('1993-11-25')) AS q1,
toRelativeQuarterNum(toDate('2005-01-05')) AS q2
```
Result:
```response
┌───q1─┬───q2─┐
│ 7975 │ 8020 │
└──────┴──────┘
```
## toRelativeMonthNum ## toRelativeMonthNum
Converts a date, or date with time, to the number of the month, starting from a certain fixed point in the past. Converts a date, or date with time, to the number of months elapsed since a certain fixed point in the past.
**Syntax**
```sql
toRelativeMonthNum(date)
```
**Arguments**
- `date` — Date or date with time. [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md).
**Returned value**
- The number of months from a fixed reference point in the past. [UInt32](../data-types/int-uint.md).
**Example**
Query:
```sql
SELECT
toRelativeMonthNum(toDate('2001-04-25')) AS m1,
toRelativeMonthNum(toDate('2009-07-08')) AS m2
```
Result:
```response
┌────m1─┬────m2─┐
│ 24016 │ 24115 │
└───────┴───────┘
```
## toRelativeWeekNum ## toRelativeWeekNum
Converts a date, or date with time, to the number of the week, starting from a certain fixed point in the past. Converts a date, or date with time, to the number of weeks elapsed since a certain fixed point in the past.
**Syntax**
```sql
toRelativeWeekNum(date)
```
**Arguments**
- `date` — Date or date with time. [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md).
**Returned value**
- The number of weeks from a fixed reference point in the past. [UInt32](../data-types/int-uint.md).
**Example**
Query:
```sql
SELECT
toRelativeWeekNum(toDate('2000-02-29')) AS w1,
toRelativeWeekNum(toDate('2001-01-12')) AS w2
```
Result:
```response
┌───w1─┬───w2─┐
│ 1574 │ 1619 │
└──────┴──────┘
```
## toRelativeDayNum ## toRelativeDayNum
Converts a date, or date with time, to the number of the day, starting from a certain fixed point in the past. Converts a date, or date with time, to the number of days elapsed since a certain fixed point in the past.
**Syntax**
```sql
toRelativeDayNum(date)
```
**Arguments**
- `date` — Date or date with time. [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md).
**Returned value**
- The number of days from a fixed reference point in the past. [UInt32](../data-types/int-uint.md).
**Example**
Query:
```sql
SELECT
toRelativeDayNum(toDate('1993-10-05')) AS d1,
toRelativeDayNum(toDate('2000-09-20')) AS d2
```
Result:
```response
┌───d1─┬────d2─┐
│ 8678 │ 11220 │
└──────┴───────┘
```
## toRelativeHourNum ## toRelativeHourNum
Converts a date, or date with time, to the number of the hour, starting from a certain fixed point in the past. Converts a date, or date with time, to the number of hours elapsed since a certain fixed point in the past.
**Syntax**
```sql
toRelativeHourNum(date)
```
**Arguments**
- `date` — Date or date with time. [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md).
**Returned value**
- The number of hours from a fixed reference point in the past. [UInt32](../data-types/int-uint.md).
**Example**
Query:
```sql
SELECT
toRelativeHourNum(toDateTime('1993-10-05 05:20:36')) AS h1,
toRelativeHourNum(toDateTime('2000-09-20 14:11:29')) AS h2
```
Result:
```response
┌─────h1─┬─────h2─┐
│ 208276 │ 269292 │
└────────┴────────┘
```
## toRelativeMinuteNum ## toRelativeMinuteNum
Converts a date, or date with time, to the number of the minute, starting from a certain fixed point in the past. Converts a date, or date with time, to the number of minutes elapsed since a certain fixed point in the past.
**Syntax**
```sql
toRelativeMinuteNum(date)
```
**Arguments**
- `date` — Date or date with time. [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md).
**Returned value**
- The number of minutes from a fixed reference point in the past. [UInt32](../data-types/int-uint.md).
**Example**
Query:
```sql
SELECT
toRelativeMinuteNum(toDateTime('1993-10-05 05:20:36')) AS m1,
toRelativeMinuteNum(toDateTime('2000-09-20 14:11:29')) AS m2
```
Result:
```response
┌───────m1─┬───────m2─┐
│ 12496580 │ 16157531 │
└──────────┴──────────┘
```
## toRelativeSecondNum ## toRelativeSecondNum
Converts a date, or date with time, to the number of the second, starting from a certain fixed point in the past. Converts a date, or date with time, to the number of the seconds elapsed since a certain fixed point in the past.
**Syntax**
```sql
toRelativeSecondNum(date)
```
**Arguments**
- `date` — Date or date with time. [Date](../data-types/date.md)/[DateTime](../data-types/datetime.md)/[DateTime64](../data-types/datetime64.md).
**Returned value**
- The number of seconds from a fixed reference point in the past. [UInt32](../data-types/int-uint.md).
**Example**
Query:
```sql
SELECT
toRelativeSecondNum(toDateTime('1993-10-05 05:20:36')) AS s1,
toRelativeSecondNum(toDateTime('2000-09-20 14:11:29')) AS s2
```
Result:
```response
┌────────s1─┬────────s2─┐
│ 749794836 │ 969451889 │
└───────────┴───────────┘
```
## toISOYear ## toISOYear

View File

@ -3906,7 +3906,7 @@ Result:
## toDateTime64 ## toDateTime64
Converts the argument to the [DateTime64](../data-types/datetime64.md) data type. Converts an input value to a value of type [DateTime64](../data-types/datetime64.md).
**Syntax** **Syntax**
@ -3918,7 +3918,7 @@ toDateTime64(expr, scale, [timezone])
- `expr` — The value. [String](../data-types/string.md), [UInt32](../data-types/int-uint.md), [Float](../data-types/float.md) or [DateTime](../data-types/datetime.md). - `expr` — The value. [String](../data-types/string.md), [UInt32](../data-types/int-uint.md), [Float](../data-types/float.md) or [DateTime](../data-types/datetime.md).
- `scale` - Tick size (precision): 10<sup>-precision</sup> seconds. Valid range: [ 0 : 9 ]. - `scale` - Tick size (precision): 10<sup>-precision</sup> seconds. Valid range: [ 0 : 9 ].
- `timezone` - Time zone of the specified datetime64 object. - `timezone` (optional) - Time zone of the specified datetime64 object.
**Returned value** **Returned value**
@ -3977,10 +3977,137 @@ SELECT toDateTime64('2019-01-01 00:00:00', 3, 'Asia/Istanbul') AS value, toTypeN
## toDateTime64OrZero ## toDateTime64OrZero
Like [toDateTime64](#todatetime64), this function converts an input value to a value of type [DateTime64](../data-types/datetime64.md) but returns the min value of [DateTime64](../data-types/datetime64.md) if an invalid argument is received.
**Syntax**
``` sql
toDateTime64OrZero(expr, scale, [timezone])
```
**Arguments**
- `expr` — The value. [String](../data-types/string.md), [UInt32](../data-types/int-uint.md), [Float](../data-types/float.md) or [DateTime](../data-types/datetime.md).
- `scale` - Tick size (precision): 10<sup>-precision</sup> seconds. Valid range: [ 0 : 9 ].
- `timezone` (optional) - Time zone of the specified DateTime64 object.
**Returned value**
- A calendar date and time of day, with sub-second precision, otherwise the minimum value of `DateTime64`: `1970-01-01 01:00:00.000`. [DateTime64](../data-types/datetime64.md).
**Example**
Query:
```sql
SELECT toDateTime64OrZero('2008-10-12 00:00:00 00:30:30', 3) AS invalid_arg
```
Result:
```response
┌─────────────invalid_arg─┐
│ 1970-01-01 01:00:00.000 │
└─────────────────────────┘
```
**See also**
- [toDateTime64](#todatetime64).
- [toDateTime64OrNull](#todatetime64ornull).
- [toDateTime64OrDefault](#todatetime64ordefault).
## toDateTime64OrNull ## toDateTime64OrNull
Like [toDateTime64](#todatetime64), this function converts an input value to a value of type [DateTime64](../data-types/datetime64.md) but returns `NULL` if an invalid argument is received.
**Syntax**
``` sql
toDateTime64OrNull(expr, scale, [timezone])
```
**Arguments**
- `expr` — The value. [String](../data-types/string.md), [UInt32](../data-types/int-uint.md), [Float](../data-types/float.md) or [DateTime](../data-types/datetime.md).
- `scale` - Tick size (precision): 10<sup>-precision</sup> seconds. Valid range: [ 0 : 9 ].
- `timezone` (optional) - Time zone of the specified DateTime64 object.
**Returned value**
- A calendar date and time of day, with sub-second precision, otherwise `NULL`. [DateTime64](../data-types/datetime64.md)/[NULL](../data-types/nullable.md).
**Example**
Query:
```sql
SELECT
toDateTime64OrNull('1976-10-18 00:00:00.30', 3) AS valid_arg,
toDateTime64OrNull('1976-10-18 00:00:00 30', 3) AS invalid_arg
```
Result:
```response
┌───────────────valid_arg─┬─invalid_arg─┐
│ 1976-10-18 00:00:00.300 │ ᴺᵁᴸᴸ │
└─────────────────────────┴─────────────┘
```
**See also**
- [toDateTime64](#todatetime64).
- [toDateTime64OrZero](#todatetime64orzero).
- [toDateTime64OrDefault](#todatetime64ordefault).
## toDateTime64OrDefault ## toDateTime64OrDefault
Like [toDateTime64](#todatetime64), this function converts an input value to a value of type [DateTime64](../data-types/datetime64.md),
but returns either the default value of [DateTime64](../data-types/datetime64.md)
or the provided default if an invalid argument is received.
**Syntax**
``` sql
toDateTime64OrNull(expr, scale, [timezone, default])
```
**Arguments**
- `expr` — The value. [String](../data-types/string.md), [UInt32](../data-types/int-uint.md), [Float](../data-types/float.md) or [DateTime](../data-types/datetime.md).
- `scale` - Tick size (precision): 10<sup>-precision</sup> seconds. Valid range: [ 0 : 9 ].
- `timezone` (optional) - Time zone of the specified DateTime64 object.
- `default` (optional) - Default value to return if an invalid argument is received. [DateTime64](../data-types/datetime64.md).
**Returned value**
- A calendar date and time of day, with sub-second precision, otherwise the minimum value of `DateTime64` or the `default` value if provided. [DateTime64](../data-types/datetime64.md).
**Example**
Query:
```sql
SELECT
toDateTime64OrDefault('1976-10-18 00:00:00 30', 3) AS invalid_arg,
toDateTime64OrDefault('1976-10-18 00:00:00 30', 3, 'UTC', toDateTime64('2001-01-01 00:00:00.00',3)) AS invalid_arg_with_default
```
Result:
```response
┌─────────────invalid_arg─┬─invalid_arg_with_default─┐
│ 1970-01-01 01:00:00.000 │ 2000-12-31 23:00:00.000 │
└─────────────────────────┴──────────────────────────┘
```
**See also**
- [toDateTime64](#todatetime64).
- [toDateTime64OrZero](#todatetime64orzero).
- [toDateTime64OrNull](#todatetime64ornull).
## toDecimal32 ## toDecimal32
Converts an input value to a value of type [`Decimal(9, S)`](../data-types/decimal.md) with scale of `S`. Throws an exception in case of an error. Converts an input value to a value of type [`Decimal(9, S)`](../data-types/decimal.md) with scale of `S`. Throws an exception in case of an error.

View File

@ -12,9 +12,10 @@ Syntax:
``` sql ``` sql
ALTER USER [IF EXISTS] name1 [ON CLUSTER cluster_name1] [RENAME TO new_name1] ALTER USER [IF EXISTS] name1 [ON CLUSTER cluster_name1] [RENAME TO new_name1]
[, name2 [ON CLUSTER cluster_name2] [RENAME TO new_name2] ...] [, name2 [ON CLUSTER cluster_name2] [RENAME TO new_name2] ...]
[NOT IDENTIFIED | IDENTIFIED {[WITH {no_password | plaintext_password | sha256_password | sha256_hash | double_sha1_password | double_sha1_hash}] BY {'password' | 'hash'}} | {WITH ldap SERVER 'server_name'} | {WITH kerberos [REALM 'realm']} | {WITH ssl_certificate CN 'common_name' | SAN 'TYPE:subject_alt_name'}] [NOT IDENTIFIED | IDENTIFIED | ADD IDENTIFIED {[WITH {no_password | plaintext_password | sha256_password | sha256_hash | double_sha1_password | double_sha1_hash}] BY {'password' | 'hash'}} | {WITH ldap SERVER 'server_name'} | {WITH kerberos [REALM 'realm']} | {WITH ssl_certificate CN 'common_name' | SAN 'TYPE:subject_alt_name'}]
[[ADD | DROP] HOST {LOCAL | NAME 'name' | REGEXP 'name_regexp' | IP 'address' | LIKE 'pattern'} [,...] | ANY | NONE] [[ADD | DROP] HOST {LOCAL | NAME 'name' | REGEXP 'name_regexp' | IP 'address' | LIKE 'pattern'} [,...] | ANY | NONE]
[VALID UNTIL datetime] [VALID UNTIL datetime]
[RESET AUTHENTICATION METHODS TO NEW]
[DEFAULT ROLE role [,...] | ALL | ALL EXCEPT role [,...] ] [DEFAULT ROLE role [,...] | ALL | ALL EXCEPT role [,...] ]
[GRANTEES {user | role | ANY | NONE} [,...] [EXCEPT {user | role} [,...]]] [GRANTEES {user | role | ANY | NONE} [,...] [EXCEPT {user | role} [,...]]]
[SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY | WRITABLE] | PROFILE 'profile_name'] [,...] [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY | WRITABLE] | PROFILE 'profile_name'] [,...]
@ -62,3 +63,31 @@ Allows the user with `john` account to grant his privileges to the user with `ja
``` sql ``` sql
ALTER USER john GRANTEES jack; ALTER USER john GRANTEES jack;
``` ```
Adds new authentication methods to the user while keeping the existing ones:
``` sql
ALTER USER user1 ADD IDENTIFIED WITH plaintext_password by '1', bcrypt_password by '2', plaintext_password by '3'
```
Notes:
1. Older versions of ClickHouse might not support the syntax of multiple authentication methods. Therefore, if the ClickHouse server contains such users and is downgraded to a version that does not support it, such users will become unusable and some user related operations will be broken. In order to downgrade gracefully, one must set all users to contain a single authentication method prior to downgrading. Alternatively, if the server was downgraded without the proper procedure, the faulty users should be dropped.
2. `no_password` can not co-exist with other authentication methods for security reasons.
Because of that, it is not possible to `ADD` a `no_password` authentication method. The below query will throw an error:
``` sql
ALTER USER user1 ADD IDENTIFIED WITH no_password
```
If you want to drop authentication methods for a user and rely on `no_password`, you must specify in the below replacing form.
Reset authentication methods and adds the ones specified in the query (effect of leading IDENTIFIED without the ADD keyword):
``` sql
ALTER USER user1 IDENTIFIED WITH plaintext_password by '1', bcrypt_password by '2', plaintext_password by '3'
```
Reset authentication methods and keep the most recent added one:
``` sql
ALTER USER user1 RESET AUTHENTICATION METHODS TO NEW
```

View File

@ -15,6 +15,7 @@ CREATE USER [IF NOT EXISTS | OR REPLACE] name1 [ON CLUSTER cluster_name1]
[NOT IDENTIFIED | IDENTIFIED {[WITH {no_password | plaintext_password | sha256_password | sha256_hash | double_sha1_password | double_sha1_hash}] BY {'password' | 'hash'}} | {WITH ldap SERVER 'server_name'} | {WITH kerberos [REALM 'realm']} | {WITH ssl_certificate CN 'common_name' | SAN 'TYPE:subject_alt_name'} | {WITH ssh_key BY KEY 'public_key' TYPE 'ssh-rsa|...'} | {WITH http SERVER 'server_name' [SCHEME 'Basic']}] [NOT IDENTIFIED | IDENTIFIED {[WITH {no_password | plaintext_password | sha256_password | sha256_hash | double_sha1_password | double_sha1_hash}] BY {'password' | 'hash'}} | {WITH ldap SERVER 'server_name'} | {WITH kerberos [REALM 'realm']} | {WITH ssl_certificate CN 'common_name' | SAN 'TYPE:subject_alt_name'} | {WITH ssh_key BY KEY 'public_key' TYPE 'ssh-rsa|...'} | {WITH http SERVER 'server_name' [SCHEME 'Basic']}]
[HOST {LOCAL | NAME 'name' | REGEXP 'name_regexp' | IP 'address' | LIKE 'pattern'} [,...] | ANY | NONE] [HOST {LOCAL | NAME 'name' | REGEXP 'name_regexp' | IP 'address' | LIKE 'pattern'} [,...] | ANY | NONE]
[VALID UNTIL datetime] [VALID UNTIL datetime]
[RESET AUTHENTICATION METHODS TO NEW]
[IN access_storage_type] [IN access_storage_type]
[DEFAULT ROLE role [,...]] [DEFAULT ROLE role [,...]]
[DEFAULT DATABASE database | NONE] [DEFAULT DATABASE database | NONE]
@ -144,6 +145,17 @@ In ClickHouse Cloud, by default, passwords must meet the following complexity re
The available password types are: `plaintext_password`, `sha256_password`, `double_sha1_password`. The available password types are: `plaintext_password`, `sha256_password`, `double_sha1_password`.
7. Multiple authentication methods can be specified:
```sql
CREATE USER user1 IDENTIFIED WITH plaintext_password by '1', bcrypt_password by '2', plaintext_password by '3''
```
Notes:
1. Older versions of ClickHouse might not support the syntax of multiple authentication methods. Therefore, if the ClickHouse server contains such users and is downgraded to a version that does not support it, such users will become unusable and some user related operations will be broken. In order to downgrade gracefully, one must set all users to contain a single authentication method prior to downgrading. Alternatively, if the server was downgraded without the proper procedure, the faulty users should be dropped.
2. `no_password` can not co-exist with other authentication methods for security reasons. Therefore, you can only specify
`no_password` if it is the only authentication method in the query.
## User Host ## User Host
User host is a host from which a connection to ClickHouse server could be established. The host can be specified in the `HOST` query section in the following ways: User host is a host from which a connection to ClickHouse server could be established. The host can be specified in the `HOST` query section in the following ways:

View File

@ -506,14 +506,23 @@ bool RMRCommand::parse(IParser::Pos & pos, std::shared_ptr<ASTKeeperQuery> & nod
return false; return false;
node->args.push_back(std::move(path)); node->args.push_back(std::move(path));
ASTPtr remove_nodes_limit;
if (ParserUnsignedInteger{}.parse(pos, remove_nodes_limit, expected))
node->args.push_back(remove_nodes_limit->as<ASTLiteral &>().value);
else
node->args.push_back(UInt64(100));
return true; return true;
} }
void RMRCommand::execute(const ASTKeeperQuery * query, KeeperClient * client) const void RMRCommand::execute(const ASTKeeperQuery * query, KeeperClient * client) const
{ {
String path = client->getAbsolutePath(query->args[0].safeGet<String>()); String path = client->getAbsolutePath(query->args[0].safeGet<String>());
UInt64 remove_nodes_limit = query->args[1].safeGet<UInt64>();
client->askConfirmation( client->askConfirmation(
"You are going to recursively delete path " + path, [client, path] { client->zookeeper->removeRecursive(path); }); "You are going to recursively delete path " + path,
[client, path, remove_nodes_limit] { client->zookeeper->removeRecursive(path, static_cast<UInt32>(remove_nodes_limit)); });
} }
bool ReconfigCommand::parse(IParser::Pos & pos, std::shared_ptr<ASTKeeperQuery> & node, DB::Expected & expected) const bool ReconfigCommand::parse(IParser::Pos & pos, std::shared_ptr<ASTKeeperQuery> & node, DB::Expected & expected) const

View File

@ -184,7 +184,7 @@ class RMRCommand : public IKeeperClientCommand
void execute(const ASTKeeperQuery * query, KeeperClient * client) const override; void execute(const ASTKeeperQuery * query, KeeperClient * client) const override;
String getHelpMessage() const override { return "{} <path> -- Recursively deletes path. Confirmation required"; } String getHelpMessage() const override { return "{} <path> [limit] -- Recursively deletes path if the subtree size is smaller than the limit. Confirmation required (default limit = 100)"; }
}; };
class ReconfigCommand : public IKeeperClientCommand class ReconfigCommand : public IKeeperClientCommand

View File

@ -11,6 +11,7 @@
#include <Core/ServerUUID.h> #include <Core/ServerUUID.h>
#include <Common/logger_useful.h> #include <Common/logger_useful.h>
#include <Common/CgroupsMemoryUsageObserver.h> #include <Common/CgroupsMemoryUsageObserver.h>
#include <Common/MemoryWorker.h>
#include <Common/ErrorHandlers.h> #include <Common/ErrorHandlers.h>
#include <Common/assertProcessUserMatchesDataOwner.h> #include <Common/assertProcessUserMatchesDataOwner.h>
#include <Common/makeSocketAddress.h> #include <Common/makeSocketAddress.h>
@ -384,6 +385,9 @@ try
LOG_INFO(log, "Background threads finished in {} ms", watch.elapsedMilliseconds()); LOG_INFO(log, "Background threads finished in {} ms", watch.elapsedMilliseconds());
}); });
MemoryWorker memory_worker(config().getUInt64("memory_worker_period_ms", 0));
memory_worker.start();
static ServerErrorHandler error_handler; static ServerErrorHandler error_handler;
Poco::ErrorHandler::set(&error_handler); Poco::ErrorHandler::set(&error_handler);
@ -425,8 +429,9 @@ try
for (const auto & server : *servers) for (const auto & server : *servers)
metrics.emplace_back(ProtocolServerMetrics{server.getPortName(), server.currentThreads(), server.refusedConnections()}); metrics.emplace_back(ProtocolServerMetrics{server.getPortName(), server.currentThreads(), server.refusedConnections()});
return metrics; return metrics;
} },
); /*update_jemalloc_epoch_=*/memory_worker.getSource() != MemoryWorker::MemoryUsageSource::Jemalloc,
/*update_rss_=*/memory_worker.getSource() == MemoryWorker::MemoryUsageSource::None);
std::vector<std::string> listen_hosts = DB::getMultipleValuesFromConfig(config(), "", "listen_host"); std::vector<std::string> listen_hosts = DB::getMultipleValuesFromConfig(config(), "", "listen_host");
@ -655,7 +660,6 @@ try
GWPAsan::initFinished(); GWPAsan::initFinished();
#endif #endif
LOG_INFO(log, "Ready for connections."); LOG_INFO(log, "Ready for connections.");
waitForTerminationRequest(); waitForTerminationRequest();

View File

@ -11,7 +11,6 @@
#include <Poco/Util/HelpFormatter.h> #include <Poco/Util/HelpFormatter.h>
#include <Poco/Environment.h> #include <Poco/Environment.h>
#include <Poco/Config.h> #include <Poco/Config.h>
#include <Common/Jemalloc.h>
#include <Common/scope_guard_safe.h> #include <Common/scope_guard_safe.h>
#include <Common/logger_useful.h> #include <Common/logger_useful.h>
#include <base/phdr_cache.h> #include <base/phdr_cache.h>
@ -25,6 +24,7 @@
#include <base/Numa.h> #include <base/Numa.h>
#include <Common/PoolId.h> #include <Common/PoolId.h>
#include <Common/MemoryTracker.h> #include <Common/MemoryTracker.h>
#include <Common/MemoryWorker.h>
#include <Common/ClickHouseRevision.h> #include <Common/ClickHouseRevision.h>
#include <Common/DNSResolver.h> #include <Common/DNSResolver.h>
#include <Common/CgroupsMemoryUsageObserver.h> #include <Common/CgroupsMemoryUsageObserver.h>
@ -111,6 +111,8 @@
#include <filesystem> #include <filesystem>
#include <unordered_set> #include <unordered_set>
#include <Common/Jemalloc.h>
#include "config.h" #include "config.h"
#include <Common/config_version.h> #include <Common/config_version.h>
@ -449,9 +451,12 @@ void checkForUsersNotInMainConfig(
} }
} }
namespace
{
/// Unused in other builds /// Unused in other builds
#if defined(OS_LINUX) #if defined(OS_LINUX)
static String readLine(const String & path) String readLine(const String & path)
{ {
ReadBufferFromFile in(path); ReadBufferFromFile in(path);
String contents; String contents;
@ -459,7 +464,7 @@ static String readLine(const String & path)
return contents; return contents;
} }
static int readNumber(const String & path) int readNumber(const String & path)
{ {
ReadBufferFromFile in(path); ReadBufferFromFile in(path);
int result; int result;
@ -469,7 +474,7 @@ static int readNumber(const String & path)
#endif #endif
static void sanityChecks(Server & server) void sanityChecks(Server & server)
{ {
std::string data_path = getCanonicalPath(server.config().getString("path", DBMS_DEFAULT_PATH)); std::string data_path = getCanonicalPath(server.config().getString("path", DBMS_DEFAULT_PATH));
std::string logs_path = server.config().getString("logger.log", ""); std::string logs_path = server.config().getString("logger.log", "");
@ -590,6 +595,8 @@ static void sanityChecks(Server & server)
} }
} }
}
void loadStartupScripts(const Poco::Util::AbstractConfiguration & config, ContextMutablePtr context, Poco::Logger * log) void loadStartupScripts(const Poco::Util::AbstractConfiguration & config, ContextMutablePtr context, Poco::Logger * log)
{ {
try try
@ -906,6 +913,8 @@ try
LOG_INFO(log, "Background threads finished in {} ms", watch.elapsedMilliseconds()); LOG_INFO(log, "Background threads finished in {} ms", watch.elapsedMilliseconds());
}); });
MemoryWorker memory_worker(global_context->getServerSettings().memory_worker_period_ms);
/// This object will periodically calculate some metrics. /// This object will periodically calculate some metrics.
ServerAsynchronousMetrics async_metrics( ServerAsynchronousMetrics async_metrics(
global_context, global_context,
@ -924,8 +933,9 @@ try
for (const auto & server : servers) for (const auto & server : servers)
metrics.emplace_back(ProtocolServerMetrics{server.getPortName(), server.currentThreads(), server.refusedConnections()}); metrics.emplace_back(ProtocolServerMetrics{server.getPortName(), server.currentThreads(), server.refusedConnections()});
return metrics; return metrics;
} },
); /*update_jemalloc_epoch_=*/memory_worker.getSource() != MemoryWorker::MemoryUsageSource::Jemalloc,
/*update_rss_=*/memory_worker.getSource() == MemoryWorker::MemoryUsageSource::None);
/// NOTE: global context should be destroyed *before* GlobalThreadPool::shutdown() /// NOTE: global context should be destroyed *before* GlobalThreadPool::shutdown()
/// Otherwise GlobalThreadPool::shutdown() will hang, since Context holds some threads. /// Otherwise GlobalThreadPool::shutdown() will hang, since Context holds some threads.
@ -1204,6 +1214,8 @@ try
FailPointInjection::enableFromGlobalConfig(config()); FailPointInjection::enableFromGlobalConfig(config());
memory_worker.start();
int default_oom_score = 0; int default_oom_score = 0;
#if !defined(NDEBUG) #if !defined(NDEBUG)
@ -1547,15 +1559,6 @@ try
total_memory_tracker.setDescription("(total)"); total_memory_tracker.setDescription("(total)");
total_memory_tracker.setMetric(CurrentMetrics::MemoryTracking); total_memory_tracker.setMetric(CurrentMetrics::MemoryTracking);
if (cgroups_memory_usage_observer)
{
double hard_limit_ratio = new_server_settings.cgroup_memory_watcher_hard_limit_ratio;
double soft_limit_ratio = new_server_settings.cgroup_memory_watcher_soft_limit_ratio;
cgroups_memory_usage_observer->setMemoryUsageLimits(
static_cast<uint64_t>(max_server_memory_usage * hard_limit_ratio),
static_cast<uint64_t>(max_server_memory_usage * soft_limit_ratio));
}
size_t merges_mutations_memory_usage_soft_limit = new_server_settings.merges_mutations_memory_usage_soft_limit; size_t merges_mutations_memory_usage_soft_limit = new_server_settings.merges_mutations_memory_usage_soft_limit;
size_t default_merges_mutations_server_memory_usage = static_cast<size_t>(current_physical_server_memory * new_server_settings.merges_mutations_memory_usage_to_ram_ratio); size_t default_merges_mutations_server_memory_usage = static_cast<size_t>(current_physical_server_memory * new_server_settings.merges_mutations_memory_usage_to_ram_ratio);
@ -1584,8 +1587,6 @@ try
background_memory_tracker.setDescription("(background)"); background_memory_tracker.setDescription("(background)");
background_memory_tracker.setMetric(CurrentMetrics::MergesMutationsMemoryTracking); background_memory_tracker.setMetric(CurrentMetrics::MergesMutationsMemoryTracking);
total_memory_tracker.setAllowUseJemallocMemory(new_server_settings.allow_use_jemalloc_memory);
auto * global_overcommit_tracker = global_context->getGlobalOvercommitTracker(); auto * global_overcommit_tracker = global_context->getGlobalOvercommitTracker();
total_memory_tracker.setOvercommitTracker(global_overcommit_tracker); total_memory_tracker.setOvercommitTracker(global_overcommit_tracker);

View File

@ -29,6 +29,7 @@ namespace DB
namespace ErrorCodes namespace ErrorCodes
{ {
extern const int CANNOT_RESTORE_TABLE; extern const int CANNOT_RESTORE_TABLE;
extern const int ACCESS_ENTITY_ALREADY_EXISTS;
extern const int LOGICAL_ERROR; extern const int LOGICAL_ERROR;
} }
@ -175,9 +176,46 @@ namespace
return res; return res;
} }
std::unordered_map<UUID, UUID> resolveDependencies(const std::unordered_map<UUID, std::pair<String, AccessEntityType>> & dependencies, const AccessControl & access_control, bool allow_unresolved_dependencies) /// Checks if new entities (which we're going to restore) already exist,
/// and either skips them or throws an exception depending on the restore settings.
void checkExistingEntities(std::vector<std::pair<UUID, AccessEntityPtr>> & entities,
std::unordered_map<UUID, UUID> & old_to_new_id,
const AccessControl & access_control,
RestoreAccessCreationMode creation_mode)
{
if (creation_mode == RestoreAccessCreationMode::kReplace)
return;
auto should_skip = [&](const std::pair<UUID, AccessEntityPtr> & id_and_entity)
{
const auto & id = id_and_entity.first;
const auto & entity = *id_and_entity.second;
auto existing_id = access_control.find(entity.getType(), entity.getName());
if (!existing_id)
{
return false;
}
else if (creation_mode == RestoreAccessCreationMode::kCreateIfNotExists)
{
old_to_new_id[id] = *existing_id;
return true;
}
else
{
throw Exception(ErrorCodes::ACCESS_ENTITY_ALREADY_EXISTS, "Cannot restore {} because it already exists", entity.formatTypeWithName());
}
};
std::erase_if(entities, should_skip);
}
/// If new entities (which we're going to restore) depend on other entities which are not going to be restored or not present in the backup
/// then we should try to replace those dependencies with already existing entities.
void resolveDependencies(const std::unordered_map<UUID, std::pair<String, AccessEntityType>> & dependencies,
std::unordered_map<UUID, UUID> & old_to_new_ids,
const AccessControl & access_control,
bool allow_unresolved_dependencies)
{ {
std::unordered_map<UUID, UUID> old_to_new_ids;
for (const auto & [id, name_and_type] : dependencies) for (const auto & [id, name_and_type] : dependencies)
{ {
std::optional<UUID> new_id; std::optional<UUID> new_id;
@ -188,9 +226,9 @@ namespace
if (new_id) if (new_id)
old_to_new_ids.emplace(id, *new_id); old_to_new_ids.emplace(id, *new_id);
} }
return old_to_new_ids;
} }
/// Generates random IDs for the new entities.
void generateRandomIDs(std::vector<std::pair<UUID, AccessEntityPtr>> & entities, std::unordered_map<UUID, UUID> & old_to_new_ids) void generateRandomIDs(std::vector<std::pair<UUID, AccessEntityPtr>> & entities, std::unordered_map<UUID, UUID> & old_to_new_ids)
{ {
Poco::UUIDGenerator generator; Poco::UUIDGenerator generator;
@ -203,27 +241,12 @@ namespace
} }
} }
void replaceDependencies(std::vector<std::pair<UUID, AccessEntityPtr>> & entities, const std::unordered_map<UUID, UUID> & old_to_new_ids) /// Updates dependencies of the new entities using a specified map.
void replaceDependencies(std::vector<std::pair<UUID, AccessEntityPtr>> & entities,
const std::unordered_map<UUID, UUID> & old_to_new_ids)
{ {
for (auto & entity : entities | boost::adaptors::map_values) for (auto & entity : entities | boost::adaptors::map_values)
{ IAccessEntity::replaceDependencies(entity, old_to_new_ids);
bool need_replace = false;
for (const auto & dependency : entity->findDependencies())
{
if (old_to_new_ids.contains(dependency))
{
need_replace = true;
break;
}
}
if (!need_replace)
continue;
auto new_entity = entity->clone();
new_entity->replaceDependencies(old_to_new_ids);
entity = new_entity;
}
} }
AccessRightsElements getRequiredAccessToRestore(const std::vector<std::pair<UUID, AccessEntityPtr>> & entities) AccessRightsElements getRequiredAccessToRestore(const std::vector<std::pair<UUID, AccessEntityPtr>> & entities)
@ -314,7 +337,9 @@ std::pair<String, BackupEntryPtr> makeBackupEntryForAccess(
AccessRestorerFromBackup::AccessRestorerFromBackup( AccessRestorerFromBackup::AccessRestorerFromBackup(
const BackupPtr & backup_, const RestoreSettings & restore_settings_) const BackupPtr & backup_, const RestoreSettings & restore_settings_)
: backup(backup_), allow_unresolved_access_dependencies(restore_settings_.allow_unresolved_access_dependencies) : backup(backup_)
, creation_mode(restore_settings_.create_access)
, allow_unresolved_dependencies(restore_settings_.allow_unresolved_access_dependencies)
{ {
} }
@ -362,7 +387,9 @@ std::vector<std::pair<UUID, AccessEntityPtr>> AccessRestorerFromBackup::getAcces
{ {
auto new_entities = entities; auto new_entities = entities;
auto old_to_new_ids = resolveDependencies(dependencies, access_control, allow_unresolved_access_dependencies); std::unordered_map<UUID, UUID> old_to_new_ids;
checkExistingEntities(new_entities, old_to_new_ids, access_control, creation_mode);
resolveDependencies(dependencies, old_to_new_ids, access_control, allow_unresolved_dependencies);
generateRandomIDs(new_entities, old_to_new_ids); generateRandomIDs(new_entities, old_to_new_ids);
replaceDependencies(new_entities, old_to_new_ids); replaceDependencies(new_entities, old_to_new_ids);

View File

@ -17,6 +17,7 @@ using BackupPtr = std::shared_ptr<const IBackup>;
class IBackupEntry; class IBackupEntry;
using BackupEntryPtr = std::shared_ptr<const IBackupEntry>; using BackupEntryPtr = std::shared_ptr<const IBackupEntry>;
struct RestoreSettings; struct RestoreSettings;
enum class RestoreAccessCreationMode : uint8_t;
/// Makes a backup of access entities of a specified type. /// Makes a backup of access entities of a specified type.
@ -45,7 +46,8 @@ public:
private: private:
BackupPtr backup; BackupPtr backup;
bool allow_unresolved_access_dependencies = false; RestoreAccessCreationMode creation_mode;
bool allow_unresolved_dependencies = false;
std::vector<std::pair<UUID, AccessEntityPtr>> entities; std::vector<std::pair<UUID, AccessEntityPtr>> entities;
std::unordered_map<UUID, std::pair<String, AccessEntityType>> dependencies; std::unordered_map<UUID, std::pair<String, AccessEntityType>> dependencies;
std::unordered_set<String> data_paths; std::unordered_set<String> data_paths;

View File

@ -544,9 +544,9 @@ scope_guard AccessControl::subscribeForChanges(const std::vector<UUID> & ids, co
return changes_notifier->subscribeForChanges(ids, handler); return changes_notifier->subscribeForChanges(ids, handler);
} }
bool AccessControl::insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists) bool AccessControl::insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id)
{ {
if (MultipleAccessStorage::insertImpl(id, entity, replace_if_exists, throw_if_exists)) if (MultipleAccessStorage::insertImpl(id, entity, replace_if_exists, throw_if_exists, conflicting_id))
{ {
changes_notifier->sendNotifications(); changes_notifier->sendNotifications();
return true; return true;

View File

@ -243,7 +243,7 @@ private:
class CustomSettingsPrefixes; class CustomSettingsPrefixes;
class PasswordComplexityRules; class PasswordComplexityRules;
bool insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists) override; bool insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id) override;
bool removeImpl(const UUID & id, bool throw_if_not_exists) override; bool removeImpl(const UUID & id, bool throw_if_not_exists) override;
bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists) override; bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists) override;

View File

@ -82,7 +82,7 @@ AccessEntityPtr deserializeAccessEntityImpl(const String & definition)
if (res) if (res)
throw Exception(ErrorCodes::INCORRECT_ACCESS_ENTITY_DEFINITION, "Two access entities attached in the same file"); throw Exception(ErrorCodes::INCORRECT_ACCESS_ENTITY_DEFINITION, "Two access entities attached in the same file");
res = user = std::make_unique<User>(); res = user = std::make_unique<User>();
InterpreterCreateUserQuery::updateUserFromQuery(*user, *create_user_query, /* allow_no_password = */ true, /* allow_plaintext_password = */ true); InterpreterCreateUserQuery::updateUserFromQuery(*user, *create_user_query, /* allow_no_password = */ true, /* allow_plaintext_password = */ true, /* max_number_of_authentication_methods = zero is unlimited*/ 0);
} }
else if (auto * create_role_query = query->as<ASTCreateRoleQuery>()) else if (auto * create_role_query = query->as<ASTCreateRoleQuery>())
{ {

View File

@ -14,11 +14,6 @@
namespace DB namespace DB
{ {
namespace ErrorCodes
{
extern const int NOT_IMPLEMENTED;
extern const int SUPPORT_IS_DISABLED;
}
namespace namespace
{ {
@ -84,12 +79,140 @@ namespace
return false; return false;
} }
#endif #endif
}
bool checkKerberosAuthentication(
const GSSAcceptorContext * gss_acceptor_context,
const AuthenticationData & authentication_method,
const ExternalAuthenticators & external_authenticators)
{
return authentication_method.getType() == AuthenticationType::KERBEROS
&& external_authenticators.checkKerberosCredentials(authentication_method.getKerberosRealm(), *gss_acceptor_context);
}
bool checkMySQLAuthentication(
const MySQLNative41Credentials * mysql_credentials,
const AuthenticationData & authentication_method)
{
switch (authentication_method.getType())
{
case AuthenticationType::PLAINTEXT_PASSWORD:
return checkPasswordPlainTextMySQL(
mysql_credentials->getScramble(),
mysql_credentials->getScrambledPassword(),
authentication_method.getPasswordHashBinary());
case AuthenticationType::DOUBLE_SHA1_PASSWORD:
return checkPasswordDoubleSHA1MySQL(
mysql_credentials->getScramble(),
mysql_credentials->getScrambledPassword(),
authentication_method.getPasswordHashBinary());
default:
return false;
}
}
bool checkBasicAuthentication(
const BasicCredentials * basic_credentials,
const AuthenticationData & authentication_method,
const ExternalAuthenticators & external_authenticators,
SettingsChanges & settings)
{
switch (authentication_method.getType())
{
case AuthenticationType::NO_PASSWORD:
{
return true; // N.B. even if the password is not empty!
}
case AuthenticationType::PLAINTEXT_PASSWORD:
{
return checkPasswordPlainText(basic_credentials->getPassword(), authentication_method.getPasswordHashBinary());
}
case AuthenticationType::SHA256_PASSWORD:
{
return checkPasswordSHA256(
basic_credentials->getPassword(), authentication_method.getPasswordHashBinary(), authentication_method.getSalt());
}
case AuthenticationType::DOUBLE_SHA1_PASSWORD:
{
return checkPasswordDoubleSHA1(basic_credentials->getPassword(), authentication_method.getPasswordHashBinary());
}
case AuthenticationType::LDAP:
{
return external_authenticators.checkLDAPCredentials(authentication_method.getLDAPServerName(), *basic_credentials);
}
case AuthenticationType::BCRYPT_PASSWORD:
{
return checkPasswordBcrypt(basic_credentials->getPassword(), authentication_method.getPasswordHashBinary());
}
case AuthenticationType::HTTP:
{
if (authentication_method.getHTTPAuthenticationScheme() == HTTPAuthenticationScheme::BASIC)
{
return external_authenticators.checkHTTPBasicCredentials(
authentication_method.getHTTPAuthenticationServerName(), *basic_credentials, settings);
}
break;
}
default:
break;
}
return false;
}
bool checkSSLCertificateAuthentication(
const SSLCertificateCredentials * ssl_certificate_credentials,
const AuthenticationData & authentication_method)
{
if (AuthenticationType::SSL_CERTIFICATE != authentication_method.getType())
{
return false;
}
for (SSLCertificateSubjects::Type type : {SSLCertificateSubjects::Type::CN, SSLCertificateSubjects::Type::SAN})
{
for (const auto & subject : authentication_method.getSSLCertificateSubjects().at(type))
{
if (ssl_certificate_credentials->getSSLCertificateSubjects().at(type).contains(subject))
return true;
// Wildcard support (1 only)
if (subject.contains('*'))
{
auto prefix = std::string_view(subject).substr(0, subject.find('*'));
auto suffix = std::string_view(subject).substr(subject.find('*') + 1);
auto slashes = std::count(subject.begin(), subject.end(), '/');
for (const auto & certificate_subject : ssl_certificate_credentials->getSSLCertificateSubjects().at(type))
{
bool matches_wildcard = certificate_subject.starts_with(prefix) && certificate_subject.ends_with(suffix);
// '*' must not represent a '/' in URI, so check if the number of '/' are equal
bool matches_slashes = slashes == count(certificate_subject.begin(), certificate_subject.end(), '/');
if (matches_wildcard && matches_slashes)
return true;
}
}
}
}
return false;
}
#if USE_SSH
bool checkSshAuthentication(
const SshCredentials * ssh_credentials,
const AuthenticationData & authentication_method)
{
return AuthenticationType::SSH_KEY == authentication_method.getType()
&& checkSshSignature(authentication_method.getSSHKeys(), ssh_credentials->getSignature(), ssh_credentials->getOriginal());
}
#endif
}
bool Authentication::areCredentialsValid( bool Authentication::areCredentialsValid(
const Credentials & credentials, const Credentials & credentials,
const AuthenticationData & auth_data, const AuthenticationData & authentication_method,
const ExternalAuthenticators & external_authenticators, const ExternalAuthenticators & external_authenticators,
SettingsChanges & settings) SettingsChanges & settings)
{ {
@ -98,204 +221,35 @@ bool Authentication::areCredentialsValid(
if (const auto * gss_acceptor_context = typeid_cast<const GSSAcceptorContext *>(&credentials)) if (const auto * gss_acceptor_context = typeid_cast<const GSSAcceptorContext *>(&credentials))
{ {
switch (auth_data.getType()) return checkKerberosAuthentication(gss_acceptor_context, authentication_method, external_authenticators);
{
case AuthenticationType::NO_PASSWORD:
case AuthenticationType::PLAINTEXT_PASSWORD:
case AuthenticationType::SHA256_PASSWORD:
case AuthenticationType::DOUBLE_SHA1_PASSWORD:
case AuthenticationType::BCRYPT_PASSWORD:
case AuthenticationType::LDAP:
case AuthenticationType::HTTP:
throw Authentication::Require<BasicCredentials>("ClickHouse Basic Authentication");
case AuthenticationType::JWT:
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "JWT is available only in ClickHouse Cloud");
case AuthenticationType::KERBEROS:
return external_authenticators.checkKerberosCredentials(auth_data.getKerberosRealm(), *gss_acceptor_context);
case AuthenticationType::SSL_CERTIFICATE:
throw Authentication::Require<BasicCredentials>("ClickHouse X.509 Authentication");
case AuthenticationType::SSH_KEY:
#if USE_SSH
throw Authentication::Require<SshCredentials>("SSH Keys Authentication");
#else
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "SSH is disabled, because ClickHouse is built without libssh");
#endif
case AuthenticationType::MAX:
break;
}
} }
if (const auto * mysql_credentials = typeid_cast<const MySQLNative41Credentials *>(&credentials)) if (const auto * mysql_credentials = typeid_cast<const MySQLNative41Credentials *>(&credentials))
{ {
switch (auth_data.getType()) return checkMySQLAuthentication(mysql_credentials, authentication_method);
{
case AuthenticationType::NO_PASSWORD:
return true; // N.B. even if the password is not empty!
case AuthenticationType::PLAINTEXT_PASSWORD:
return checkPasswordPlainTextMySQL(mysql_credentials->getScramble(), mysql_credentials->getScrambledPassword(), auth_data.getPasswordHashBinary());
case AuthenticationType::DOUBLE_SHA1_PASSWORD:
return checkPasswordDoubleSHA1MySQL(mysql_credentials->getScramble(), mysql_credentials->getScrambledPassword(), auth_data.getPasswordHashBinary());
case AuthenticationType::SHA256_PASSWORD:
case AuthenticationType::BCRYPT_PASSWORD:
case AuthenticationType::LDAP:
case AuthenticationType::KERBEROS:
case AuthenticationType::HTTP:
throw Authentication::Require<BasicCredentials>("ClickHouse Basic Authentication");
case AuthenticationType::SSL_CERTIFICATE:
throw Authentication::Require<BasicCredentials>("ClickHouse X.509 Authentication");
case AuthenticationType::JWT:
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "JWT is available only in ClickHouse Cloud");
case AuthenticationType::SSH_KEY:
#if USE_SSH
throw Authentication::Require<SshCredentials>("SSH Keys Authentication");
#else
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "SSH is disabled, because ClickHouse is built without libssh");
#endif
case AuthenticationType::MAX:
break;
}
} }
if (const auto * basic_credentials = typeid_cast<const BasicCredentials *>(&credentials)) if (const auto * basic_credentials = typeid_cast<const BasicCredentials *>(&credentials))
{ {
switch (auth_data.getType()) return checkBasicAuthentication(basic_credentials, authentication_method, external_authenticators, settings);
{
case AuthenticationType::NO_PASSWORD:
return true; // N.B. even if the password is not empty!
case AuthenticationType::PLAINTEXT_PASSWORD:
return checkPasswordPlainText(basic_credentials->getPassword(), auth_data.getPasswordHashBinary());
case AuthenticationType::SHA256_PASSWORD:
return checkPasswordSHA256(basic_credentials->getPassword(), auth_data.getPasswordHashBinary(), auth_data.getSalt());
case AuthenticationType::DOUBLE_SHA1_PASSWORD:
return checkPasswordDoubleSHA1(basic_credentials->getPassword(), auth_data.getPasswordHashBinary());
case AuthenticationType::LDAP:
return external_authenticators.checkLDAPCredentials(auth_data.getLDAPServerName(), *basic_credentials);
case AuthenticationType::KERBEROS:
throw Authentication::Require<GSSAcceptorContext>(auth_data.getKerberosRealm());
case AuthenticationType::SSL_CERTIFICATE:
throw Authentication::Require<BasicCredentials>("ClickHouse X.509 Authentication");
case AuthenticationType::SSH_KEY:
#if USE_SSH
throw Authentication::Require<SshCredentials>("SSH Keys Authentication");
#else
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "SSH is disabled, because ClickHouse is built without libssh");
#endif
case AuthenticationType::JWT:
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "JWT is available only in ClickHouse Cloud");
case AuthenticationType::BCRYPT_PASSWORD:
return checkPasswordBcrypt(basic_credentials->getPassword(), auth_data.getPasswordHashBinary());
case AuthenticationType::HTTP:
switch (auth_data.getHTTPAuthenticationScheme())
{
case HTTPAuthenticationScheme::BASIC:
return external_authenticators.checkHTTPBasicCredentials(
auth_data.getHTTPAuthenticationServerName(), *basic_credentials, settings);
}
case AuthenticationType::MAX:
break;
}
} }
if (const auto * ssl_certificate_credentials = typeid_cast<const SSLCertificateCredentials *>(&credentials)) if (const auto * ssl_certificate_credentials = typeid_cast<const SSLCertificateCredentials *>(&credentials))
{ {
switch (auth_data.getType()) return checkSSLCertificateAuthentication(ssl_certificate_credentials, authentication_method);
{
case AuthenticationType::NO_PASSWORD:
case AuthenticationType::PLAINTEXT_PASSWORD:
case AuthenticationType::SHA256_PASSWORD:
case AuthenticationType::DOUBLE_SHA1_PASSWORD:
case AuthenticationType::BCRYPT_PASSWORD:
case AuthenticationType::LDAP:
case AuthenticationType::HTTP:
throw Authentication::Require<BasicCredentials>("ClickHouse Basic Authentication");
case AuthenticationType::JWT:
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "JWT is available only in ClickHouse Cloud");
case AuthenticationType::KERBEROS:
throw Authentication::Require<GSSAcceptorContext>(auth_data.getKerberosRealm());
case AuthenticationType::SSL_CERTIFICATE:
for (SSLCertificateSubjects::Type type : {SSLCertificateSubjects::Type::CN, SSLCertificateSubjects::Type::SAN})
{
for (const auto & subject : auth_data.getSSLCertificateSubjects().at(type))
{
if (ssl_certificate_credentials->getSSLCertificateSubjects().at(type).contains(subject))
return true;
}
}
return false;
case AuthenticationType::SSH_KEY:
#if USE_SSH
throw Authentication::Require<SshCredentials>("SSH Keys Authentication");
#else
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "SSH is disabled, because ClickHouse is built without libssh");
#endif
case AuthenticationType::MAX:
break;
}
} }
#if USE_SSH #if USE_SSH
if (const auto * ssh_credentials = typeid_cast<const SshCredentials *>(&credentials)) if (const auto * ssh_credentials = typeid_cast<const SshCredentials *>(&credentials))
{ {
switch (auth_data.getType()) return checkSshAuthentication(ssh_credentials, authentication_method);
{
case AuthenticationType::NO_PASSWORD:
case AuthenticationType::PLAINTEXT_PASSWORD:
case AuthenticationType::SHA256_PASSWORD:
case AuthenticationType::DOUBLE_SHA1_PASSWORD:
case AuthenticationType::BCRYPT_PASSWORD:
case AuthenticationType::LDAP:
case AuthenticationType::HTTP:
throw Authentication::Require<BasicCredentials>("ClickHouse Basic Authentication");
case AuthenticationType::JWT:
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "JWT is available only in ClickHouse Cloud");
case AuthenticationType::KERBEROS:
throw Authentication::Require<GSSAcceptorContext>(auth_data.getKerberosRealm());
case AuthenticationType::SSL_CERTIFICATE:
throw Authentication::Require<SSLCertificateCredentials>("ClickHouse X.509 Authentication");
case AuthenticationType::SSH_KEY:
return checkSshSignature(auth_data.getSSHKeys(), ssh_credentials->getSignature(), ssh_credentials->getOriginal());
case AuthenticationType::MAX:
break;
}
} }
#endif #endif
if ([[maybe_unused]] const auto * always_allow_credentials = typeid_cast<const AlwaysAllowCredentials *>(&credentials)) if ([[maybe_unused]] const auto * always_allow_credentials = typeid_cast<const AlwaysAllowCredentials *>(&credentials))
return true; return true;
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "areCredentialsValid(): authentication type {} not supported", toString(auth_data.getType())); return false;
} }
} }

View File

@ -24,7 +24,7 @@ struct Authentication
/// returned by the authentication server /// returned by the authentication server
static bool areCredentialsValid( static bool areCredentialsValid(
const Credentials & credentials, const Credentials & credentials,
const AuthenticationData & auth_data, const AuthenticationData & authentication_method,
const ExternalAuthenticators & external_authenticators, const ExternalAuthenticators & external_authenticators,
SettingsChanges & settings); SettingsChanges & settings);

View File

@ -375,7 +375,8 @@ std::shared_ptr<ASTAuthenticationData> AuthenticationData::toAST() const
break; break;
} }
case AuthenticationType::NO_PASSWORD: [[fallthrough]]; case AuthenticationType::NO_PASSWORD:
break;
case AuthenticationType::MAX: case AuthenticationType::MAX:
throw Exception(ErrorCodes::LOGICAL_ERROR, "AST: Unexpected authentication type {}", toString(auth_type)); throw Exception(ErrorCodes::LOGICAL_ERROR, "AST: Unexpected authentication type {}", toString(auth_type));
} }

View File

@ -1,8 +1,6 @@
#include <Access/DiskAccessStorage.h> #include <Access/DiskAccessStorage.h>
#include <Access/AccessEntityIO.h> #include <Access/AccessEntityIO.h>
#include <Access/AccessChangesNotifier.h> #include <Access/AccessChangesNotifier.h>
#include <Backups/RestorerFromBackup.h>
#include <Backups/RestoreSettings.h>
#include <IO/WriteHelpers.h> #include <IO/WriteHelpers.h>
#include <IO/ReadHelpers.h> #include <IO/ReadHelpers.h>
#include <IO/ReadBufferFromFile.h> #include <IO/ReadBufferFromFile.h>
@ -418,7 +416,7 @@ void DiskAccessStorage::setAllInMemory(const std::vector<std::pair<UUID, AccessE
/// Insert or update entities. /// Insert or update entities.
for (const auto & [id, entity] : entities_without_conflicts) for (const auto & [id, entity] : entities_without_conflicts)
insertNoLock(id, entity, /* replace_if_exists = */ true, /* throw_if_exists = */ false, /* write_on_disk= */ false); insertNoLock(id, entity, /* replace_if_exists = */ true, /* throw_if_exists = */ false, /* conflicting_id = */ nullptr, /* write_on_disk= */ false);
} }
void DiskAccessStorage::removeAllExceptInMemory(const boost::container::flat_set<UUID> & ids_to_keep) void DiskAccessStorage::removeAllExceptInMemory(const boost::container::flat_set<UUID> & ids_to_keep)
@ -507,14 +505,14 @@ std::optional<std::pair<String, AccessEntityType>> DiskAccessStorage::readNameWi
} }
bool DiskAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists) bool DiskAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id)
{ {
std::lock_guard lock{mutex}; std::lock_guard lock{mutex};
return insertNoLock(id, new_entity, replace_if_exists, throw_if_exists, /* write_on_disk = */ true); return insertNoLock(id, new_entity, replace_if_exists, throw_if_exists, conflicting_id, /* write_on_disk = */ true);
} }
bool DiskAccessStorage::insertNoLock(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists, bool write_on_disk) bool DiskAccessStorage::insertNoLock(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id, bool write_on_disk)
{ {
const String & name = new_entity->getName(); const String & name = new_entity->getName();
AccessEntityType type = new_entity->getType(); AccessEntityType type = new_entity->getType();
@ -533,9 +531,15 @@ bool DiskAccessStorage::insertNoLock(const UUID & id, const AccessEntityPtr & ne
if (name_collision && !replace_if_exists) if (name_collision && !replace_if_exists)
{ {
if (throw_if_exists) if (throw_if_exists)
{
throwNameCollisionCannotInsert(type, name); throwNameCollisionCannotInsert(type, name);
}
else else
{
if (conflicting_id)
*conflicting_id = id_by_name;
return false; return false;
}
} }
auto it_by_id = entries_by_id.find(id); auto it_by_id = entries_by_id.find(id);
@ -548,7 +552,11 @@ bool DiskAccessStorage::insertNoLock(const UUID & id, const AccessEntityPtr & ne
throwIDCollisionCannotInsert(id, type, name, existing_entry.type, existing_entry.name); throwIDCollisionCannotInsert(id, type, name, existing_entry.type, existing_entry.name);
} }
else else
{
if (conflicting_id)
*conflicting_id = id;
return false; return false;
}
} }
if (write_on_disk) if (write_on_disk)
@ -727,25 +735,4 @@ void DiskAccessStorage::deleteAccessEntityOnDisk(const UUID & id) const
throw Exception(ErrorCodes::FILE_DOESNT_EXIST, "Couldn't delete {}", file_path); throw Exception(ErrorCodes::FILE_DOESNT_EXIST, "Couldn't delete {}", file_path);
} }
void DiskAccessStorage::restoreFromBackup(RestorerFromBackup & restorer)
{
if (!isRestoreAllowed())
throwRestoreNotAllowed();
auto entities = restorer.getAccessEntitiesToRestore();
if (entities.empty())
return;
auto create_access = restorer.getRestoreSettings().create_access;
bool replace_if_exists = (create_access == RestoreAccessCreationMode::kReplace);
bool throw_if_exists = (create_access == RestoreAccessCreationMode::kCreate);
restorer.addDataRestoreTask([this, my_entities = std::move(entities), replace_if_exists, throw_if_exists]
{
for (const auto & [id, entity] : my_entities)
insert(id, entity, replace_if_exists, throw_if_exists);
});
}
} }

View File

@ -34,14 +34,13 @@ public:
bool exists(const UUID & id) const override; bool exists(const UUID & id) const override;
bool isBackupAllowed() const override { return backup_allowed; } bool isBackupAllowed() const override { return backup_allowed; }
void restoreFromBackup(RestorerFromBackup & restorer) override;
private: private:
std::optional<UUID> findImpl(AccessEntityType type, const String & name) const override; std::optional<UUID> findImpl(AccessEntityType type, const String & name) const override;
std::vector<UUID> findAllImpl(AccessEntityType type) const override; std::vector<UUID> findAllImpl(AccessEntityType type) const override;
AccessEntityPtr readImpl(const UUID & id, bool throw_if_not_exists) const override; AccessEntityPtr readImpl(const UUID & id, bool throw_if_not_exists) const override;
std::optional<std::pair<String, AccessEntityType>> readNameWithTypeImpl(const UUID & id, bool throw_if_not_exists) const override; std::optional<std::pair<String, AccessEntityType>> readNameWithTypeImpl(const UUID & id, bool throw_if_not_exists) const override;
bool insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists) override; bool insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id) override;
bool removeImpl(const UUID & id, bool throw_if_not_exists) override; bool removeImpl(const UUID & id, bool throw_if_not_exists) override;
bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists) override; bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists) override;
@ -55,7 +54,7 @@ private:
void listsWritingThreadFunc() TSA_NO_THREAD_SAFETY_ANALYSIS; void listsWritingThreadFunc() TSA_NO_THREAD_SAFETY_ANALYSIS;
void stopListsWritingThread(); void stopListsWritingThread();
bool insertNoLock(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists, bool write_on_disk) TSA_REQUIRES(mutex); bool insertNoLock(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id, bool write_on_disk) TSA_REQUIRES(mutex);
bool updateNoLock(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists, bool write_on_disk) TSA_REQUIRES(mutex); bool updateNoLock(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists, bool write_on_disk) TSA_REQUIRES(mutex);
bool removeNoLock(const UUID & id, bool throw_if_not_exists, bool write_on_disk) TSA_REQUIRES(mutex); bool removeNoLock(const UUID & id, bool throw_if_not_exists, bool write_on_disk) TSA_REQUIRES(mutex);

View File

@ -9,4 +9,28 @@ bool IAccessEntity::equal(const IAccessEntity & other) const
return (name == other.name) && (getType() == other.getType()); return (name == other.name) && (getType() == other.getType());
} }
void IAccessEntity::replaceDependencies(std::shared_ptr<const IAccessEntity> & entity, const std::unordered_map<UUID, UUID> & old_to_new_ids)
{
if (old_to_new_ids.empty())
return;
bool need_replace_dependencies = false;
auto dependencies = entity->findDependencies();
for (const auto & dependency : dependencies)
{
if (old_to_new_ids.contains(dependency))
{
need_replace_dependencies = true;
break;
}
}
if (!need_replace_dependencies)
return;
auto new_entity = entity->clone();
new_entity->replaceDependencies(old_to_new_ids);
entity = new_entity;
}
} }

View File

@ -50,7 +50,8 @@ struct IAccessEntity
virtual std::vector<UUID> findDependencies() const { return {}; } virtual std::vector<UUID> findDependencies() const { return {}; }
/// Replaces dependencies according to a specified map. /// Replaces dependencies according to a specified map.
virtual void replaceDependencies(const std::unordered_map<UUID, UUID> & /* old_to_new_ids */) {} void replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) { doReplaceDependencies(old_to_new_ids); }
static void replaceDependencies(std::shared_ptr<const IAccessEntity> & entity, const std::unordered_map<UUID, UUID> & old_to_new_ids);
/// Whether this access entity should be written to a backup. /// Whether this access entity should be written to a backup.
virtual bool isBackupAllowed() const { return false; } virtual bool isBackupAllowed() const { return false; }
@ -66,6 +67,8 @@ protected:
{ {
return std::make_shared<EntityClassT>(typeid_cast<const EntityClassT &>(*this)); return std::make_shared<EntityClassT>(typeid_cast<const EntityClassT &>(*this));
} }
virtual void doReplaceDependencies(const std::unordered_map<UUID, UUID> & /* old_to_new_ids */) {}
}; };
using AccessEntityPtr = std::shared_ptr<const IAccessEntity>; using AccessEntityPtr = std::shared_ptr<const IAccessEntity>;

View File

@ -4,6 +4,8 @@
#include <Access/User.h> #include <Access/User.h>
#include <Access/AccessBackup.h> #include <Access/AccessBackup.h>
#include <Backups/BackupEntriesCollector.h> #include <Backups/BackupEntriesCollector.h>
#include <Backups/RestorerFromBackup.h>
#include <Backups/RestoreSettings.h>
#include <Common/Exception.h> #include <Common/Exception.h>
#include <Common/quoteString.h> #include <Common/quoteString.h>
#include <Common/callOnce.h> #include <Common/callOnce.h>
@ -14,10 +16,11 @@
#include <base/FnTraits.h> #include <base/FnTraits.h>
#include <boost/algorithm/string/join.hpp> #include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/replace.hpp>
#include <boost/range/adaptor/map.hpp>
#include <boost/range/adaptor/reversed.hpp> #include <boost/range/adaptor/reversed.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/range/algorithm_ext/erase.hpp> #include <boost/range/algorithm_ext/erase.hpp>
namespace DB namespace DB
{ {
namespace ErrorCodes namespace ErrorCodes
@ -30,7 +33,6 @@ namespace ErrorCodes
extern const int IP_ADDRESS_NOT_ALLOWED; extern const int IP_ADDRESS_NOT_ALLOWED;
extern const int LOGICAL_ERROR; extern const int LOGICAL_ERROR;
extern const int NOT_IMPLEMENTED; extern const int NOT_IMPLEMENTED;
extern const int AUTHENTICATION_FAILED;
} }
@ -179,20 +181,20 @@ UUID IAccessStorage::insert(const AccessEntityPtr & entity)
return *insert(entity, /* replace_if_exists = */ false, /* throw_if_exists = */ true); return *insert(entity, /* replace_if_exists = */ false, /* throw_if_exists = */ true);
} }
std::optional<UUID> IAccessStorage::insert(const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists) std::optional<UUID> IAccessStorage::insert(const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id)
{ {
auto id = generateRandomID(); auto id = generateRandomID();
if (insert(id, entity, replace_if_exists, throw_if_exists)) if (insert(id, entity, replace_if_exists, throw_if_exists, conflicting_id))
return id; return id;
return std::nullopt; return std::nullopt;
} }
bool IAccessStorage::insert(const DB::UUID & id, const DB::AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists) bool IAccessStorage::insert(const DB::UUID & id, const DB::AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id)
{ {
return insertImpl(id, entity, replace_if_exists, throw_if_exists); return insertImpl(id, entity, replace_if_exists, throw_if_exists, conflicting_id);
} }
@ -286,7 +288,7 @@ std::vector<UUID> IAccessStorage::insertOrReplace(const std::vector<AccessEntity
} }
bool IAccessStorage::insertImpl(const UUID &, const AccessEntityPtr & entity, bool, bool) bool IAccessStorage::insertImpl(const UUID &, const AccessEntityPtr & entity, bool, bool, UUID *)
{ {
if (isReadOnly()) if (isReadOnly())
throwReadonlyCannotInsert(entity->getType(), entity->getName()); throwReadonlyCannotInsert(entity->getType(), entity->getName());
@ -525,15 +527,32 @@ std::optional<AuthResult> IAccessStorage::authenticateImpl(
if (!isAddressAllowed(*user, address)) if (!isAddressAllowed(*user, address))
throwAddressNotAllowed(address); throwAddressNotAllowed(address);
auto auth_type = user->auth_data.getType(); bool skipped_not_allowed_authentication_methods = false;
if (((auth_type == AuthenticationType::NO_PASSWORD) && !allow_no_password) ||
((auth_type == AuthenticationType::PLAINTEXT_PASSWORD) && !allow_plaintext_password))
throwAuthenticationTypeNotAllowed(auth_type);
if (!areCredentialsValid(*user, credentials, external_authenticators, auth_result.settings)) for (const auto & auth_method : user->authentication_methods)
throwInvalidCredentials(); {
auto auth_type = auth_method.getType();
if (((auth_type == AuthenticationType::NO_PASSWORD) && !allow_no_password) ||
((auth_type == AuthenticationType::PLAINTEXT_PASSWORD) && !allow_plaintext_password))
{
skipped_not_allowed_authentication_methods = true;
continue;
}
return auth_result; if (areCredentialsValid(user->getName(), user->valid_until, auth_method, credentials, external_authenticators, auth_result.settings))
{
auth_result.authentication_data = auth_method;
return auth_result;
}
}
if (skipped_not_allowed_authentication_methods)
{
LOG_INFO(log, "Skipped the check for not allowed authentication methods,"
"check allow_no_password and allow_plaintext_password settings in the server configuration");
}
throwInvalidCredentials();
} }
} }
@ -543,9 +562,10 @@ std::optional<AuthResult> IAccessStorage::authenticateImpl(
return std::nullopt; return std::nullopt;
} }
bool IAccessStorage::areCredentialsValid( bool IAccessStorage::areCredentialsValid(
const User & user, const std::string & user_name,
time_t valid_until,
const AuthenticationData & authentication_method,
const Credentials & credentials, const Credentials & credentials,
const ExternalAuthenticators & external_authenticators, const ExternalAuthenticators & external_authenticators,
SettingsChanges & settings) const SettingsChanges & settings) const
@ -553,21 +573,20 @@ bool IAccessStorage::areCredentialsValid(
if (!credentials.isReady()) if (!credentials.isReady())
return false; return false;
if (credentials.getUserName() != user.getName()) if (credentials.getUserName() != user_name)
return false; return false;
if (user.valid_until) if (valid_until)
{ {
const time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); const time_t now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
if (now > user.valid_until) if (now > valid_until)
return false; return false;
} }
return Authentication::areCredentialsValid(credentials, user.auth_data, external_authenticators, settings); return Authentication::areCredentialsValid(credentials, authentication_method, external_authenticators, settings);
} }
bool IAccessStorage::isAddressAllowed(const User & user, const Poco::Net::IPAddress & address) const bool IAccessStorage::isAddressAllowed(const User & user, const Poco::Net::IPAddress & address) const
{ {
return user.allowed_client_hosts.contains(address); return user.allowed_client_hosts.contains(address);
@ -595,12 +614,51 @@ void IAccessStorage::backup(BackupEntriesCollector & backup_entries_collector, c
} }
void IAccessStorage::restoreFromBackup(RestorerFromBackup &) void IAccessStorage::restoreFromBackup(RestorerFromBackup & restorer)
{ {
if (!isRestoreAllowed()) if (!isRestoreAllowed())
throwRestoreNotAllowed(); throwRestoreNotAllowed();
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "restoreFromBackup() is not implemented in {}", getStorageType()); if (isReplicated() && !acquireReplicatedRestore(restorer))
return;
auto entities = restorer.getAccessEntitiesToRestore();
if (entities.empty())
return;
auto create_access = restorer.getRestoreSettings().create_access;
bool replace_if_exists = (create_access == RestoreAccessCreationMode::kReplace);
bool throw_if_exists = (create_access == RestoreAccessCreationMode::kCreate);
restorer.addDataRestoreTask([this, entities_to_restore = std::move(entities), replace_if_exists, throw_if_exists] mutable
{
std::unordered_map<UUID, UUID> new_to_existing_ids;
for (auto & [id, entity] : entities_to_restore)
{
UUID existing_entity_id;
if (!insert(id, entity, replace_if_exists, throw_if_exists, &existing_entity_id))
{
/// Couldn't insert `entity` because there is an existing entity with the same name.
new_to_existing_ids[id] = existing_entity_id;
}
}
if (!new_to_existing_ids.empty())
{
/// If new entities restored from backup have dependencies on other entities from backup which were not restored because they existed,
/// then we should correct those dependencies.
auto update_func = [&](const AccessEntityPtr & entity) -> AccessEntityPtr
{
auto res = entity;
IAccessEntity::replaceDependencies(res, new_to_existing_ids);
return res;
};
std::vector<UUID> ids;
ids.reserve(entities_to_restore.size());
boost::copy(entities_to_restore | boost::adaptors::map_keys, std::back_inserter(ids));
tryUpdate(ids, update_func);
}
});
} }
@ -747,14 +805,6 @@ void IAccessStorage::throwAddressNotAllowed(const Poco::Net::IPAddress & address
throw Exception(ErrorCodes::IP_ADDRESS_NOT_ALLOWED, "Connections from {} are not allowed", address.toString()); throw Exception(ErrorCodes::IP_ADDRESS_NOT_ALLOWED, "Connections from {} are not allowed", address.toString());
} }
void IAccessStorage::throwAuthenticationTypeNotAllowed(AuthenticationType auth_type)
{
throw Exception(
ErrorCodes::AUTHENTICATION_FAILED,
"Authentication type {} is not allowed, check the setting allow_{} in the server configuration",
toString(auth_type), AuthenticationTypeInfo::get(auth_type).name);
}
void IAccessStorage::throwInvalidCredentials() void IAccessStorage::throwInvalidCredentials()
{ {
throw Exception(ErrorCodes::WRONG_PASSWORD, "Invalid credentials"); throw Exception(ErrorCodes::WRONG_PASSWORD, "Invalid credentials");

View File

@ -1,6 +1,7 @@
#pragma once #pragma once
#include <Access/IAccessEntity.h> #include <Access/IAccessEntity.h>
#include <Access/AuthenticationData.h>
#include <Core/Types.h> #include <Core/Types.h>
#include <Core/UUID.h> #include <Core/UUID.h>
#include <Parsers/IParser.h> #include <Parsers/IParser.h>
@ -34,6 +35,7 @@ struct AuthResult
UUID user_id; UUID user_id;
/// Session settings received from authentication server (if any) /// Session settings received from authentication server (if any)
SettingsChanges settings{}; SettingsChanges settings{};
AuthenticationData authentication_data {};
}; };
/// Contains entities, i.e. instances of classes derived from IAccessEntity. /// Contains entities, i.e. instances of classes derived from IAccessEntity.
@ -62,6 +64,9 @@ public:
/// Returns true if this entity is readonly. /// Returns true if this entity is readonly.
virtual bool isReadOnly(const UUID &) const { return isReadOnly(); } virtual bool isReadOnly(const UUID &) const { return isReadOnly(); }
/// Returns true if this storage is replicated.
virtual bool isReplicated() const { return false; }
/// Starts periodic reloading and updating of entities in this storage. /// Starts periodic reloading and updating of entities in this storage.
virtual void startPeriodicReloading() {} virtual void startPeriodicReloading() {}
@ -151,8 +156,8 @@ public:
/// Inserts an entity to the storage. Returns ID of a new entry in the storage. /// Inserts an entity to the storage. Returns ID of a new entry in the storage.
/// Throws an exception if the specified name already exists. /// Throws an exception if the specified name already exists.
UUID insert(const AccessEntityPtr & entity); UUID insert(const AccessEntityPtr & entity);
std::optional<UUID> insert(const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists); std::optional<UUID> insert(const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id = nullptr);
bool insert(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists); bool insert(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id = nullptr);
std::vector<UUID> insert(const std::vector<AccessEntityPtr> & multiple_entities, bool replace_if_exists = false, bool throw_if_exists = true); std::vector<UUID> insert(const std::vector<AccessEntityPtr> & multiple_entities, bool replace_if_exists = false, bool throw_if_exists = true);
std::vector<UUID> insert(const std::vector<AccessEntityPtr> & multiple_entities, const std::vector<UUID> & ids, bool replace_if_exists = false, bool throw_if_exists = true); std::vector<UUID> insert(const std::vector<AccessEntityPtr> & multiple_entities, const std::vector<UUID> & ids, bool replace_if_exists = false, bool throw_if_exists = true);
@ -216,7 +221,7 @@ protected:
virtual std::vector<UUID> findAllImpl(AccessEntityType type) const = 0; virtual std::vector<UUID> findAllImpl(AccessEntityType type) const = 0;
virtual AccessEntityPtr readImpl(const UUID & id, bool throw_if_not_exists) const = 0; virtual AccessEntityPtr readImpl(const UUID & id, bool throw_if_not_exists) const = 0;
virtual std::optional<std::pair<String, AccessEntityType>> readNameWithTypeImpl(const UUID & id, bool throw_if_not_exists) const; virtual std::optional<std::pair<String, AccessEntityType>> readNameWithTypeImpl(const UUID & id, bool throw_if_not_exists) const;
virtual bool insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists); virtual bool insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id);
virtual bool removeImpl(const UUID & id, bool throw_if_not_exists); virtual bool removeImpl(const UUID & id, bool throw_if_not_exists);
virtual bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists); virtual bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists);
virtual std::optional<AuthResult> authenticateImpl( virtual std::optional<AuthResult> authenticateImpl(
@ -227,7 +232,9 @@ protected:
bool allow_no_password, bool allow_no_password,
bool allow_plaintext_password) const; bool allow_plaintext_password) const;
virtual bool areCredentialsValid( virtual bool areCredentialsValid(
const User & user, const std::string & user_name,
time_t valid_until,
const AuthenticationData & authentication_method,
const Credentials & credentials, const Credentials & credentials,
const ExternalAuthenticators & external_authenticators, const ExternalAuthenticators & external_authenticators,
SettingsChanges & settings) const; SettingsChanges & settings) const;
@ -236,6 +243,7 @@ protected:
LoggerPtr getLogger() const; LoggerPtr getLogger() const;
static String formatEntityTypeWithName(AccessEntityType type, const String & name) { return AccessEntityTypeInfo::get(type).formatEntityNameWithType(name); } static String formatEntityTypeWithName(AccessEntityType type, const String & name) { return AccessEntityTypeInfo::get(type).formatEntityNameWithType(name); }
static void clearConflictsInEntitiesList(std::vector<std::pair<UUID, AccessEntityPtr>> & entities, LoggerPtr log_); static void clearConflictsInEntitiesList(std::vector<std::pair<UUID, AccessEntityPtr>> & entities, LoggerPtr log_);
virtual bool acquireReplicatedRestore(RestorerFromBackup &) const { return false; }
[[noreturn]] void throwNotFound(const UUID & id) const; [[noreturn]] void throwNotFound(const UUID & id) const;
[[noreturn]] void throwNotFound(AccessEntityType type, const String & name) const; [[noreturn]] void throwNotFound(AccessEntityType type, const String & name) const;
[[noreturn]] static void throwBadCast(const UUID & id, AccessEntityType type, const String & name, AccessEntityType required_type); [[noreturn]] static void throwBadCast(const UUID & id, AccessEntityType type, const String & name, AccessEntityType required_type);
@ -248,7 +256,6 @@ protected:
[[noreturn]] void throwReadonlyCannotRemove(AccessEntityType type, const String & name) const; [[noreturn]] void throwReadonlyCannotRemove(AccessEntityType type, const String & name) const;
[[noreturn]] static void throwAddressNotAllowed(const Poco::Net::IPAddress & address); [[noreturn]] static void throwAddressNotAllowed(const Poco::Net::IPAddress & address);
[[noreturn]] static void throwInvalidCredentials(); [[noreturn]] static void throwInvalidCredentials();
[[noreturn]] static void throwAuthenticationTypeNotAllowed(AuthenticationType auth_type);
[[noreturn]] void throwBackupNotAllowed() const; [[noreturn]] void throwBackupNotAllowed() const;
[[noreturn]] void throwRestoreNotAllowed() const; [[noreturn]] void throwRestoreNotAllowed() const;

View File

@ -468,8 +468,8 @@ std::optional<AuthResult> LDAPAccessStorage::authenticateImpl(
// User does not exist, so we create one, and will add it if authentication is successful. // User does not exist, so we create one, and will add it if authentication is successful.
new_user = std::make_shared<User>(); new_user = std::make_shared<User>();
new_user->setName(credentials.getUserName()); new_user->setName(credentials.getUserName());
new_user->auth_data = AuthenticationData(AuthenticationType::LDAP); new_user->authentication_methods.emplace_back(AuthenticationType::LDAP);
new_user->auth_data.setLDAPServerName(ldap_server_name); new_user->authentication_methods.back().setLDAPServerName(ldap_server_name);
user = new_user; user = new_user;
} }
@ -504,7 +504,7 @@ std::optional<AuthResult> LDAPAccessStorage::authenticateImpl(
} }
if (id) if (id)
return AuthResult{ .user_id = *id }; return AuthResult{ .user_id = *id, .authentication_data = AuthenticationData(AuthenticationType::LDAP) };
return std::nullopt; return std::nullopt;
} }

View File

@ -1,7 +1,5 @@
#include <Access/MemoryAccessStorage.h> #include <Access/MemoryAccessStorage.h>
#include <Access/AccessChangesNotifier.h> #include <Access/AccessChangesNotifier.h>
#include <Backups/RestorerFromBackup.h>
#include <Backups/RestoreSettings.h>
#include <base/scope_guard.h> #include <base/scope_guard.h>
#include <boost/container/flat_set.hpp> #include <boost/container/flat_set.hpp>
#include <boost/range/adaptor/map.hpp> #include <boost/range/adaptor/map.hpp>
@ -63,14 +61,14 @@ AccessEntityPtr MemoryAccessStorage::readImpl(const UUID & id, bool throw_if_not
} }
bool MemoryAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists) bool MemoryAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id)
{ {
std::lock_guard lock{mutex}; std::lock_guard lock{mutex};
return insertNoLock(id, new_entity, replace_if_exists, throw_if_exists); return insertNoLock(id, new_entity, replace_if_exists, throw_if_exists, conflicting_id);
} }
bool MemoryAccessStorage::insertNoLock(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists) bool MemoryAccessStorage::insertNoLock(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id)
{ {
const String & name = new_entity->getName(); const String & name = new_entity->getName();
AccessEntityType type = new_entity->getType(); AccessEntityType type = new_entity->getType();
@ -86,9 +84,15 @@ bool MemoryAccessStorage::insertNoLock(const UUID & id, const AccessEntityPtr &
if (name_collision && !replace_if_exists) if (name_collision && !replace_if_exists)
{ {
if (throw_if_exists) if (throw_if_exists)
{
throwNameCollisionCannotInsert(type, name); throwNameCollisionCannotInsert(type, name);
}
else else
{
if (conflicting_id)
*conflicting_id = id_by_name;
return false; return false;
}
} }
auto it_by_id = entries_by_id.find(id); auto it_by_id = entries_by_id.find(id);
@ -97,9 +101,15 @@ bool MemoryAccessStorage::insertNoLock(const UUID & id, const AccessEntityPtr &
{ {
const auto & existing_entry = it_by_id->second; const auto & existing_entry = it_by_id->second;
if (throw_if_exists) if (throw_if_exists)
{
throwIDCollisionCannotInsert(id, type, name, existing_entry.entity->getType(), existing_entry.entity->getName()); throwIDCollisionCannotInsert(id, type, name, existing_entry.entity->getType(), existing_entry.entity->getName());
}
else else
{
if (conflicting_id)
*conflicting_id = id;
return false; return false;
}
} }
/// Remove collisions if necessary. /// Remove collisions if necessary.
@ -270,28 +280,7 @@ void MemoryAccessStorage::setAll(const std::vector<std::pair<UUID, AccessEntityP
/// Insert or update entities. /// Insert or update entities.
for (const auto & [id, entity] : entities_without_conflicts) for (const auto & [id, entity] : entities_without_conflicts)
insertNoLock(id, entity, /* replace_if_exists = */ true, /* throw_if_exists = */ false); insertNoLock(id, entity, /* replace_if_exists = */ true, /* throw_if_exists = */ false, /* conflicting_id = */ nullptr);
}
void MemoryAccessStorage::restoreFromBackup(RestorerFromBackup & restorer)
{
if (!isRestoreAllowed())
throwRestoreNotAllowed();
auto entities = restorer.getAccessEntitiesToRestore();
if (entities.empty())
return;
auto create_access = restorer.getRestoreSettings().create_access;
bool replace_if_exists = (create_access == RestoreAccessCreationMode::kReplace);
bool throw_if_exists = (create_access == RestoreAccessCreationMode::kCreate);
restorer.addDataRestoreTask([this, my_entities = std::move(entities), replace_if_exists, throw_if_exists]
{
for (const auto & [id, entity] : my_entities)
insert(id, entity, replace_if_exists, throw_if_exists);
});
} }
} }

View File

@ -34,17 +34,16 @@ public:
bool exists(const UUID & id) const override; bool exists(const UUID & id) const override;
bool isBackupAllowed() const override { return backup_allowed; } bool isBackupAllowed() const override { return backup_allowed; }
void restoreFromBackup(RestorerFromBackup & restorer) override;
private: private:
std::optional<UUID> findImpl(AccessEntityType type, const String & name) const override; std::optional<UUID> findImpl(AccessEntityType type, const String & name) const override;
std::vector<UUID> findAllImpl(AccessEntityType type) const override; std::vector<UUID> findAllImpl(AccessEntityType type) const override;
AccessEntityPtr readImpl(const UUID & id, bool throw_if_not_exists) const override; AccessEntityPtr readImpl(const UUID & id, bool throw_if_not_exists) const override;
bool insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists) override; bool insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id) override;
bool removeImpl(const UUID & id, bool throw_if_not_exists) override; bool removeImpl(const UUID & id, bool throw_if_not_exists) override;
bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists) override; bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists) override;
bool insertNoLock(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists); bool insertNoLock(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id);
bool removeNoLock(const UUID & id, bool throw_if_not_exists); bool removeNoLock(const UUID & id, bool throw_if_not_exists);
bool updateNoLock(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists); bool updateNoLock(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists);

View File

@ -353,7 +353,7 @@ void MultipleAccessStorage::reload(ReloadMode reload_mode)
} }
bool MultipleAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists) bool MultipleAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id)
{ {
std::shared_ptr<IAccessStorage> storage_for_insertion; std::shared_ptr<IAccessStorage> storage_for_insertion;
@ -376,7 +376,7 @@ bool MultipleAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr &
getStorageName()); getStorageName());
} }
if (storage_for_insertion->insert(id, entity, replace_if_exists, throw_if_exists)) if (storage_for_insertion->insert(id, entity, replace_if_exists, throw_if_exists, conflicting_id))
{ {
std::lock_guard lock{mutex}; std::lock_guard lock{mutex};
ids_cache.set(id, storage_for_insertion); ids_cache.set(id, storage_for_insertion);

View File

@ -67,7 +67,7 @@ protected:
std::vector<UUID> findAllImpl(AccessEntityType type) const override; std::vector<UUID> findAllImpl(AccessEntityType type) const override;
AccessEntityPtr readImpl(const UUID & id, bool throw_if_not_exists) const override; AccessEntityPtr readImpl(const UUID & id, bool throw_if_not_exists) const override;
std::optional<std::pair<String, AccessEntityType>> readNameWithTypeImpl(const UUID & id, bool throw_if_not_exists) const override; std::optional<std::pair<String, AccessEntityType>> readNameWithTypeImpl(const UUID & id, bool throw_if_not_exists) const override;
bool insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists) override; bool insertImpl(const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id) override;
bool removeImpl(const UUID & id, bool throw_if_not_exists) override; bool removeImpl(const UUID & id, bool throw_if_not_exists) override;
bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists) override; bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists) override;
std::optional<AuthResult> authenticateImpl(const Credentials & credentials, const Poco::Net::IPAddress & address, const ExternalAuthenticators & external_authenticators, bool throw_if_user_not_exists, bool allow_no_password, bool allow_plaintext_password) const override; std::optional<AuthResult> authenticateImpl(const Credentials & credentials, const Poco::Net::IPAddress & address, const ExternalAuthenticators & external_authenticators, bool throw_if_user_not_exists, bool allow_no_password, bool allow_plaintext_password) const override;

View File

@ -24,7 +24,7 @@ std::vector<UUID> Quota::findDependencies() const
return to_roles.findDependencies(); return to_roles.findDependencies();
} }
void Quota::replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) void Quota::doReplaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids)
{ {
to_roles.replaceDependencies(old_to_new_ids); to_roles.replaceDependencies(old_to_new_ids);
} }

View File

@ -47,7 +47,7 @@ struct Quota : public IAccessEntity
AccessEntityType getType() const override { return TYPE; } AccessEntityType getType() const override { return TYPE; }
std::vector<UUID> findDependencies() const override; std::vector<UUID> findDependencies() const override;
void replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) override; void doReplaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) override;
bool isBackupAllowed() const override { return true; } bool isBackupAllowed() const override { return true; }
}; };

View File

@ -5,10 +5,9 @@
#include <Access/AccessChangesNotifier.h> #include <Access/AccessChangesNotifier.h>
#include <Access/AccessBackup.h> #include <Access/AccessBackup.h>
#include <Backups/BackupEntriesCollector.h> #include <Backups/BackupEntriesCollector.h>
#include <Backups/RestorerFromBackup.h>
#include <Backups/RestoreSettings.h>
#include <Backups/IBackupCoordination.h> #include <Backups/IBackupCoordination.h>
#include <Backups/IRestoreCoordination.h> #include <Backups/IRestoreCoordination.h>
#include <Backups/RestorerFromBackup.h>
#include <IO/ReadHelpers.h> #include <IO/ReadHelpers.h>
#include <Interpreters/Context.h> #include <Interpreters/Context.h>
#include <Common/ZooKeeper/KeeperException.h> #include <Common/ZooKeeper/KeeperException.h>
@ -120,7 +119,7 @@ static void retryOnZooKeeperUserError(size_t attempts, Func && function)
} }
} }
bool ReplicatedAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists) bool ReplicatedAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id)
{ {
const AccessEntityTypeInfo type_info = AccessEntityTypeInfo::get(new_entity->getType()); const AccessEntityTypeInfo type_info = AccessEntityTypeInfo::get(new_entity->getType());
const String & name = new_entity->getName(); const String & name = new_entity->getName();
@ -128,7 +127,7 @@ bool ReplicatedAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr
auto zookeeper = getZooKeeper(); auto zookeeper = getZooKeeper();
bool ok = false; bool ok = false;
retryOnZooKeeperUserError(10, [&]{ ok = insertZooKeeper(zookeeper, id, new_entity, replace_if_exists, throw_if_exists); }); retryOnZooKeeperUserError(10, [&]{ ok = insertZooKeeper(zookeeper, id, new_entity, replace_if_exists, throw_if_exists, conflicting_id); });
if (!ok) if (!ok)
return false; return false;
@ -143,7 +142,8 @@ bool ReplicatedAccessStorage::insertZooKeeper(
const UUID & id, const UUID & id,
const AccessEntityPtr & new_entity, const AccessEntityPtr & new_entity,
bool replace_if_exists, bool replace_if_exists,
bool throw_if_exists) bool throw_if_exists,
UUID * conflicting_id)
{ {
const String & name = new_entity->getName(); const String & name = new_entity->getName();
const AccessEntityType type = new_entity->getType(); const AccessEntityType type = new_entity->getType();
@ -167,27 +167,52 @@ bool ReplicatedAccessStorage::insertZooKeeper(
if (res == Coordination::Error::ZNODEEXISTS) if (res == Coordination::Error::ZNODEEXISTS)
{ {
if (!throw_if_exists && !replace_if_exists) if (!replace_if_exists)
return false; /// Couldn't insert a new entity.
if (throw_if_exists)
{ {
if (responses[0]->error == Coordination::Error::ZNODEEXISTS) if (responses[0]->error == Coordination::Error::ZNODEEXISTS)
{ {
/// To fail with a nice error message, we need info about what already exists. /// Couldn't insert the new entity because there is an existing entity with such UUID.
/// This itself could fail if the conflicting uuid disappears in the meantime. if (throw_if_exists)
/// If that happens, then we'll just retry from the start. {
String existing_entity_definition = zookeeper->get(entity_path); /// To fail with a nice error message, we need info about what already exists.
/// This itself can fail if the conflicting uuid disappears in the meantime.
/// If that happens, then retryOnZooKeeperUserError() will just retry the operation from the start.
String existing_entity_definition = zookeeper->get(entity_path);
AccessEntityPtr existing_entity = deserializeAccessEntity(existing_entity_definition, entity_path); AccessEntityPtr existing_entity = deserializeAccessEntity(existing_entity_definition, entity_path);
AccessEntityType existing_type = existing_entity->getType(); AccessEntityType existing_type = existing_entity->getType();
String existing_name = existing_entity->getName(); String existing_name = existing_entity->getName();
throwIDCollisionCannotInsert(id, type, name, existing_type, existing_name); throwIDCollisionCannotInsert(id, type, name, existing_type, existing_name);
}
else
{
if (conflicting_id)
*conflicting_id = id;
return false;
}
}
else if (responses[1]->error == Coordination::Error::ZNODEEXISTS)
{
/// Couldn't insert the new entity because there is an existing entity with the same name.
if (throw_if_exists)
{
throwNameCollisionCannotInsert(type, name);
}
else
{
if (conflicting_id)
{
/// Get UUID of the existing entry with the same name.
/// This itself can fail if the conflicting name disappears in the meantime.
/// If that happens, then retryOnZooKeeperUserError() will just retry the operation from the start.
*conflicting_id = parseUUID(zookeeper->get(name_path));
}
return false;
}
} }
else else
{ {
/// Couldn't insert the new entity because there is an existing entity with such name. zkutil::KeeperMultiException::check(res, ops, responses);
throwNameCollisionCannotInsert(type, name);
} }
} }
@ -693,28 +718,10 @@ void ReplicatedAccessStorage::backup(BackupEntriesCollector & backup_entries_col
} }
void ReplicatedAccessStorage::restoreFromBackup(RestorerFromBackup & restorer) bool ReplicatedAccessStorage::acquireReplicatedRestore(RestorerFromBackup & restorer) const
{ {
if (!isRestoreAllowed())
throwRestoreNotAllowed();
auto restore_coordination = restorer.getRestoreCoordination(); auto restore_coordination = restorer.getRestoreCoordination();
if (!restore_coordination->acquireReplicatedAccessStorage(zookeeper_path)) return restore_coordination->acquireReplicatedAccessStorage(zookeeper_path);
return;
auto entities = restorer.getAccessEntitiesToRestore();
if (entities.empty())
return;
auto create_access = restorer.getRestoreSettings().create_access;
bool replace_if_exists = (create_access == RestoreAccessCreationMode::kReplace);
bool throw_if_exists = (create_access == RestoreAccessCreationMode::kCreate);
restorer.addDataRestoreTask([this, my_entities = std::move(entities), replace_if_exists, throw_if_exists]
{
for (const auto & [id, entity] : my_entities)
insert(id, entity, replace_if_exists, throw_if_exists);
});
} }
} }

View File

@ -26,6 +26,7 @@ public:
void shutdown() override; void shutdown() override;
const char * getStorageType() const override { return STORAGE_TYPE; } const char * getStorageType() const override { return STORAGE_TYPE; }
bool isReplicated() const override { return true; }
void startPeriodicReloading() override { startWatchingThread(); } void startPeriodicReloading() override { startWatchingThread(); }
void stopPeriodicReloading() override { stopWatchingThread(); } void stopPeriodicReloading() override { stopWatchingThread(); }
@ -35,7 +36,6 @@ public:
bool isBackupAllowed() const override { return backup_allowed; } bool isBackupAllowed() const override { return backup_allowed; }
void backup(BackupEntriesCollector & backup_entries_collector, const String & data_path_in_backup, AccessEntityType type) const override; void backup(BackupEntriesCollector & backup_entries_collector, const String & data_path_in_backup, AccessEntityType type) const override;
void restoreFromBackup(RestorerFromBackup & restorer) override;
private: private:
String zookeeper_path; String zookeeper_path;
@ -48,11 +48,11 @@ private:
std::unique_ptr<ThreadFromGlobalPool> watching_thread; std::unique_ptr<ThreadFromGlobalPool> watching_thread;
std::shared_ptr<ConcurrentBoundedQueue<UUID>> watched_queue; std::shared_ptr<ConcurrentBoundedQueue<UUID>> watched_queue;
bool insertImpl(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists) override; bool insertImpl(const UUID & id, const AccessEntityPtr & new_entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id) override;
bool removeImpl(const UUID & id, bool throw_if_not_exists) override; bool removeImpl(const UUID & id, bool throw_if_not_exists) override;
bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists) override; bool updateImpl(const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists) override;
bool insertZooKeeper(const zkutil::ZooKeeperPtr & zookeeper, const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists); bool insertZooKeeper(const zkutil::ZooKeeperPtr & zookeeper, const UUID & id, const AccessEntityPtr & entity, bool replace_if_exists, bool throw_if_exists, UUID * conflicting_id);
bool removeZooKeeper(const zkutil::ZooKeeperPtr & zookeeper, const UUID & id, bool throw_if_not_exists); bool removeZooKeeper(const zkutil::ZooKeeperPtr & zookeeper, const UUID & id, bool throw_if_not_exists);
bool updateZooKeeper(const zkutil::ZooKeeperPtr & zookeeper, const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists); bool updateZooKeeper(const zkutil::ZooKeeperPtr & zookeeper, const UUID & id, const UpdateFunc & update_func, bool throw_if_not_exists);
@ -80,6 +80,7 @@ private:
std::optional<UUID> findImpl(AccessEntityType type, const String & name) const override; std::optional<UUID> findImpl(AccessEntityType type, const String & name) const override;
std::vector<UUID> findAllImpl(AccessEntityType type) const override; std::vector<UUID> findAllImpl(AccessEntityType type) const override;
AccessEntityPtr readImpl(const UUID & id, bool throw_if_not_exists) const override; AccessEntityPtr readImpl(const UUID & id, bool throw_if_not_exists) const override;
bool acquireReplicatedRestore(RestorerFromBackup & restorer) const override;
mutable std::mutex mutex; mutable std::mutex mutex;
MemoryAccessStorage memory_storage TSA_GUARDED_BY(mutex); MemoryAccessStorage memory_storage TSA_GUARDED_BY(mutex);

View File

@ -21,7 +21,7 @@ std::vector<UUID> Role::findDependencies() const
return res; return res;
} }
void Role::replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) void Role::doReplaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids)
{ {
granted_roles.replaceDependencies(old_to_new_ids); granted_roles.replaceDependencies(old_to_new_ids);
settings.replaceDependencies(old_to_new_ids); settings.replaceDependencies(old_to_new_ids);

View File

@ -21,7 +21,7 @@ struct Role : public IAccessEntity
AccessEntityType getType() const override { return TYPE; } AccessEntityType getType() const override { return TYPE; }
std::vector<UUID> findDependencies() const override; std::vector<UUID> findDependencies() const override;
void replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) override; void doReplaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) override;
bool isBackupAllowed() const override { return settings.isBackupAllowed(); } bool isBackupAllowed() const override { return settings.isBackupAllowed(); }
}; };

View File

@ -63,7 +63,7 @@ std::vector<UUID> RowPolicy::findDependencies() const
return to_roles.findDependencies(); return to_roles.findDependencies();
} }
void RowPolicy::replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) void RowPolicy::doReplaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids)
{ {
to_roles.replaceDependencies(old_to_new_ids); to_roles.replaceDependencies(old_to_new_ids);
} }

View File

@ -50,7 +50,7 @@ struct RowPolicy : public IAccessEntity
AccessEntityType getType() const override { return TYPE; } AccessEntityType getType() const override { return TYPE; }
std::vector<UUID> findDependencies() const override; std::vector<UUID> findDependencies() const override;
void replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) override; void doReplaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) override;
bool isBackupAllowed() const override { return true; } bool isBackupAllowed() const override { return true; }
/// Which roles or users should use this row policy. /// Which roles or users should use this row policy.

View File

@ -21,7 +21,7 @@ std::vector<UUID> SettingsProfile::findDependencies() const
return res; return res;
} }
void SettingsProfile::replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) void SettingsProfile::doReplaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids)
{ {
elements.replaceDependencies(old_to_new_ids); elements.replaceDependencies(old_to_new_ids);
to_roles.replaceDependencies(old_to_new_ids); to_roles.replaceDependencies(old_to_new_ids);

View File

@ -22,7 +22,7 @@ struct SettingsProfile : public IAccessEntity
AccessEntityType getType() const override { return TYPE; } AccessEntityType getType() const override { return TYPE; }
std::vector<UUID> findDependencies() const override; std::vector<UUID> findDependencies() const override;
void replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) override; void doReplaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) override;
bool isBackupAllowed() const override { return elements.isBackupAllowed(); } bool isBackupAllowed() const override { return elements.isBackupAllowed(); }
}; };

View File

@ -16,7 +16,8 @@ bool User::equal(const IAccessEntity & other) const
if (!IAccessEntity::equal(other)) if (!IAccessEntity::equal(other))
return false; return false;
const auto & other_user = typeid_cast<const User &>(other); const auto & other_user = typeid_cast<const User &>(other);
return (auth_data == other_user.auth_data) && (allowed_client_hosts == other_user.allowed_client_hosts) return (authentication_methods == other_user.authentication_methods)
&& (allowed_client_hosts == other_user.allowed_client_hosts)
&& (access == other_user.access) && (granted_roles == other_user.granted_roles) && (default_roles == other_user.default_roles) && (access == other_user.access) && (granted_roles == other_user.granted_roles) && (default_roles == other_user.default_roles)
&& (settings == other_user.settings) && (grantees == other_user.grantees) && (default_database == other_user.default_database) && (settings == other_user.settings) && (grantees == other_user.grantees) && (default_database == other_user.default_database)
&& (valid_until == other_user.valid_until); && (valid_until == other_user.valid_until);
@ -48,7 +49,7 @@ std::vector<UUID> User::findDependencies() const
return res; return res;
} }
void User::replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) void User::doReplaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids)
{ {
default_roles.replaceDependencies(old_to_new_ids); default_roles.replaceDependencies(old_to_new_ids);
granted_roles.replaceDependencies(old_to_new_ids); granted_roles.replaceDependencies(old_to_new_ids);

View File

@ -15,7 +15,7 @@ namespace DB
*/ */
struct User : public IAccessEntity struct User : public IAccessEntity
{ {
AuthenticationData auth_data; std::vector<AuthenticationData> authentication_methods;
AllowedClientHosts allowed_client_hosts = AllowedClientHosts::AnyHostTag{}; AllowedClientHosts allowed_client_hosts = AllowedClientHosts::AnyHostTag{};
AccessRights access; AccessRights access;
GrantedRoles granted_roles; GrantedRoles granted_roles;
@ -32,7 +32,7 @@ struct User : public IAccessEntity
void setName(const String & name_) override; void setName(const String & name_) override;
std::vector<UUID> findDependencies() const override; std::vector<UUID> findDependencies() const override;
void replaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) override; void doReplaceDependencies(const std::unordered_map<UUID, UUID> & old_to_new_ids) override;
bool isBackupAllowed() const override { return settings.isBackupAllowed(); } bool isBackupAllowed() const override { return settings.isBackupAllowed(); }
}; };

View File

@ -155,18 +155,18 @@ namespace
if (has_password_plaintext) if (has_password_plaintext)
{ {
user->auth_data = AuthenticationData{AuthenticationType::PLAINTEXT_PASSWORD}; user->authentication_methods.emplace_back(AuthenticationType::PLAINTEXT_PASSWORD);
user->auth_data.setPassword(config.getString(user_config + ".password")); user->authentication_methods.back().setPassword(config.getString(user_config + ".password"));
} }
else if (has_password_sha256_hex) else if (has_password_sha256_hex)
{ {
user->auth_data = AuthenticationData{AuthenticationType::SHA256_PASSWORD}; user->authentication_methods.emplace_back(AuthenticationType::SHA256_PASSWORD);
user->auth_data.setPasswordHashHex(config.getString(user_config + ".password_sha256_hex")); user->authentication_methods.back().setPasswordHashHex(config.getString(user_config + ".password_sha256_hex"));
} }
else if (has_password_double_sha1_hex) else if (has_password_double_sha1_hex)
{ {
user->auth_data = AuthenticationData{AuthenticationType::DOUBLE_SHA1_PASSWORD}; user->authentication_methods.emplace_back(AuthenticationType::DOUBLE_SHA1_PASSWORD);
user->auth_data.setPasswordHashHex(config.getString(user_config + ".password_double_sha1_hex")); user->authentication_methods.back().setPasswordHashHex(config.getString(user_config + ".password_double_sha1_hex"));
} }
else if (has_ldap) else if (has_ldap)
{ {
@ -178,19 +178,19 @@ namespace
if (ldap_server_name.empty()) if (ldap_server_name.empty())
throw Exception(ErrorCodes::BAD_ARGUMENTS, "LDAP server name cannot be empty for user {}.", user_name); throw Exception(ErrorCodes::BAD_ARGUMENTS, "LDAP server name cannot be empty for user {}.", user_name);
user->auth_data = AuthenticationData{AuthenticationType::LDAP}; user->authentication_methods.emplace_back(AuthenticationType::LDAP);
user->auth_data.setLDAPServerName(ldap_server_name); user->authentication_methods.back().setLDAPServerName(ldap_server_name);
} }
else if (has_kerberos) else if (has_kerberos)
{ {
const auto realm = config.getString(user_config + ".kerberos.realm", ""); const auto realm = config.getString(user_config + ".kerberos.realm", "");
user->auth_data = AuthenticationData{AuthenticationType::KERBEROS}; user->authentication_methods.emplace_back(AuthenticationType::KERBEROS);
user->auth_data.setKerberosRealm(realm); user->authentication_methods.back().setKerberosRealm(realm);
} }
else if (has_certificates) else if (has_certificates)
{ {
user->auth_data = AuthenticationData{AuthenticationType::SSL_CERTIFICATE}; user->authentication_methods.emplace_back(AuthenticationType::SSL_CERTIFICATE);
/// Fill list of allowed certificates. /// Fill list of allowed certificates.
Poco::Util::AbstractConfiguration::Keys keys; Poco::Util::AbstractConfiguration::Keys keys;
@ -200,14 +200,14 @@ namespace
if (key.starts_with("common_name")) if (key.starts_with("common_name"))
{ {
String value = config.getString(certificates_config + "." + key); String value = config.getString(certificates_config + "." + key);
user->auth_data.addSSLCertificateSubject(SSLCertificateSubjects::Type::CN, std::move(value)); user->authentication_methods.back().addSSLCertificateSubject(SSLCertificateSubjects::Type::CN, std::move(value));
} }
else if (key.starts_with("subject_alt_name")) else if (key.starts_with("subject_alt_name"))
{ {
String value = config.getString(certificates_config + "." + key); String value = config.getString(certificates_config + "." + key);
if (value.empty()) if (value.empty())
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Expected ssl_certificates.subject_alt_name to not be empty"); throw Exception(ErrorCodes::BAD_ARGUMENTS, "Expected ssl_certificates.subject_alt_name to not be empty");
user->auth_data.addSSLCertificateSubject(SSLCertificateSubjects::Type::SAN, std::move(value)); user->authentication_methods.back().addSSLCertificateSubject(SSLCertificateSubjects::Type::SAN, std::move(value));
} }
else else
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown certificate pattern type: {}", key); throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown certificate pattern type: {}", key);
@ -216,7 +216,7 @@ namespace
else if (has_ssh_keys) else if (has_ssh_keys)
{ {
#if USE_SSH #if USE_SSH
user->auth_data = AuthenticationData{AuthenticationType::SSH_KEY}; user->authentication_methods.emplace_back(AuthenticationType::SSH_KEY);
Poco::Util::AbstractConfiguration::Keys entries; Poco::Util::AbstractConfiguration::Keys entries;
config.keys(ssh_keys_config, entries); config.keys(ssh_keys_config, entries);
@ -253,26 +253,33 @@ namespace
else else
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown ssh_key entry pattern type: {}", entry); throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown ssh_key entry pattern type: {}", entry);
} }
user->auth_data.setSSHKeys(std::move(keys)); user->authentication_methods.back().setSSHKeys(std::move(keys));
#else #else
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "SSH is disabled, because ClickHouse is built without libssh"); throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "SSH is disabled, because ClickHouse is built without libssh");
#endif #endif
} }
else if (has_http_auth) else if (has_http_auth)
{ {
user->auth_data = AuthenticationData{AuthenticationType::HTTP}; user->authentication_methods.emplace_back(AuthenticationType::HTTP);
user->auth_data.setHTTPAuthenticationServerName(config.getString(http_auth_config + ".server")); user->authentication_methods.back().setHTTPAuthenticationServerName(config.getString(http_auth_config + ".server"));
auto scheme = config.getString(http_auth_config + ".scheme"); auto scheme = config.getString(http_auth_config + ".scheme");
user->auth_data.setHTTPAuthenticationScheme(parseHTTPAuthenticationScheme(scheme)); user->authentication_methods.back().setHTTPAuthenticationScheme(parseHTTPAuthenticationScheme(scheme));
}
else
{
user->authentication_methods.emplace_back();
} }
auto auth_type = user->auth_data.getType(); for (const auto & authentication_method : user->authentication_methods)
if (((auth_type == AuthenticationType::NO_PASSWORD) && !allow_no_password) ||
((auth_type == AuthenticationType::PLAINTEXT_PASSWORD) && !allow_plaintext_password))
{ {
throw Exception(ErrorCodes::BAD_ARGUMENTS, auto auth_type = authentication_method.getType();
"Authentication type {} is not allowed, check the setting allow_{} in the server configuration", if (((auth_type == AuthenticationType::NO_PASSWORD) && !allow_no_password) ||
toString(auth_type), AuthenticationTypeInfo::get(auth_type).name); ((auth_type == AuthenticationType::PLAINTEXT_PASSWORD) && !allow_plaintext_password))
{
throw Exception(ErrorCodes::BAD_ARGUMENTS,
"Authentication type {} is not allowed, check the setting allow_{} in the server configuration",
toString(auth_type), AuthenticationTypeInfo::get(auth_type).name);
}
} }
const auto profile_name_config = user_config + ".profile"; const auto profile_name_config = user_config + ".profile";

View File

@ -116,15 +116,17 @@ class GroupConcatImpl final
SerializationPtr serialization; SerializationPtr serialization;
UInt64 limit; UInt64 limit;
const String delimiter; const String delimiter;
const DataTypePtr type;
public: public:
GroupConcatImpl(const DataTypePtr & data_type_, const Array & parameters_, UInt64 limit_, const String & delimiter_) GroupConcatImpl(const DataTypePtr & data_type_, const Array & parameters_, UInt64 limit_, const String & delimiter_)
: IAggregateFunctionDataHelper<GroupConcatData<has_limit>, GroupConcatImpl<has_limit>>( : IAggregateFunctionDataHelper<GroupConcatData<has_limit>, GroupConcatImpl<has_limit>>(
{data_type_}, parameters_, std::make_shared<DataTypeString>()) {data_type_}, parameters_, std::make_shared<DataTypeString>())
, serialization(this->argument_types[0]->getDefaultSerialization())
, limit(limit_) , limit(limit_)
, delimiter(delimiter_) , delimiter(delimiter_)
, type(data_type_)
{ {
serialization = isFixedString(type) ? std::make_shared<DataTypeString>()->getDefaultSerialization() : this->argument_types[0]->getDefaultSerialization();
} }
String getName() const override { return name; } String getName() const override { return name; }
@ -140,7 +142,14 @@ public:
if (cur_data.data_size != 0) if (cur_data.data_size != 0)
cur_data.insertChar(delimiter.c_str(), delimiter.size(), arena); cur_data.insertChar(delimiter.c_str(), delimiter.size(), arena);
cur_data.insert(columns[0], serialization, row_num, arena); if (isFixedString(type))
{
ColumnWithTypeAndName col = {columns[0]->getPtr(), type, "column"};
const auto & col_str = castColumn(col, std::make_shared<DataTypeString>());
cur_data.insert(col_str.get(), serialization, row_num, arena);
}
else
cur_data.insert(columns[0], serialization, row_num, arena);
} }
void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, Arena * arena) const override void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, Arena * arena) const override

View File

@ -3,370 +3,89 @@
#include <Parsers/FunctionSecretArgumentsFinder.h> #include <Parsers/FunctionSecretArgumentsFinder.h>
#include <Analyzer/ConstantNode.h> #include <Analyzer/ConstantNode.h>
#include <Analyzer/FunctionNode.h> #include <Analyzer/FunctionNode.h>
#include <Analyzer/IQueryTreeNode.h>
#include <Analyzer/IdentifierNode.h> #include <Analyzer/IdentifierNode.h>
#include <Analyzer/ListNode.h>
#include <Common/KnownObjectNames.h>
#include <Core/QualifiedTableName.h>
#include <boost/algorithm/string/predicate.hpp>
namespace DB namespace DB
{ {
class FunctionTreeNode : public AbstractFunction
{
public:
class ArgumentTreeNode : public Argument
{
public:
explicit ArgumentTreeNode(const IQueryTreeNode * argument_) : argument(argument_) {}
std::unique_ptr<AbstractFunction> getFunction() const override
{
if (const auto * f = argument->as<FunctionNode>())
return std::make_unique<FunctionTreeNode>(*f);
return nullptr;
}
bool isIdentifier() const override { return argument->as<IdentifierNode>(); }
bool tryGetString(String * res, bool allow_identifier) const override
{
if (const auto * literal = argument->as<ConstantNode>())
{
if (literal->getValue().getType() != Field::Types::String)
return false;
if (res)
*res = literal->getValue().safeGet<String>();
return true;
}
if (allow_identifier)
{
if (const auto * id = argument->as<IdentifierNode>())
{
if (res)
*res = id->getIdentifier().getFullName();
return true;
}
}
return false;
}
private:
const IQueryTreeNode * argument = nullptr;
};
class ArgumentsTreeNode : public Arguments
{
public:
explicit ArgumentsTreeNode(const QueryTreeNodes * arguments_) : arguments(arguments_) {}
size_t size() const override { return arguments ? arguments->size() : 0; }
std::unique_ptr<Argument> at(size_t n) const override { return std::make_unique<ArgumentTreeNode>(arguments->at(n).get()); }
private:
const QueryTreeNodes * arguments = nullptr;
};
explicit FunctionTreeNode(const FunctionNode & function_) : function(&function_)
{
if (const auto & nodes = function->getArguments().getNodes(); !nodes.empty())
arguments = std::make_unique<ArgumentsTreeNode>(&nodes);
}
String name() const override { return function->getFunctionName(); }
private:
const FunctionNode * function = nullptr;
};
/// Finds arguments of a specified function which should not be displayed for most users for security reasons. /// Finds arguments of a specified function which should not be displayed for most users for security reasons.
/// That involves passwords and secret keys. /// That involves passwords and secret keys.
class FunctionSecretArgumentsFinderTreeNode class FunctionSecretArgumentsFinderTreeNode : public FunctionSecretArgumentsFinder
{ {
public: public:
explicit FunctionSecretArgumentsFinderTreeNode(const FunctionNode & function_) : function(function_), arguments(function.getArguments()) explicit FunctionSecretArgumentsFinderTreeNode(const FunctionNode & function_)
: FunctionSecretArgumentsFinder(std::make_unique<FunctionTreeNode>(function_))
{ {
if (arguments.getNodes().empty()) if (!function->hasArguments())
return; return;
findFunctionSecretArguments(); findOrdinaryFunctionSecretArguments();
} }
struct Result
{
/// Result constructed by default means no arguments will be hidden.
size_t start = static_cast<size_t>(-1);
size_t count = 0; /// Mostly it's either 0 or 1. There are only a few cases where `count` can be greater than 1 (e.g. see `encrypt`).
/// In all known cases secret arguments are consecutive
bool are_named = false; /// Arguments like `password = 'password'` are considered as named arguments.
/// E.g. "headers" in `url('..', headers('foo' = '[HIDDEN]'))`
std::vector<std::string> nested_maps;
bool hasSecrets() const
{
return count != 0 || !nested_maps.empty();
}
};
FunctionSecretArgumentsFinder::Result getResult() const { return result; } FunctionSecretArgumentsFinder::Result getResult() const { return result; }
private:
const FunctionNode & function;
const ListNode & arguments;
FunctionSecretArgumentsFinder::Result result;
void markSecretArgument(size_t index, bool argument_is_named = false)
{
if (index >= arguments.getNodes().size())
return;
if (!result.count)
{
result.start = index;
result.are_named = argument_is_named;
}
chassert(index >= result.start); /// We always check arguments consecutively
result.count = index + 1 - result.start;
if (!argument_is_named)
result.are_named = false;
}
void findFunctionSecretArguments()
{
const auto & name = function.getFunctionName();
if ((name == "mysql") || (name == "postgresql") || (name == "mongodb"))
{
/// mysql('host:port', 'database', 'table', 'user', 'password', ...)
/// postgresql('host:port', 'database', 'table', 'user', 'password', ...)
/// mongodb('host:port', 'database', 'collection', 'user', 'password', ...)
findMySQLFunctionSecretArguments();
}
else if ((name == "s3") || (name == "cosn") || (name == "oss") ||
(name == "deltaLake") || (name == "hudi") || (name == "iceberg"))
{
/// s3('url', 'aws_access_key_id', 'aws_secret_access_key', ...)
findS3FunctionSecretArguments(/* is_cluster_function= */ false);
}
else if (name == "s3Cluster")
{
/// s3Cluster('cluster_name', 'url', 'aws_access_key_id', 'aws_secret_access_key', ...)
findS3FunctionSecretArguments(/* is_cluster_function= */ true);
}
else if ((name == "remote") || (name == "remoteSecure"))
{
/// remote('addresses_expr', 'db', 'table', 'user', 'password', ...)
findRemoteFunctionSecretArguments();
}
else if ((name == "encrypt") || (name == "decrypt") ||
(name == "aes_encrypt_mysql") || (name == "aes_decrypt_mysql") ||
(name == "tryDecrypt"))
{
/// encrypt('mode', 'plaintext', 'key' [, iv, aad])
findEncryptionFunctionSecretArguments();
}
else if (name == "url")
{
findURLSecretArguments();
}
}
void findMySQLFunctionSecretArguments()
{
if (isNamedCollectionName(0))
{
/// mysql(named_collection, ..., password = 'password', ...)
findSecretNamedArgument("password", 1);
}
else
{
/// mysql('host:port', 'database', 'table', 'user', 'password', ...)
markSecretArgument(4);
}
}
/// Returns the number of arguments excluding "headers" and "extra_credentials" (which should
/// always be at the end). Marks "headers" as secret, if found.
size_t excludeS3OrURLNestedMaps()
{
const auto & nodes = arguments.getNodes();
size_t count = nodes.size();
while (count > 0)
{
const FunctionNode * f = nodes.at(count - 1)->as<FunctionNode>();
if (!f)
break;
if (f->getFunctionName() == "headers")
result.nested_maps.push_back(f->getFunctionName());
else if (f->getFunctionName() != "extra_credentials")
break;
count -= 1;
}
return count;
}
void findS3FunctionSecretArguments(bool is_cluster_function)
{
/// s3Cluster('cluster_name', 'url', ...) has 'url' as its second argument.
size_t url_arg_idx = is_cluster_function ? 1 : 0;
if (!is_cluster_function && isNamedCollectionName(0))
{
/// s3(named_collection, ..., secret_access_key = 'secret_access_key', ...)
findSecretNamedArgument("secret_access_key", 1);
return;
}
/// We should check other arguments first because we don't need to do any replacement in case of
/// s3('url', NOSIGN, 'format' [, 'compression'] [, extra_credentials(..)] [, headers(..)])
/// s3('url', 'format', 'structure' [, 'compression'] [, extra_credentials(..)] [, headers(..)])
size_t count = excludeS3OrURLNestedMaps();
if ((url_arg_idx + 3 <= count) && (count <= url_arg_idx + 4))
{
String second_arg;
if (tryGetStringFromArgument(url_arg_idx + 1, &second_arg))
{
if (boost::iequals(second_arg, "NOSIGN"))
return; /// The argument after 'url' is "NOSIGN".
if (second_arg == "auto" || KnownFormatNames::instance().exists(second_arg))
return; /// The argument after 'url' is a format: s3('url', 'format', ...)
}
}
/// We're going to replace 'aws_secret_access_key' with '[HIDDEN]' for the following signatures:
/// s3('url', 'aws_access_key_id', 'aws_secret_access_key', ...)
/// s3Cluster('cluster_name', 'url', 'aws_access_key_id', 'aws_secret_access_key', 'format', 'compression')
if (url_arg_idx + 2 < count)
markSecretArgument(url_arg_idx + 2);
}
void findURLSecretArguments()
{
if (!isNamedCollectionName(0))
excludeS3OrURLNestedMaps();
}
bool tryGetStringFromArgument(size_t arg_idx, String * res, bool allow_identifier = true) const
{
if (arg_idx >= arguments.getNodes().size())
return false;
return tryGetStringFromArgument(arguments.getNodes()[arg_idx], res, allow_identifier);
}
static bool tryGetStringFromArgument(const QueryTreeNodePtr argument, String * res, bool allow_identifier = true)
{
if (const auto * literal = argument->as<ConstantNode>())
{
if (literal->getValue().getType() != Field::Types::String)
return false;
if (res)
*res = literal->getValue().safeGet<String>();
return true;
}
if (allow_identifier)
{
if (const auto * id = argument->as<IdentifierNode>())
{
if (res)
*res = id->getIdentifier().getFullName();
return true;
}
}
return false;
}
void findRemoteFunctionSecretArguments()
{
if (isNamedCollectionName(0))
{
/// remote(named_collection, ..., password = 'password', ...)
findSecretNamedArgument("password", 1);
return;
}
/// We're going to replace 'password' with '[HIDDEN'] for the following signatures:
/// remote('addresses_expr', db.table, 'user' [, 'password'] [, sharding_key])
/// remote('addresses_expr', 'db', 'table', 'user' [, 'password'] [, sharding_key])
/// remote('addresses_expr', table_function(), 'user' [, 'password'] [, sharding_key])
/// But we should check the number of arguments first because we don't need to do any replacements in case of
/// remote('addresses_expr', db.table)
if (arguments.getNodes().size() < 3)
return;
size_t arg_num = 1;
/// Skip 1 or 2 arguments with table_function() or db.table or 'db', 'table'.
const auto * table_function = arguments.getNodes()[arg_num]->as<FunctionNode>();
if (table_function && KnownTableFunctionNames::instance().exists(table_function->getFunctionName()))
{
++arg_num;
}
else
{
std::optional<String> database;
std::optional<QualifiedTableName> qualified_table_name;
if (!tryGetDatabaseNameOrQualifiedTableName(arg_num, database, qualified_table_name))
{
/// We couldn't evaluate the argument so we don't know whether it is 'db.table' or just 'db'.
/// Hence we can't figure out whether we should skip one argument 'user' or two arguments 'table', 'user'
/// before the argument 'password'. So it's safer to wipe two arguments just in case.
/// The last argument can be also a `sharding_key`, so we need to check that argument is a literal string
/// before wiping it (because the `password` argument is always a literal string).
if (tryGetStringFromArgument(arg_num + 2, nullptr, /* allow_identifier= */ false))
{
/// Wipe either `password` or `user`.
markSecretArgument(arg_num + 2);
}
if (tryGetStringFromArgument(arg_num + 3, nullptr, /* allow_identifier= */ false))
{
/// Wipe either `password` or `sharding_key`.
markSecretArgument(arg_num + 3);
}
return;
}
/// Skip the current argument (which is either a database name or a qualified table name).
++arg_num;
if (database)
{
/// Skip the 'table' argument if the previous argument was a database name.
++arg_num;
}
}
/// Skip username.
++arg_num;
/// Do our replacement:
/// remote('addresses_expr', db.table, 'user', 'password', ...) -> remote('addresses_expr', db.table, 'user', '[HIDDEN]', ...)
/// The last argument can be also a `sharding_key`, so we need to check that argument is a literal string
/// before wiping it (because the `password` argument is always a literal string).
bool can_be_password = tryGetStringFromArgument(arg_num, nullptr, /* allow_identifier= */ false);
if (can_be_password)
markSecretArgument(arg_num);
}
/// Tries to get either a database name or a qualified table name from an argument.
/// Empty string is also allowed (it means the default database).
/// The function is used by findRemoteFunctionSecretArguments() to determine how many arguments to skip before a password.
bool tryGetDatabaseNameOrQualifiedTableName(
size_t arg_idx,
std::optional<String> & res_database,
std::optional<QualifiedTableName> & res_qualified_table_name) const
{
res_database.reset();
res_qualified_table_name.reset();
String str;
if (!tryGetStringFromArgument(arg_idx, &str, /* allow_identifier= */ true))
return false;
if (str.empty())
{
res_database = "";
return true;
}
auto qualified_table_name = QualifiedTableName::tryParseFromString(str);
if (!qualified_table_name)
return false;
if (qualified_table_name->database.empty())
res_database = std::move(qualified_table_name->table);
else
res_qualified_table_name = std::move(qualified_table_name);
return true;
}
void findEncryptionFunctionSecretArguments()
{
if (arguments.getNodes().empty())
return;
/// We replace all arguments after 'mode' with '[HIDDEN]':
/// encrypt('mode', 'plaintext', 'key' [, iv, aad]) -> encrypt('mode', '[HIDDEN]')
result.start = 1;
result.count = arguments.getNodes().size() - 1;
}
/// Whether a specified argument can be the name of a named collection?
bool isNamedCollectionName(size_t arg_idx) const
{
if (arguments.getNodes().size() <= arg_idx)
return false;
const auto * identifier = arguments.getNodes()[arg_idx]->as<IdentifierNode>();
return identifier != nullptr;
}
/// Looks for a secret argument with a specified name. This function looks for arguments in format `key=value` where the key is specified.
void findSecretNamedArgument(const std::string_view & key, size_t start = 0)
{
for (size_t i = start; i < arguments.getNodes().size(); ++i)
{
const auto & argument = arguments.getNodes()[i];
const auto * equals_func = argument->as<FunctionNode>();
if (!equals_func || (equals_func->getFunctionName() != "equals"))
continue;
const auto * expr_list = equals_func->getArguments().as<ListNode>();
if (!expr_list)
continue;
const auto & equal_args = expr_list->getNodes();
if (equal_args.size() != 2)
continue;
String found_key;
if (!tryGetStringFromArgument(equal_args[0], &found_key))
continue;
if (found_key == key)
markSecretArgument(i, /* argument_is_named= */ true);
}
}
}; };
} }

View File

@ -2564,8 +2564,8 @@ void checkFunctionNodeHasEmptyNullsAction(FunctionNode const & node)
if (node.getNullsAction() != NullsAction::EMPTY) if (node.getNullsAction() != NullsAction::EMPTY)
throw Exception( throw Exception(
ErrorCodes::SYNTAX_ERROR, ErrorCodes::SYNTAX_ERROR,
"Function with name '{}' cannot use {} NULLS", "Function with name {} cannot use {} NULLS",
node.getFunctionName(), backQuote(node.getFunctionName()),
node.getNullsAction() == NullsAction::IGNORE_NULLS ? "IGNORE" : "RESPECT"); node.getNullsAction() == NullsAction::IGNORE_NULLS ? "IGNORE" : "RESPECT");
} }
} }
@ -3228,16 +3228,16 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi
auto hints = NamePrompter<2>::getHints(function_name, possible_function_names); auto hints = NamePrompter<2>::getHints(function_name, possible_function_names);
throw Exception(ErrorCodes::UNKNOWN_FUNCTION, throw Exception(ErrorCodes::UNKNOWN_FUNCTION,
"Function with name '{}' does not exist. In scope {}{}", "Function with name {} does not exist. In scope {}{}",
function_name, backQuote(function_name),
scope.scope_node->formatASTForErrorMessage(), scope.scope_node->formatASTForErrorMessage(),
getHintsErrorMessageSuffix(hints)); getHintsErrorMessageSuffix(hints));
} }
if (!function_lambda_arguments_indexes.empty()) if (!function_lambda_arguments_indexes.empty())
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, throw Exception(ErrorCodes::UNSUPPORTED_METHOD,
"Aggregate function '{}' does not support lambda arguments", "Aggregate function {} does not support lambda arguments",
function_name); backQuote(function_name));
auto action = function_node_ptr->getNullsAction(); auto action = function_node_ptr->getNullsAction();
std::string aggregate_function_name = rewriteAggregateFunctionNameIfNeeded(function_name, action, scope.context); std::string aggregate_function_name = rewriteAggregateFunctionNameIfNeeded(function_name, action, scope.context);
@ -3679,10 +3679,10 @@ ProjectionNames QueryAnalyzer::resolveExpressionNode(
auto hints = IdentifierResolver::collectIdentifierTypoHints(unresolved_identifier, valid_identifiers); auto hints = IdentifierResolver::collectIdentifierTypoHints(unresolved_identifier, valid_identifiers);
throw Exception(ErrorCodes::UNKNOWN_IDENTIFIER, "Unknown {}{} identifier '{}' in scope {}{}", throw Exception(ErrorCodes::UNKNOWN_IDENTIFIER, "Unknown {}{} identifier {} in scope {}{}",
toStringLowercase(IdentifierLookupContext::EXPRESSION), toStringLowercase(IdentifierLookupContext::EXPRESSION),
message_clarification, message_clarification,
unresolved_identifier.getFullName(), backQuote(unresolved_identifier.getFullName()),
scope.scope_node->formatASTForErrorMessage(), scope.scope_node->formatASTForErrorMessage(),
getHintsErrorMessageSuffix(hints)); getHintsErrorMessageSuffix(hints));
} }

View File

@ -913,11 +913,15 @@ void RestorerFromBackup::createTable(const QualifiedTableName & table_name)
table_info.database = DatabaseCatalog::instance().getDatabase(table_name.database); table_info.database = DatabaseCatalog::instance().getDatabase(table_name.database);
DatabasePtr database = table_info.database; DatabasePtr database = table_info.database;
auto query_context = Context::createCopy(context);
query_context->setSetting("database_replicated_allow_explicit_uuid", 3);
query_context->setSetting("database_replicated_allow_replicated_engine_arguments", 3);
/// Execute CREATE TABLE query (we call IDatabase::createTableRestoredFromBackup() to allow the database to do some /// Execute CREATE TABLE query (we call IDatabase::createTableRestoredFromBackup() to allow the database to do some
/// database-specific things). /// database-specific things).
database->createTableRestoredFromBackup( database->createTableRestoredFromBackup(
create_table_query, create_table_query,
context, query_context,
restore_coordination, restore_coordination,
std::chrono::duration_cast<std::chrono::milliseconds>(create_table_timeout).count()); std::chrono::duration_cast<std::chrono::milliseconds>(create_table_timeout).count());
} }

View File

@ -176,7 +176,7 @@ add_library (clickhouse_new_delete STATIC Common/new_delete.cpp)
target_link_libraries (clickhouse_new_delete PRIVATE clickhouse_common_io) target_link_libraries (clickhouse_new_delete PRIVATE clickhouse_common_io)
if (TARGET ch_contrib::jemalloc) if (TARGET ch_contrib::jemalloc)
target_link_libraries (clickhouse_new_delete PRIVATE ch_contrib::jemalloc) target_link_libraries (clickhouse_new_delete PRIVATE ch_contrib::jemalloc)
target_link_libraries (clickhouse_common_io PRIVATE ch_contrib::jemalloc) target_link_libraries (clickhouse_common_io PUBLIC ch_contrib::jemalloc)
target_link_libraries (clickhouse_storages_system PRIVATE ch_contrib::jemalloc) target_link_libraries (clickhouse_storages_system PRIVATE ch_contrib::jemalloc)
endif() endif()

View File

@ -1875,11 +1875,11 @@ void ClientBase::processParsedSingleQuery(const String & full_query, const Strin
if (const auto * create_user_query = parsed_query->as<ASTCreateUserQuery>()) if (const auto * create_user_query = parsed_query->as<ASTCreateUserQuery>())
{ {
if (!create_user_query->attach && create_user_query->auth_data) if (!create_user_query->attach && !create_user_query->authentication_methods.empty())
{ {
if (const auto * auth_data = create_user_query->auth_data->as<ASTAuthenticationData>()) for (const auto & authentication_method : create_user_query->authentication_methods)
{ {
auto password = auth_data->getPassword(); auto password = authentication_method->getPassword();
if (password) if (password)
client_context->getAccessControl().checkPasswordComplexityRules(*password); client_context->getAccessControl().checkPasswordComplexityRules(*password);

View File

@ -455,6 +455,9 @@ void Connection::sendAddendum()
writeStringBinary(proto_recv_chunked, *out); writeStringBinary(proto_recv_chunked, *out);
} }
if (server_revision >= DBMS_MIN_REVISION_WITH_VERSIONED_PARALLEL_REPLICAS_PROTOCOL)
writeVarUInt(DBMS_PARALLEL_REPLICAS_PROTOCOL_VERSION, *out);
out->next(); out->next();
} }
@ -525,6 +528,8 @@ void Connection::receiveHello(const Poco::Timespan & handshake_timeout)
readVarUInt(server_version_major, *in); readVarUInt(server_version_major, *in);
readVarUInt(server_version_minor, *in); readVarUInt(server_version_minor, *in);
readVarUInt(server_revision, *in); readVarUInt(server_revision, *in);
if (server_revision >= DBMS_MIN_REVISION_WITH_VERSIONED_PARALLEL_REPLICAS_PROTOCOL)
readVarUInt(server_parallel_replicas_protocol_version, *in);
if (server_revision >= DBMS_MIN_REVISION_WITH_SERVER_TIMEZONE) if (server_revision >= DBMS_MIN_REVISION_WITH_SERVER_TIMEZONE)
readStringBinary(server_timezone, *in); readStringBinary(server_timezone, *in);
if (server_revision >= DBMS_MIN_REVISION_WITH_SERVER_DISPLAY_NAME) if (server_revision >= DBMS_MIN_REVISION_WITH_SERVER_DISPLAY_NAME)
@ -959,7 +964,7 @@ void Connection::sendReadTaskResponse(const String & response)
void Connection::sendMergeTreeReadTaskResponse(const ParallelReadResponse & response) void Connection::sendMergeTreeReadTaskResponse(const ParallelReadResponse & response)
{ {
writeVarUInt(Protocol::Client::MergeTreeReadTaskResponse, *out); writeVarUInt(Protocol::Client::MergeTreeReadTaskResponse, *out);
response.serialize(*out); response.serialize(*out, server_parallel_replicas_protocol_version);
out->finishChunk(); out->finishChunk();
out->next(); out->next();
} }
@ -1413,7 +1418,7 @@ ParallelReadRequest Connection::receiveParallelReadRequest() const
InitialAllRangesAnnouncement Connection::receiveInitialParallelReadAnnouncement() const InitialAllRangesAnnouncement Connection::receiveInitialParallelReadAnnouncement() const
{ {
return InitialAllRangesAnnouncement::deserialize(*in); return InitialAllRangesAnnouncement::deserialize(*in, server_parallel_replicas_protocol_version);
} }

View File

@ -210,6 +210,7 @@ private:
UInt64 server_version_minor = 0; UInt64 server_version_minor = 0;
UInt64 server_version_patch = 0; UInt64 server_version_patch = 0;
UInt64 server_revision = 0; UInt64 server_revision = 0;
UInt64 server_parallel_replicas_protocol_version = 0;
String server_timezone; String server_timezone;
String server_display_name; String server_display_name;

View File

@ -168,7 +168,7 @@ std::vector<ConnectionPoolWithFailover::TryResult> ConnectionPoolWithFailover::g
{ return tryGetEntry(pool, timeouts, fail_message, settings, &table_to_check, /*async_callback=*/ {}); }; { return tryGetEntry(pool, timeouts, fail_message, settings, &table_to_check, /*async_callback=*/ {}); };
return getManyImpl(settings, pool_mode, try_get_entry, return getManyImpl(settings, pool_mode, try_get_entry,
/*skip_unavailable_endpoints=*/ std::nullopt, /*skip_unavailable_endpoints=*/ false, /// skip_unavailable_endpoints is used to get the min number of entries, and we need at least one
/*priority_func=*/ {}, /*priority_func=*/ {},
settings.distributed_insert_skip_read_only_replicas); settings.distributed_insert_skip_read_only_replicas);
} }

Some files were not shown because too many files have changed in this diff Show More