diff --git a/.gitmodules b/.gitmodules
index 73baf268fde7..7b2e9ccc4868 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -202,7 +202,7 @@
url = https://github.com/ClickHouse/azure-sdk-for-cpp
[submodule "contrib/minizip-ng"]
path = contrib/minizip-ng
- url = https://github.com/zlib-ng/minizip-ng
+ url = https://github.com/ClickHouse/minizip-ng
[submodule "contrib/wyhash"]
path = contrib/wyhash
url = https://github.com/wangyi-fudan/wyhash
diff --git a/base/glibc-compatibility/glibc-compatibility.c b/base/glibc-compatibility/glibc-compatibility.c
index 738cda47877a..b2e741ddac89 100644
--- a/base/glibc-compatibility/glibc-compatibility.c
+++ b/base/glibc-compatibility/glibc-compatibility.c
@@ -427,6 +427,14 @@ int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *fa) {
return 0;
}
+/// gettid was added in glibc 2.30. Use the raw syscall for compatibility with older systems.
+/// Rust's standard library (since ~nightly-2026) references gettid as a weak symbol;
+/// providing it here prevents pulling in GLIBC_2.30.
+pid_t gettid(void)
+{
+ return syscall(__NR_gettid);
+}
+
#if defined (__cplusplus)
}
#endif
diff --git a/ci/docker/binary-builder/Dockerfile b/ci/docker/binary-builder/Dockerfile
index 115a4bd58475..402674446465 100644
--- a/ci/docker/binary-builder/Dockerfile
+++ b/ci/docker/binary-builder/Dockerfile
@@ -19,10 +19,6 @@ COPY --from=altinityinfra/cctools:c0aae9395f33405b6e2b \
/etc/ssl/
RUN apt-get update \
- && apt-get install software-properties-common --yes --no-install-recommends --verbose-versions
-
-RUN add-apt-repository ppa:ubuntu-toolchain-r/test --yes \
- && apt-get update \
&& apt-get remove --yes clang-tools-${LLVM_VERSION} || true \
&& apt-get install --yes \
clang-tools-${LLVM_VERSION} \
diff --git a/ci/docker/fasttest/Dockerfile b/ci/docker/fasttest/Dockerfile
index 48412b092395..01f555340ccc 100644
--- a/ci/docker/fasttest/Dockerfile
+++ b/ci/docker/fasttest/Dockerfile
@@ -95,8 +95,8 @@ RUN ARCH=$(uname -m) && \
./rustup-init -y && \
rm rustup-init && \
chmod 777 -R /rust && \
- rustup toolchain install nightly-2025-07-07 --no-self-update && \
- rustup default nightly-2025-07-07 && \
+ rustup toolchain install nightly-2026-11-02 --no-self-update && \
+ rustup default nightly-2026-11-02 && \
rustup toolchain remove stable && \
rustup component add rust-src && \
rustup target add x86_64-unknown-linux-gnu && \
diff --git a/ci/tests/data/integration_test_durations_sample.tsv b/ci/tests/data/integration_test_durations_sample.tsv
index 55fbf44d0ff0..6d85307a7032 100644
--- a/ci/tests/data/integration_test_durations_sample.tsv
+++ b/ci/tests/data/integration_test_durations_sample.tsv
@@ -317,7 +317,6 @@ test_keeper_opentelemetry_tracing/test.py 82072
test_refreshable_mv_watch_fault/test.py 81637
test_always_fetch_merged/test.py 80848
test_system_flush_logs/test.py 80564
-test_store_cleanup/test.py 80458
test_rmv_access_denied_on_rename_race/test.py 80328
test_replicated_merge_tree_compatibility/test.py 79758
test_clickhouse_server_wait_server_pool/test.py 79623
diff --git a/cmake/autogenerated_versions.txt b/cmake/autogenerated_versions.txt
index c4d4b0750969..e365e9f08c8f 100644
--- a/cmake/autogenerated_versions.txt
+++ b/cmake/autogenerated_versions.txt
@@ -2,13 +2,13 @@
# NOTE: VERSION_REVISION has nothing common with DBMS_TCP_PROTOCOL_VERSION,
# only DBMS_TCP_PROTOCOL_VERSION should be incremented on protocol changes.
-SET(VERSION_REVISION 54571)
+SET(VERSION_REVISION 54584)
SET(VERSION_MAJOR 26)
SET(VERSION_MINOR 3)
-SET(VERSION_PATCH 64)
-SET(VERSION_GITHASH f4eb235f16580439cd374038ecd8c013a0011cd9)
-SET(VERSION_DESCRIBE v26.3.64.20002.altinityantalya)
-SET(VERSION_STRING 26.3.64.20002.altinityantalya)
+SET(VERSION_PATCH 77)
+SET(VERSION_GITHASH 510026b533dac3dda78e8c67076b01ff496b0c72)
+SET(VERSION_DESCRIBE v26.3.77.20002.altinityantalya)
+SET(VERSION_STRING 26.3.77.20002.altinityantalya)
# end of autochange
SET(VERSION_TWEAK 20002)
diff --git a/cmake/cpu_features.cmake b/cmake/cpu_features.cmake
index 1b73c7319338..9d741a1be3cc 100644
--- a/cmake/cpu_features.cmake
+++ b/cmake/cpu_features.cmake
@@ -18,7 +18,7 @@ if (ARCH_AARCH64)
# crc32 is optional in v8.0 and mandatory in v8.1. Enable it as __crc32()* is used in lot's of places and even very old ARM CPUs
# support it.
set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=armv8+crc")
- list(APPEND RUSTFLAGS_CPU "-C" "target_feature=+crc,-neon")
+ list(APPEND RUSTFLAGS_CPU "-C" "target_feature=+crc")
else ()
# ARMv8.2 is quite ancient but the lowest common denominator supported by both Graviton 2 and 3 processors [1, 10]. In particular, it
# includes LSE (made mandatory with ARMv8.1) which provides nice speedups without having to fall back to compat flag
diff --git a/contrib/chdig b/contrib/chdig
index cbe8b89dacab..af4005a0dba2 160000
--- a/contrib/chdig
+++ b/contrib/chdig
@@ -1 +1 @@
-Subproject commit cbe8b89dacab6760732db09fadb8940f1faf1c3c
+Subproject commit af4005a0dba22924bb295c0986d481f037e0d802
diff --git a/contrib/chdig-cmake/CMakeLists.txt b/contrib/chdig-cmake/CMakeLists.txt
index 45272022cfe8..d5d45c612ab2 100644
--- a/contrib/chdig-cmake/CMakeLists.txt
+++ b/contrib/chdig-cmake/CMakeLists.txt
@@ -17,10 +17,10 @@ if (NOT ENABLE_CHDIG OR NOT ENABLE_RUST)
return()
endif()
-clickhouse_import_crate(MANIFEST_PATH ../chdig/Cargo.toml)
-clickhouse_config_crate_flags(chdig)
-add_library(ch_rust::chdig ALIAS chdig)
+clickhouse_import_crate(MANIFEST_PATH Cargo.toml)
+clickhouse_config_crate_flags(_ch_rust_chdig)
+add_library(ch_rust::chdig ALIAS _ch_rust_chdig)
if (OS_DARWIN)
- target_link_libraries(chdig INTERFACE "-framework AppKit")
+ target_link_libraries(_ch_rust_chdig INTERFACE "-framework AppKit")
endif()
diff --git a/contrib/chdig-cmake/Cargo.lock b/contrib/chdig-cmake/Cargo.lock
new file mode 100644
index 000000000000..26ec2ffdc050
--- /dev/null
+++ b/contrib/chdig-cmake/Cargo.lock
@@ -0,0 +1,2658 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "_ch_rust_chdig"
+version = "0.1.0"
+dependencies = [
+ "chdig",
+]
+
+[[package]]
+name = "adler2"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
+
+[[package]]
+name = "aead"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
+dependencies = [
+ "crypto-common",
+ "generic-array",
+]
+
+[[package]]
+name = "aes"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures",
+]
+
+[[package]]
+name = "aes-gcm"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
+dependencies = [
+ "aead",
+ "aes",
+ "cipher",
+ "ctr",
+ "ghash",
+ "subtle",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "allocator-api2"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anstream"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
+
+[[package]]
+name = "anstyle-parse"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
+dependencies = [
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
+dependencies = [
+ "anstyle",
+ "once_cell_polyfill",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
+
+[[package]]
+name = "approx"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "ascii"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16"
+
+[[package]]
+name = "autocfg"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[package]]
+name = "bitflags"
+version = "2.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
+
+[[package]]
+name = "bumpalo"
+version = "3.20.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db"
+
+[[package]]
+name = "by_address"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "bytes"
+version = "1.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
+
+[[package]]
+name = "castaway"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a"
+dependencies = [
+ "rustversion",
+]
+
+[[package]]
+name = "cc"
+version = "1.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ef9e3e8154a45c7a95cff4c1299702106ad94062d7bb85fdc5d3a5afd91d45"
+dependencies = [
+ "find-msvc-tools",
+ "shlex",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
+
+[[package]]
+name = "chdig"
+version = "26.11.1"
+dependencies = [
+ "aes-gcm",
+ "anyhow",
+ "base64",
+ "chrono",
+ "chrono-tz",
+ "clap",
+ "clap_complete",
+ "clickhouse-rs",
+ "crossbeam-channel",
+ "crossterm",
+ "flamelens",
+ "flate2",
+ "flexi_logger",
+ "futures",
+ "futures-util",
+ "fuzzy-matcher",
+ "getrandom 0.2.17",
+ "humantime",
+ "libc",
+ "log",
+ "percent-encoding",
+ "perfetto_protos",
+ "protobuf",
+ "quick-xml",
+ "ratatui",
+ "regex",
+ "semver",
+ "serde",
+ "serde_json",
+ "serde_norway",
+ "signal-hook",
+ "size",
+ "strfmt",
+ "tempfile",
+ "tiny_http",
+ "tokio",
+ "unicode-width",
+ "url",
+ "uuid",
+]
+
+[[package]]
+name = "chrono"
+version = "0.4.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
+dependencies = [
+ "iana-time-zone",
+ "num-traits",
+ "windows-link",
+]
+
+[[package]]
+name = "chrono-tz"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e"
+dependencies = [
+ "chrono",
+ "chrono-tz-build",
+ "phf",
+]
+
+[[package]]
+name = "chrono-tz-build"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f"
+dependencies = [
+ "parse-zoneinfo",
+ "phf",
+ "phf_codegen",
+]
+
+[[package]]
+name = "chunked_transfer"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901"
+
+[[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+]
+
+[[package]]
+name = "clap"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_complete"
+version = "4.6.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "037e2a1a92236d0aff7e845093f64661d6df4c02c9fcc61a60e9e1d736fa392f"
+dependencies = [
+ "clap",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "clap_lex"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
+
+[[package]]
+name = "clickhouse-rs"
+version = "1.1.0-alpha.1"
+source = "git+https://github.com/azat-rust/clickhouse-rs?branch=next#50f683f0ae358d784c34eb0545c056fa3939c502"
+dependencies = [
+ "byteorder",
+ "cfg-if",
+ "chrono",
+ "chrono-tz",
+ "clickhouse-rs-cityhash-sys",
+ "combine",
+ "crossbeam-queue",
+ "either",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "hostname",
+ "lazy_static",
+ "log",
+ "lz4",
+ "percent-encoding",
+ "pin-project",
+ "rustls",
+ "thiserror 2.0.21",
+ "tokio",
+ "tokio-rustls",
+ "url",
+ "uuid",
+ "webpki-roots",
+]
+
+[[package]]
+name = "clickhouse-rs-cityhash-sys"
+version = "0.1.2"
+source = "git+https://github.com/azat-rust/clickhouse-rs?branch=next#50f683f0ae358d784c34eb0545c056fa3939c502"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "colorchoice"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
+
+[[package]]
+name = "combine"
+version = "4.6.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92"
+dependencies = [
+ "bytes",
+ "memchr",
+]
+
+[[package]]
+name = "compact_str"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9dfdd1c2274d9aa354115b09dc9a901d6c5576818cdf70d14cae2bdb47df00ab"
+dependencies = [
+ "castaway",
+ "cfg-if",
+ "itoa",
+ "rustversion",
+ "ryu",
+ "static_assertions",
+]
+
+[[package]]
+name = "convert_case"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9"
+dependencies = [
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "critical-section"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b"
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-queue"
+version = "0.3.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6"
+
+[[package]]
+name = "crossterm"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b"
+dependencies = [
+ "bitflags",
+ "crossterm_winapi",
+ "derive_more",
+ "document-features",
+ "filedescriptor",
+ "mio",
+ "parking_lot",
+ "rustix 1.1.6",
+ "signal-hook",
+ "signal-hook-mio",
+ "winapi",
+]
+
+[[package]]
+name = "crossterm_winapi"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "crypto-common"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "ctr"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
+dependencies = [
+ "cipher",
+]
+
+[[package]]
+name = "darling"
+version = "0.24.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.24.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff"
+dependencies = [
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.24.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "deranged"
+version = "0.5.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e"
+
+[[package]]
+name = "derive_more"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134"
+dependencies = [
+ "derive_more-impl",
+]
+
+[[package]]
+name = "derive_more-impl"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb"
+dependencies = [
+ "convert_case",
+ "proc-macro2",
+ "quote",
+ "rustc_version",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "displaydoc"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "document-features"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61"
+dependencies = [
+ "litrs",
+]
+
+[[package]]
+name = "either"
+version = "1.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
+
+[[package]]
+name = "equivalent"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"
+
+[[package]]
+name = "errno"
+version = "0.3.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776"
+dependencies = [
+ "libc",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
+
+[[package]]
+name = "filedescriptor"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d"
+dependencies = [
+ "libc",
+ "thiserror 1.0.69",
+ "winapi",
+]
+
+[[package]]
+name = "find-msvc-tools"
+version = "0.1.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"
+
+[[package]]
+name = "flamelens"
+version = "0.4.0"
+source = "git+https://github.com/azat-rust/flamelens?branch=chdig#40706414c879da3359acd432547c05938c47bad0"
+dependencies = [
+ "anyhow",
+ "cfg-if",
+ "clap",
+ "crossterm",
+ "ratatui",
+ "regex",
+ "serde",
+ "serde_json",
+ "tui-input",
+]
+
+[[package]]
+name = "flate2"
+version = "1.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "flexi_logger"
+version = "0.27.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "469e584c031833564840fb0cdbce99bdfe946fd45480a188545e73a76f45461c"
+dependencies = [
+ "chrono",
+ "glob",
+ "lazy_static",
+ "log",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "foldhash"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "futures"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
+
+[[package]]
+name = "futures-io"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
+
+[[package]]
+name = "futures-task"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
+
+[[package]]
+name = "futures-util"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "slab",
+]
+
+[[package]]
+name = "fuzzy-matcher"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94"
+dependencies = [
+ "thread_local",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "r-efi",
+]
+
+[[package]]
+name = "ghash"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1"
+dependencies = [
+ "opaque-debug",
+ "polyval",
+]
+
+[[package]]
+name = "glob"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
+
+[[package]]
+name = "hashbrown"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
+dependencies = [
+ "allocator-api2",
+ "equivalent",
+ "foldhash",
+]
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "home"
+version = "0.5.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d"
+dependencies = [
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "hostname"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
+dependencies = [
+ "libc",
+ "match_cfg",
+ "winapi",
+]
+
+[[package]]
+name = "httpdate"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+
+[[package]]
+name = "humantime"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15cdd26707701c53297e2fa6afb323d55fbc1d0810c3aec078ae3ef0424c3c15"
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.65"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "log",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "icu_collections"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd"
+dependencies = [
+ "displaydoc",
+ "potential_utf",
+ "utf8_iter",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locale_core"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0"
+dependencies = [
+ "displaydoc",
+ "litemap",
+ "tinystr",
+ "writeable",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599"
+dependencies = [
+ "icu_collections",
+ "icu_normalizer_data",
+ "icu_properties",
+ "icu_provider",
+ "smallvec",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer_data"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc"
+
+[[package]]
+name = "icu_properties"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f"
+dependencies = [
+ "displaydoc",
+ "icu_collections",
+ "icu_locale_core",
+ "icu_properties_data",
+ "icu_provider",
+ "zerotrie",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_properties_data"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf"
+
+[[package]]
+name = "icu_provider"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514"
+dependencies = [
+ "displaydoc",
+ "icu_locale_core",
+ "writeable",
+ "yoke",
+ "zerofrom",
+ "zerotrie",
+ "zerovec",
+]
+
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
+[[package]]
+name = "idna"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
+dependencies = [
+ "idna_adapter",
+ "smallvec",
+ "utf8_iter",
+]
+
+[[package]]
+name = "idna_adapter"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714"
+dependencies = [
+ "icu_normalizer",
+ "icu_properties",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.14.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
+dependencies = [
+ "equivalent",
+ "hashbrown",
+]
+
+[[package]]
+name = "indoc"
+version = "2.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a37b2691796cffeb8a8cd305ac66e65841559f147f4e63231d0eafa4db5384d1"
+dependencies = [
+ "rustversion",
+]
+
+[[package]]
+name = "inout"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "instability"
+version = "0.3.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c3b5acc1e2fd9375041a388da33d1eb8aed5f7a8c0dd3543e3ea2805adfbe20"
+dependencies = [
+ "darling",
+ "indoc",
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
+
+[[package]]
+name = "itertools"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4"
+
+[[package]]
+name = "js-sys"
+version = "0.3.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
+dependencies = [
+ "cfg-if",
+ "futures-util",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "kasuari"
+version = "0.4.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72f14c90e40a6133f4805b83542a7ed7364f56070b447f56e7f4e90297122209"
+dependencies = [
+ "hashbrown",
+ "portable-atomic",
+ "thiserror 2.0.21",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
+
+[[package]]
+name = "libc"
+version = "0.2.191"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
+
+[[package]]
+name = "libm"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
+
+[[package]]
+name = "line-clipping"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e752191d037c44ad111a8caa762921926658402f01cc1253f7bef2020ece4f5e"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
+
+[[package]]
+name = "litemap"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"
+
+[[package]]
+name = "litrs"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70"
+
+[[package]]
+name = "lock_api"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
+dependencies = [
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c"
+dependencies = [
+ "serde_core",
+]
+
+[[package]]
+name = "lru"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef9ac18847474e638e3702b76c65d4eb93428471a74778ef0f1be711717f89b5"
+dependencies = [
+ "hashbrown",
+]
+
+[[package]]
+name = "lz4"
+version = "1.28.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4"
+dependencies = [
+ "lz4-sys",
+]
+
+[[package]]
+name = "lz4-sys"
+version = "1.11.1+lz4-1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "match_cfg"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
+
+[[package]]
+name = "memchr"
+version = "2.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c"
+dependencies = [
+ "adler2",
+ "simd-adler32",
+]
+
+[[package]]
+name = "mio"
+version = "1.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20521a903f02b0a573cd6840e9d0a5a0cc043d361fe924092cd70f8556cc9c4a"
+dependencies = [
+ "libc",
+ "log",
+ "wasi",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "num-conv"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_threads"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cabcc654086861f9e1bc5115258de62ef92c79b20f4615a1b0cc57c4e82027d4"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+
+[[package]]
+name = "once_cell_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
+
+[[package]]
+name = "opaque-debug"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
+
+[[package]]
+name = "palette"
+version = "0.7.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddeed8580d347d2abf3dcf06a5f0b3dc020258338526b277847cd4248a70fc64"
+dependencies = [
+ "approx",
+ "libm",
+ "palette_derive",
+ "palette_math",
+]
+
+[[package]]
+name = "palette_derive"
+version = "0.7.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88537020289b719d81be994ccf1bbf4990f477e2f69ee52fe3e45f43a02e56be"
+dependencies = [
+ "by_address",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "palette_math"
+version = "0.7.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e6eb142958d64335fb0e345c5b9ead2ecd6fc438c307e9d7d3c4fd428dbaf12"
+dependencies = [
+ "libm",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-link",
+]
+
+[[package]]
+name = "parse-zoneinfo"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24"
+dependencies = [
+ "regex",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
+
+[[package]]
+name = "perfetto_protos"
+version = "0.51.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "634f88ebef917643d9e470dbf99637fbfa8295f54525954d156641f06823f9ac"
+dependencies = [
+ "protobuf",
+ "protobuf-codegen",
+ "protoc-bin-vendored",
+]
+
+[[package]]
+name = "phf"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
+dependencies = [
+ "phf_shared",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a"
+dependencies = [
+ "phf_generator",
+ "phf_shared",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
+dependencies = [
+ "phf_shared",
+ "rand",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "pin-project"
+version = "1.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
+
+[[package]]
+name = "polyval"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "opaque-debug",
+ "universal-hash",
+]
+
+[[package]]
+name = "portable-atomic"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
+
+[[package]]
+name = "potential_utf"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661"
+dependencies = [
+ "zerovec",
+]
+
+[[package]]
+name = "powerfmt"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "protobuf"
+version = "3.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d65a1d4ddae7d8b5de68153b48f6aa3bba8cb002b243dbdbc55a5afbc98f99f4"
+dependencies = [
+ "once_cell",
+ "protobuf-support",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "protobuf-codegen"
+version = "3.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d3976825c0014bbd2f3b34f0001876604fe87e0c86cd8fa54251530f1544ace"
+dependencies = [
+ "anyhow",
+ "once_cell",
+ "protobuf",
+ "protobuf-parse",
+ "regex",
+ "tempfile",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "protobuf-parse"
+version = "3.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4aeaa1f2460f1d348eeaeed86aea999ce98c1bded6f089ff8514c9d9dbdc973"
+dependencies = [
+ "anyhow",
+ "indexmap",
+ "log",
+ "protobuf",
+ "protobuf-support",
+ "tempfile",
+ "thiserror 1.0.69",
+ "which",
+]
+
+[[package]]
+name = "protobuf-support"
+version = "3.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e36c2f31e0a47f9280fb347ef5e461ffcd2c52dd520d8e216b52f93b0b0d7d6"
+dependencies = [
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "protoc-bin-vendored"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8760a25b6ff9c620324822737e468478fa092234190d2e449760344354896ed9"
+dependencies = [
+ "protoc-bin-vendored-linux-aarch_64",
+ "protoc-bin-vendored-linux-ppcle_64",
+ "protoc-bin-vendored-linux-s390_64",
+ "protoc-bin-vendored-linux-x86_32",
+ "protoc-bin-vendored-linux-x86_64",
+ "protoc-bin-vendored-macos-aarch_64",
+ "protoc-bin-vendored-macos-x86_64",
+ "protoc-bin-vendored-win32",
+]
+
+[[package]]
+name = "protoc-bin-vendored-linux-aarch_64"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73fa2624782ca04cd44f51554566717377acd240e4c0016d757dd74fccc9324f"
+
+[[package]]
+name = "protoc-bin-vendored-linux-ppcle_64"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2417e9817fa237dab803ad4dda7357a111656e242959cc6b8f9a1a583367d42"
+
+[[package]]
+name = "protoc-bin-vendored-linux-s390_64"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d189c34636356a46a7ed3188233dc8a88c431278cc54d4a19b096a2d270e985"
+
+[[package]]
+name = "protoc-bin-vendored-linux-x86_32"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "171e39f1e846e5f322ced1ac3b8d4cd3a3833ca24b6e5d58b3632574fe6204fa"
+
+[[package]]
+name = "protoc-bin-vendored-linux-x86_64"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "873cdcc097593432086661aa432b8078f1cd87bfb02847c332e98ae2c119e966"
+
+[[package]]
+name = "protoc-bin-vendored-macos-aarch_64"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eeb72df001783b8297847fe8f5f874ee400fd742c843d60583e8c23d96977c7f"
+
+[[package]]
+name = "protoc-bin-vendored-macos-x86_64"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b04652167eca899dda05f32f5481adeaf25c623a98ce2fc146a001cc59a2add7"
+
+[[package]]
+name = "protoc-bin-vendored-win32"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "263a3f48f01e7309e857138bd47f785585b4a005e8e56c6d2824ce91195999c3"
+
+[[package]]
+name = "quick-xml"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b"
+dependencies = [
+ "memchr",
+ "serde",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "r-efi"
+version = "6.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
+
+[[package]]
+name = "rand"
+version = "0.8.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c"
+dependencies = [
+ "rand_core",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+
+[[package]]
+name = "ratatui"
+version = "0.30.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3274ba0a2c5e1bcad2a2005d20f4dc59dad26b2eb0940fb094500dba4099d57d"
+dependencies = [
+ "instability",
+ "ratatui-core",
+ "ratatui-crossterm",
+ "ratatui-widgets",
+ "serde",
+]
+
+[[package]]
+name = "ratatui-core"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cbb175c433c8e28a809d1f5773a2ae96e68c0ce40db865cbab1020bf33ae479c"
+dependencies = [
+ "bitflags",
+ "compact_str",
+ "critical-section",
+ "hashbrown",
+ "itertools",
+ "kasuari",
+ "lru",
+ "palette",
+ "serde",
+ "strum",
+ "thiserror 2.0.21",
+ "unicode-segmentation",
+ "unicode-truncate",
+ "unicode-width",
+]
+
+[[package]]
+name = "ratatui-crossterm"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567584a3b0e6a8203c23de40b4861497266725eb5363dbfd18a1edd603cca9f0"
+dependencies = [
+ "cfg-if",
+ "crossterm",
+ "instability",
+ "ratatui-core",
+]
+
+[[package]]
+name = "ratatui-widgets"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "66e3d19bcc9130ca376277d93b60767ff121ace3be06f5f95f81dd68956407d1"
+dependencies = [
+ "bitflags",
+ "hashbrown",
+ "indoc",
+ "instability",
+ "itertools",
+ "line-clipping",
+ "ratatui-core",
+ "serde",
+ "strum",
+ "time",
+ "unicode-segmentation",
+ "unicode-width",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "regex"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
+
+[[package]]
+name = "ring"
+version = "0.17.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
+dependencies = [
+ "cc",
+ "cfg-if",
+ "getrandom 0.2.17",
+ "libc",
+ "untrusted",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
+dependencies = [
+ "semver",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
+dependencies = [
+ "bitflags",
+ "errno",
+ "libc",
+ "linux-raw-sys 0.4.15",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "rustix"
+version = "1.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa"
+dependencies = [
+ "bitflags",
+ "errno",
+ "libc",
+ "linux-raw-sys 0.12.1",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "rustls"
+version = "0.23.46"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
+dependencies = [
+ "log",
+ "once_cell",
+ "ring",
+ "rustls-pki-types",
+ "rustls-webpki",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "rustls-pki-types"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "102f35f7de7b06d8c61f1cff6592f5253e0dea431c74867aad5dfd70f44663fb"
+dependencies = [
+ "zeroize",
+]
+
+[[package]]
+name = "rustls-webpki"
+version = "0.103.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3a0760a887c14823fca5a1c970b01d47c328c696c0c64829d1df50e8f853fd5"
+dependencies = [
+ "ring",
+ "rustls-pki-types",
+ "untrusted",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
+
+[[package]]
+name = "ryu"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "semver"
+version = "1.0.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
+
+[[package]]
+name = "serde"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
+dependencies = [
+ "serde_core",
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.154"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
+dependencies = [
+ "itoa",
+ "memchr",
+ "serde",
+ "serde_core",
+ "zmij",
+]
+
+[[package]]
+name = "serde_norway"
+version = "0.9.42"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e408f29489b5fd500fab51ff1484fc859bb655f32c671f307dcd733b72e8168c"
+dependencies = [
+ "indexmap",
+ "itoa",
+ "ryu",
+ "serde",
+ "unsafe-libyaml-norway",
+]
+
+[[package]]
+name = "shlex"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
+
+[[package]]
+name = "signal-hook"
+version = "0.3.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2"
+dependencies = [
+ "libc",
+ "signal-hook-registry",
+]
+
+[[package]]
+name = "signal-hook-mio"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc"
+dependencies = [
+ "libc",
+ "mio",
+ "signal-hook",
+]
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"
+dependencies = [
+ "errno",
+ "libc",
+]
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
+
+[[package]]
+name = "siphasher"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256"
+
+[[package]]
+name = "size"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c48f464f8e2766494cb2223d1683ff6801dd56f0d07298500f9c970de2571cf0"
+
+[[package]]
+name = "slab"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
+
+[[package]]
+name = "smallvec"
+version = "1.16.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "149309498a5f7334b12ddae0cad8aba81ce785fe91755068867e017cf98fee46"
+
+[[package]]
+name = "socket2"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"
+dependencies = [
+ "libc",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "strfmt"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "046d549b88a663d317cd04d39696fca5f77db4db44e1db65bfb9dee7f9e680bd"
+
+[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
+[[package]]
+name = "strum"
+version = "0.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.28.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "subtle"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
+
+[[package]]
+name = "syn"
+version = "2.0.119"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "3.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "synstructure"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
+dependencies = [
+ "fastrand",
+ "getrandom 0.4.3",
+ "once_cell",
+ "rustix 1.1.6",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
+dependencies = [
+ "thiserror-impl 2.0.21",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "time"
+version = "0.3.55"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134"
+dependencies = [
+ "deranged",
+ "libc",
+ "num-conv",
+ "num_threads",
+ "powerfmt",
+ "serde_core",
+ "time-core",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
+
+[[package]]
+name = "tiny_http"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82"
+dependencies = [
+ "ascii",
+ "chunked_transfer",
+ "httpdate",
+ "log",
+]
+
+[[package]]
+name = "tinystr"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
+[[package]]
+name = "tokio"
+version = "1.54.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
+dependencies = [
+ "bytes",
+ "libc",
+ "mio",
+ "pin-project-lite",
+ "socket2",
+ "tokio-macros",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.26.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db"
+dependencies = [
+ "rustls",
+ "tokio",
+]
+
+[[package]]
+name = "tui-input"
+version = "0.15.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4fa0cb7933d19f91eb3109781bf7297d5e4cba57e857d97a29b9465d3383f56"
+dependencies = [
+ "crossterm",
+ "unicode-segmentation",
+ "unicode-width",
+]
+
+[[package]]
+name = "typenum"
+version = "1.20.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.13.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
+
+[[package]]
+name = "unicode-truncate"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16b380a1238663e5f8a691f9039c73e1cdae598a30e9855f541d29b08b53e9a5"
+dependencies = [
+ "itertools",
+ "unicode-segmentation",
+ "unicode-width",
+]
+
+[[package]]
+name = "unicode-width"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca718471876992059f251e33aafc334346ada08042b7661dd1fe313a9bced557"
+
+[[package]]
+name = "universal-hash"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
+dependencies = [
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "unsafe-libyaml-norway"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b39abd59bf32521c7f2301b52d05a6a2c975b6003521cbd0c6dc1582f0a22104"
+
+[[package]]
+name = "untrusted"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
+
+[[package]]
+name = "url"
+version = "2.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+]
+
+[[package]]
+name = "utf8_iter"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0"
+dependencies = [
+ "utf_types",
+]
+
+[[package]]
+name = "utf8parse"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+
+[[package]]
+name = "utf_types"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6"
+
+[[package]]
+name = "uuid"
+version = "1.29.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bed99139f7dac9b5cfe5f17be4d66dc7079a34dee1d74bcc77217119240e267c"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "wasi"
+version = "0.11.1+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.130"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
+dependencies = [
+ "cfg-if",
+ "rustversion",
+ "wasm-bindgen-macro",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.130"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.130"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
+dependencies = [
+ "bumpalo",
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.130"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "webpki-roots"
+version = "1.0.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7265c9301c16a8711c992c2d8da90ee77ef54b1ed51482d6dfeb00dc756b1297"
+dependencies = [
+ "rustls-pki-types",
+]
+
+[[package]]
+name = "which"
+version = "4.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
+dependencies = [
+ "either",
+ "home",
+ "once_cell",
+ "rustix 0.38.44",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-core"
+version = "0.62.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-link",
+ "windows-result",
+ "windows-strings",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.60.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.59.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "windows-link"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+
+[[package]]
+name = "windows-result"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "writeable"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"
+
+[[package]]
+name = "yoke"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3"
+dependencies = [
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+ "synstructure",
+]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+ "synstructure",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
+
+[[package]]
+name = "zerotrie"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f"
+dependencies = [
+ "displaydoc",
+ "yoke",
+ "zerofrom",
+]
+
+[[package]]
+name = "zerovec"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40"
+dependencies = [
+ "yoke",
+ "zerofrom",
+ "zerovec-derive",
+]
+
+[[package]]
+name = "zerovec-derive"
+version = "0.11.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.10",
+]
+
+[[package]]
+name = "zmij"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
diff --git a/contrib/chdig-cmake/Cargo.toml b/contrib/chdig-cmake/Cargo.toml
new file mode 100644
index 000000000000..d36786053af7
--- /dev/null
+++ b/contrib/chdig-cmake/Cargo.toml
@@ -0,0 +1,13 @@
+[package]
+name = "_ch_rust_chdig"
+version = "0.1.0"
+edition = "2021"
+
+[lib]
+crate-type = ["staticlib"]
+
+[dependencies]
+chdig = { path = "../chdig", default-features = false, features = ["tls"] }
+
+# Standalone, so that the lock in this directory is used instead of the one in `chdig`
+[workspace]
diff --git a/contrib/chdig-cmake/src/lib.rs b/contrib/chdig-cmake/src/lib.rs
new file mode 100644
index 000000000000..4a18a6b2ef29
--- /dev/null
+++ b/contrib/chdig-cmake/src/lib.rs
@@ -0,0 +1 @@
+pub use chdig;
diff --git a/contrib/corrosion-cmake/CMakeLists.txt b/contrib/corrosion-cmake/CMakeLists.txt
index b32168d64b6b..1f2101f536a9 100644
--- a/contrib/corrosion-cmake/CMakeLists.txt
+++ b/contrib/corrosion-cmake/CMakeLists.txt
@@ -35,7 +35,7 @@ endmacro()
# Keep in sync with toolchain in docker images
# (must be called before find_package(Rust) and inclusion of Corrosion.cmake)
-set(Rust_TOOLCHAIN "nightly-2025-07-07")
+set(Rust_TOOLCHAIN "nightly-2026-11-02")
macro(find_rust)
set_rust_target()
diff --git a/contrib/corrosion-cmake/config.toml.in b/contrib/corrosion-cmake/config.toml.in
index da1f465a6d10..c2a1513744c3 100644
--- a/contrib/corrosion-cmake/config.toml.in
+++ b/contrib/corrosion-cmake/config.toml.in
@@ -19,19 +19,7 @@ replace-with = 'vendored-sources'
git = "https://github.com/azat-rust/clickhouse-rs"
branch = "next"
replace-with = "vendored-sources"
-[source."git+https://github.com/azat-rust/cursive-flexi-logger-view?branch=next"]
-git = "https://github.com/azat-rust/cursive-flexi-logger-view"
-branch = "next"
-replace-with = "vendored-sources"
-[source."git+https://github.com/azat-rust/cursive?branch=chdig-next"]
-git = "https://github.com/azat-rust/cursive"
-branch = "chdig-next"
-replace-with = "vendored-sources"
-[source."git+https://github.com/azat-rust/cursive_table_view?branch=next"]
-git = "https://github.com/azat-rust/cursive_table_view"
-branch = "next"
-replace-with = "vendored-sources"
-[source."git+https://github.com/ys-l/flamelens?branch=main"]
-git = "https://github.com/ys-l/flamelens"
-branch = "main"
+[source."git+https://github.com/azat-rust/flamelens?branch=chdig"]
+git = "https://github.com/azat-rust/flamelens"
+branch = "chdig"
replace-with = "vendored-sources"
diff --git a/contrib/delta-kernel-rs b/contrib/delta-kernel-rs
index 609a93b33560..32287c524706 160000
--- a/contrib/delta-kernel-rs
+++ b/contrib/delta-kernel-rs
@@ -1 +1 @@
-Subproject commit 609a93b33560cd64d2d062e000ecd609fe5d0edd
+Subproject commit 32287c524706da4114a624f652d70749efd8615c
diff --git a/contrib/delta-kernel-rs-cmake/CMakeLists.txt b/contrib/delta-kernel-rs-cmake/CMakeLists.txt
index 7fc6082ee436..3141a4141330 100644
--- a/contrib/delta-kernel-rs-cmake/CMakeLists.txt
+++ b/contrib/delta-kernel-rs-cmake/CMakeLists.txt
@@ -6,7 +6,14 @@ include(ExternalProject)
set(USE_DELTA_KERNEL_RS ${ENABLE_LIBRARIES})
-# MSAN: Disabled because ring does not generate the appropriate symbols
+# MSAN: Disabled because `ring` is still compiled in, and its hand-written assembly does
+# not generate the symbols required by MSan. Switching to `default-engine-native-tls`
+# only makes `delta-kernel-rs`'s own HTTP client (`reqwest`) able to use ClickHouse's
+# OpenSSL; it does not remove `ring`. `object_store` pulls in `ring` two ways: directly
+# (for AWS request HMAC signing) and transitively through `rustls`, which it forces onto
+# `reqwest` via `rustls-tls-native-roots`. Because Cargo unifies features, `reqwest` ends
+# up built with both the `native-tls` and `rustls` backends, so this is only a partial
+# `native-tls` enablement. Tracking upstream: https://github.com/apache/arrow-rs-object-store/pull/585
# NO_ARMV81_OR_HIGHER: Disabled because ring assumes that Neon is available with ARM
if (NOT ENABLE_LIBRARIES OR (NOT OS_LINUX AND NOT OS_DARWIN) OR (NOT ARCH_AMD64 AND NOT ARCH_AARCH64) OR (SANITIZE STREQUAL "memory") OR NO_ARMV81_OR_HIGHER)
message(STATUS "Disabling delta kernel because of incompatible platform or Rust is disabled")
@@ -23,7 +30,7 @@ endif()
# * default-engine: Needed for its s3 client (we can't pass our own s3 client via ffi)
clickhouse_import_crate(
MANIFEST_PATH "${DELTA_KERNEL_RS_SOURCE_DIR}/ffi/Cargo.toml"
- FEATURES "default-engine-rustls, test-ffi, tracing"
+ FEATURES "default-engine-native-tls, test-ffi, tracing, arrow"
)
clickhouse_config_crate_flags(delta_kernel_ffi)
@@ -36,7 +43,17 @@ corrosion_set_env_vars(delta_kernel_ffi
"OPENSSL_LIBS=ssl:crypto"
"OPENSSL_STATIC=1"
"OPENSSL_LIB_DIR=${CMAKE_BINARY_DIR}/contrib/openssl-cmake/"
- "OPENSSL_INCLUDE_DIR=${CMAKE_BINARY_DIR}/contrib/openssl-cmake/common/")
+ "OPENSSL_INCLUDE_DIR=${ClickHouse_SOURCE_DIR}/contrib/openssl-cmake/common/include/"
+ # The build-script for `openssl-sys` expects all includes to be in one path
+ # but the CMake build for OpenSSL results in headers in two different places
+ "CFLAGS=${RUST_CFLAGS} -I ${ClickHouse_SOURCE_DIR}/contrib/openssl/include/")
+
+# aws-lc-sys's memcmp_check links a small test binary via cc; clang adds
+# -lgcc_s / -lgcc_eh by default but the bundled Linux sysroot ships only
+# libgcc.a.
+if (OS_LINUX)
+ corrosion_set_env_vars(delta_kernel_ffi "LDFLAGS=-nodefaultlibs -lc -lgcc")
+endif()
target_include_directories(delta_kernel_ffi INTERFACE "${DELTA_KERNEL_TARGET_PATH}/")
target_link_libraries(delta_kernel_ffi INTERFACE OpenSSL::Crypto OpenSSL::SSL)
diff --git a/contrib/krb5 b/contrib/krb5
index 857c2d1edd7a..17f660ca561d 160000
--- a/contrib/krb5
+++ b/contrib/krb5
@@ -1 +1 @@
-Subproject commit 857c2d1edd7a4218b84594768587aa53fd63da9e
+Subproject commit 17f660ca561db6716125041396ce2cdd8ebd594a
diff --git a/contrib/krb5-cmake/autoconf_darwin.h b/contrib/krb5-cmake/autoconf_darwin.h
index 64c28f90b41b..7c7ee22fa1ff 100644
--- a/contrib/krb5-cmake/autoconf_darwin.h
+++ b/contrib/krb5-cmake/autoconf_darwin.h
@@ -635,7 +635,7 @@
#define PACKAGE_NAME "Kerberos 5"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Kerberos 5 1.22.1"
+#define PACKAGE_STRING "Kerberos 5 1.22.3"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "krb5"
@@ -644,7 +644,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.22.1"
+#define PACKAGE_VERSION "1.22.3"
/* Define if setjmp indicates POSIX interface */
#define POSIX_SETJMP 1
diff --git a/contrib/krb5-cmake/autoconf_linux.h b/contrib/krb5-cmake/autoconf_linux.h
index ec8e867eec38..efa76cd145fc 100644
--- a/contrib/krb5-cmake/autoconf_linux.h
+++ b/contrib/krb5-cmake/autoconf_linux.h
@@ -637,7 +637,7 @@
#define PACKAGE_NAME "Kerberos 5"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "Kerberos 5 1.22.1"
+#define PACKAGE_STRING "Kerberos 5 1.22.3"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "krb5"
@@ -646,7 +646,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.22.1"
+#define PACKAGE_VERSION "1.22.3"
/* Define if setjmp indicates POSIX interface */
/* #undef POSIX_SETJMP */
diff --git a/contrib/llvm-project b/contrib/llvm-project
index 1e8c7547d529..85d6c707358a 160000
--- a/contrib/llvm-project
+++ b/contrib/llvm-project
@@ -1 +1 @@
-Subproject commit 1e8c7547d529e162040b73827333f4ce501f4d36
+Subproject commit 85d6c707358aea53a686d32dea6b994dc729891d
diff --git a/contrib/minizip-ng b/contrib/minizip-ng
index 95ba7abdd24a..fd8abd88f4d8 160000
--- a/contrib/minizip-ng
+++ b/contrib/minizip-ng
@@ -1 +1 @@
-Subproject commit 95ba7abdd24a956bde584db54d1d55e37d511e2f
+Subproject commit fd8abd88f4d8215f2becdefe3ef2bfbc06edc3d1
diff --git a/contrib/mongo-c-driver b/contrib/mongo-c-driver
index 58b4e1f39c6f..69c77fcb894e 160000
--- a/contrib/mongo-c-driver
+++ b/contrib/mongo-c-driver
@@ -1 +1 @@
-Subproject commit 58b4e1f39c6f8bcf4da4204deb84f9b3527388d4
+Subproject commit 69c77fcb894eeadd4cc2059d4c65e8968db1462c
diff --git a/contrib/postgres b/contrib/postgres
index ab6952af3ac8..c7649becd213 160000
--- a/contrib/postgres
+++ b/contrib/postgres
@@ -1 +1 @@
-Subproject commit ab6952af3ac8cdede654be4dc68f990b0352c213
+Subproject commit c7649becd213231466df7e679154e8ac0f744788
diff --git a/contrib/postgres-cmake/pg_config.h b/contrib/postgres-cmake/pg_config.h
index 84e435838d41..9df1b95a3b33 100644
--- a/contrib/postgres-cmake/pg_config.h
+++ b/contrib/postgres-cmake/pg_config.h
@@ -593,7 +593,7 @@
#define PACKAGE_NAME "PostgreSQL"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PostgreSQL 18.3"
+#define PACKAGE_STRING "PostgreSQL 18.6"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "postgresql"
@@ -602,7 +602,7 @@
#define PACKAGE_URL "https://www.postgresql.org/"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "18.3"
+#define PACKAGE_VERSION "18.6"
/* Define to the name of a signed 128-bit integer type. */
#define PG_INT128_TYPE __int128
@@ -618,7 +618,7 @@
#define PG_MAJORVERSION_NUM 18
/* PostgreSQL minor version number */
-#define PG_MINORVERSION_NUM 4
+#define PG_MINORVERSION_NUM 6
/* Define to best C++ printf format archetype, usually gnu_printf if
available. */
@@ -629,13 +629,13 @@
#define PG_C_PRINTF_ATTRIBUTE gnu_printf
/* PostgreSQL version as a string */
-#define PG_VERSION "18.4"
+#define PG_VERSION "18.6"
/* PostgreSQL version as a number */
-#define PG_VERSION_NUM 180004
+#define PG_VERSION_NUM 180006
/* A string containing the version number, platform, and C compiler */
-#define PG_VERSION_STR "PostgreSQL 18.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 15.2.1 20250813, 64-bit"
+#define PG_VERSION_STR "PostgreSQL 18.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 15.2.1 20250813, 64-bit"
/* Define to 1 to allow profiling output to be saved separately for each
process. */
diff --git a/contrib/rust_vendor b/contrib/rust_vendor
index 3332fd445e9c..11cea4f35a9a 160000
--- a/contrib/rust_vendor
+++ b/contrib/rust_vendor
@@ -1 +1 @@
-Subproject commit 3332fd445e9cc0c21ff82b81dccc250eb4560821
+Subproject commit 11cea4f35a9a6184e391d76333aea8662c6e3c1d
diff --git a/contrib/wasmtime b/contrib/wasmtime
index c411eb43e6c4..1c05b58b727c 160000
--- a/contrib/wasmtime
+++ b/contrib/wasmtime
@@ -1 +1 @@
-Subproject commit c411eb43e6c43e9d476ed831098abab256467f58
+Subproject commit 1c05b58b727cdb87dfdc8f076feef2b1666e6a53
diff --git a/contrib/zstd b/contrib/zstd
index 437081852c39..1663170820f4 160000
--- a/contrib/zstd
+++ b/contrib/zstd
@@ -1 +1 @@
-Subproject commit 437081852c396eeb61edb7d47044d8cad911885e
+Subproject commit 1663170820f4825123ddfc4976223ad2c78b21cc
diff --git a/docker/keeper/Dockerfile b/docker/keeper/Dockerfile
index e877588b61fe..925af74d8ec3 100644
--- a/docker/keeper/Dockerfile
+++ b/docker/keeper/Dockerfile
@@ -51,6 +51,9 @@ RUN addgroup -S -g "${DEFAULT_GID}" clickhouse && \
adduser -S -h "/var/lib/clickhouse" -s /bin/bash -G clickhouse -g "ClickHouse keeper" -u "${DEFAULT_UID}" clickhouse
ARG TARGETARCH
+# `apk upgrade` runs before `apk add` because `apk add` never bumps packages already in
+# the base image, so without it the image keeps whatever (possibly vulnerable) packages
+# the `alpine` snapshot had at build time.
RUN arch=${TARGETARCH:-amd64} \
&& cd /tmp && rm -f /tmp/*tgz && rm -f /tmp/*tgz.sha512 |: \
&& if [ -n "${DIRECT_DOWNLOAD_URLS}" ]; then \
@@ -71,6 +74,7 @@ RUN arch=${TARGETARCH:-amd64} \
; done \
&& rm /tmp/*.tgz /install -r \
&& chmod +x /entrypoint.sh \
+ && apk upgrade --no-cache \
&& apk add --no-cache su-exec bash tzdata \
&& cp /usr/share/zoneinfo/UTC /etc/localtime \
&& echo "UTC" > /etc/timezone
diff --git a/docker/server/Dockerfile.alpine b/docker/server/Dockerfile.alpine
index c35cbc4e0db1..e20d86476437 100644
--- a/docker/server/Dockerfile.alpine
+++ b/docker/server/Dockerfile.alpine
@@ -47,6 +47,9 @@ ARG DEFAULT_GID="101"
RUN addgroup -S -g "${DEFAULT_GID}" clickhouse && \
adduser -S -h "/var/lib/clickhouse" -s /bin/bash -G clickhouse -g "ClickHouse server" -u "${DEFAULT_UID}" clickhouse
+# `apk upgrade` runs before `apk add` because `apk add` never bumps packages already in
+# the base image, so without it the image keeps whatever (possibly vulnerable) packages
+# the `alpine` snapshot had at build time.
RUN arch=${TARGETARCH:-amd64} \
&& cd /tmp \
&& if [ -n "${DIRECT_DOWNLOAD_URLS}" ]; then \
@@ -67,6 +70,7 @@ RUN arch=${TARGETARCH:-amd64} \
; done \
&& rm /tmp/*.tgz /install -r \
&& chmod +x /entrypoint.sh \
+ && apk upgrade --no-cache \
&& apk add --no-cache bash tzdata \
&& cp /usr/share/zoneinfo/UTC /etc/localtime \
&& echo "UTC" > /etc/timezone
diff --git a/docs/en/development/build.md b/docs/en/development/build.md
index 50b3354719ec..311dc4090127 100644
--- a/docs/en/development/build.md
+++ b/docs/en/development/build.md
@@ -70,8 +70,8 @@ As with C++ dependencies, ClickHouse uses vendoring to control exactly what's in
Although in release mode any rust modern rustup toolchain version should work with these dependencies, if you plan to enable sanitizers you must use a version that matches the exact same `std` as the one used in CI (for which we vendor the crates):
```bash
-rustup toolchain install nightly-2025-07-07
-rustup default nightly-2025-07-07
+rustup toolchain install nightly-2026-11-02
+rustup default nightly-2026-11-02
rustup component add rust-src
```
## Build ClickHouse {#build-clickhouse}
diff --git a/docs/en/engines/table-engines/integrations/kafka.md b/docs/en/engines/table-engines/integrations/kafka.md
index e06880eccfed..32b8a446a040 100644
--- a/docs/en/engines/table-engines/integrations/kafka.md
+++ b/docs/en/engines/table-engines/integrations/kafka.md
@@ -233,6 +233,8 @@ Similar to GraphiteMergeTree, the Kafka engine supports extended configuration u
For a list of possible configuration options, see the [librdkafka configuration reference](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md). Use the underscore (`_`) instead of a dot in the ClickHouse configuration. For example, `check.crcs=true` will be `true`.
+A named collection created with `CREATE NAMED COLLECTION` accepts only the `librdkafka` properties on the [allowlist](https://github.com/ClickHouse/ClickHouse/blob/26.3/src/Storages/Kafka/KafkaConfigLoader.cpp), such as `security.protocol`, `sasl.username`, and `fetch.min.bytes`. If a table uses a collection with an unlisted property, such as `ssl.ca.location` or `sasl.kerberos.keytab`, ClickHouse returns `BAD_ARGUMENTS`. To use these properties, define the collection in the server configuration file. This restriction also applies to properties added with `ALTER NAMED COLLECTION` after the table was created. Instead of the path of a TLS file, a named collection created with SQL can contain the contents of the file: `ssl.key.pem`, `ssl.certificate.pem`, and `ssl.ca.pem`.
+
### Kerberos support {#kafka-kerberos-support}
To deal with Kerberos-aware Kafka, add `security_protocol` child element with `sasl_plaintext` value. It is enough if Kerberos ticket-granting ticket is obtained and cached by OS facilities.
diff --git a/docs/en/operations/server-configuration-parameters/_server_settings_outside_source.md b/docs/en/operations/server-configuration-parameters/_server_settings_outside_source.md
index ad6c5526870e..dbfde47274d6 100644
--- a/docs/en/operations/server-configuration-parameters/_server_settings_outside_source.md
+++ b/docs/en/operations/server-configuration-parameters/_server_settings_outside_source.md
@@ -1837,7 +1837,7 @@ Settings for optional improvements in the access control system.
| Setting | Description | Default |
|-------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| `on_cluster_queries_require_cluster_grant` | Sets whether `ON CLUSTER` queries require the `CLUSTER` grant. | `true` |
-| `readonly_restricts_set_role` | Sets whether the `SET ROLE` statement is refused when the session or the query is readonly. When `false`, `readonly` does not restrict `SET ROLE`. The `role` HTTP query parameter is not affected. | `false` |
+| `readonly_restricts_set_role` | Sets whether the `SET ROLE` and `SET DEFAULT ROLE` statements are refused when the session or the query is readonly. When `false`, `readonly` does not restrict `SET ROLE`, nor `SET DEFAULT ROLE ... TO CURRENT_USER`. The `role` HTTP query parameter is not affected. | `false` |
| `role_cache_expiration_time_seconds` | Sets the number of seconds since last access, that a role is stored in the Role Cache. | `600` |
| `select_from_information_schema_requires_grant` | Sets whether `SELECT * FROM information_schema.
` requires any grants and can be executed by any user. If set to true, then this query requires `GRANT SELECT ON information_schema.`, just as for ordinary tables. | `true` |
| `select_from_system_db_requires_grant` | Sets whether `SELECT * FROM system.` requires any grants and can be executed by any user. If set to true then this query requires `GRANT SELECT ON system.` just as for non-system tables. Exceptions: a few system tables (`tables`, `columns`, `databases`, and some constant tables like `one`, `contributors`) are still accessible for everyone; and if there is a `SHOW` privilege (e.g. `SHOW USERS`) granted then the corresponding system table (i.e. `system.users`) will be accessible. | `true` |
diff --git a/programs/client/FuzzLoop.cpp b/programs/client/FuzzLoop.cpp
index d56b75acb33e..a5f83e5ef94d 100644
--- a/programs/client/FuzzLoop.cpp
+++ b/programs/client/FuzzLoop.cpp
@@ -435,7 +435,7 @@ bool Client::processWithASTFuzzer(std::string_view full_query)
{
String bytes;
{
- auto read_buf = getReadBufferFromASTInsertQuery(query);
+ auto read_buf = getReadBufferFromASTInsertQuery(query, client_context);
WriteBufferFromString write_buf(bytes);
copyData(*read_buf, write_buf);
}
diff --git a/programs/format/Format.cpp b/programs/format/Format.cpp
index 6d64f7057d54..8d677663dc9c 100644
--- a/programs/format/Format.cpp
+++ b/programs/format/Format.cpp
@@ -285,7 +285,7 @@ int mainEntryClickHouseFormat(int argc, char ** argv)
const char * this_query_end = find_first_symbols<'\n'>(insert_query->data, end);
insert_query->end = this_query_end;
pos = this_query_end;
- insert_query_payload = getReadBufferFromASTInsertQuery(res);
+ insert_query_payload = getReadBufferFromASTInsertQuery(res, context);
}
if (!quiet)
diff --git a/programs/server/binary.html b/programs/server/binary.html
index 896a88ec3640..8117738b8890 100644
--- a/programs/server/binary.html
+++ b/programs/server/binary.html
@@ -267,15 +267,22 @@
`${url}&default_format=JSON`,
{
method: 'POST',
- body: `SELECT encodeXMLComponent(demangle(addressToSymbol(${addr_int}::UInt64))) AS name,
- encodeXMLComponent(addressToLine(${addr_int}::UInt64)) AS line`
+ body: `SELECT demangle(addressToSymbol(${addr_int}::UInt64)) AS name,
+ addressToLine(${addr_int}::UInt64) AS line`
}).then(response => response.json().then(o => {
let name = o.rows ? o.data[0].name : 'nothing';
let line = o.rows ? o.data[0].line : '';
if (addr_int == current_requested_addr) {
- popup.setContent(`${addr_hex}
${name}
${line}
`);
+ /// The response is untrusted (the server can be specified by the `host` parameter),
+ /// so it is inserted as text, never as HTML.
+ const content = document.createElement('div');
+ const addr_elem = content.appendChild(document.createElement('p')).appendChild(document.createElement('b'));
+ addr_elem.textContent = addr_hex;
+ content.appendChild(document.createElement('p')).textContent = name;
+ content.appendChild(document.createElement('p')).textContent = line;
+ popup.setContent(content);
}
}));
diff --git a/programs/server/config.xml b/programs/server/config.xml
index 5b516d4d87e6..1c11c3b7defd 100644
--- a/programs/server/config.xml
+++ b/programs/server/config.xml
@@ -889,7 +889,7 @@
however you can change this behaviour by setting this to true -->
false
-
false
diff --git a/rust/vendor.sh b/rust/vendor.sh
index 08610c6f0c79..e31032eb560a 100755
--- a/rust/vendor.sh
+++ b/rust/vendor.sh
@@ -4,7 +4,7 @@ set -e
# std is required for sanitizers builds
# and we need to match toolchain version for std (to vendor proper dependencies)
-TOOLCHAIN=nightly-2025-07-07
+TOOLCHAIN=nightly-2026-11-02
function cargo() { rustup run "$TOOLCHAIN" cargo "$@"; }
function rustc() { rustup run "$TOOLCHAIN" rustc "$@"; }
rustup component add --toolchain "$TOOLCHAIN" rust-src
@@ -37,7 +37,7 @@ cd "$CH_TOP_DIR"/contrib/delta-kernel-rs || exit 1
cargo vendor --no-delete --locked --versioned-dirs --manifest-path Cargo.toml "$CH_TOP_DIR"/contrib/rust_vendor
# chdig
-cd "$CH_TOP_DIR"/contrib/chdig || exit 1
+cd "$CH_TOP_DIR"/contrib/chdig-cmake || exit 1
cargo vendor --no-delete --locked --versioned-dirs --manifest-path Cargo.toml "$CH_TOP_DIR"/contrib/rust_vendor
# wasmtime
diff --git a/rust/workspace/Cargo.lock b/rust/workspace/Cargo.lock
index d181ad2d4d15..2c297f7e81dd 100644
--- a/rust/workspace/Cargo.lock
+++ b/rust/workspace/Cargo.lock
@@ -38,18 +38,18 @@ dependencies = [
[[package]]
name = "addr2line"
-version = "0.25.1"
+version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
+checksum = "59317f77929f0e679d39364702289274de2f0f0b22cbf50b2b8cff2169a0b27a"
dependencies = [
"gimli",
]
[[package]]
name = "aho-corasick"
-version = "1.1.4"
+version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
+checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"
dependencies = [
"memchr",
]
@@ -62,9 +62,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
[[package]]
name = "android_system_properties"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc"
dependencies = [
"libc",
]
@@ -129,7 +129,7 @@ version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys",
]
[[package]]
@@ -140,29 +140,20 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
- "windows-sys 0.61.2",
+ "windows-sys",
]
[[package]]
name = "anyhow"
-version = "1.0.102"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
-
-[[package]]
-name = "ar_archive_writer"
-version = "0.5.1"
+version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b"
-dependencies = [
- "object",
-]
+checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
[[package]]
name = "arbitrary"
-version = "1.4.2"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
+checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed"
[[package]]
name = "ariadne"
@@ -176,26 +167,26 @@ dependencies = [
[[package]]
name = "arrayvec"
-version = "0.7.6"
+version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
+checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56"
[[package]]
name = "async-trait"
-version = "0.1.89"
+version = "0.1.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
+checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.10",
]
[[package]]
name = "autocfg"
-version = "1.5.0"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
[[package]]
name = "beef"
@@ -211,57 +202,66 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.11.0"
+version = "2.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
[[package]]
name = "bstr"
-version = "1.12.1"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab"
+checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f"
dependencies = [
"memchr",
- "regex-automata 0.4.14",
- "serde",
+ "regex-automata",
+ "serde_core",
]
[[package]]
name = "bumpalo"
-version = "3.20.2"
+version = "3.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
+checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db"
dependencies = [
"allocator-api2",
]
[[package]]
name = "cc"
-version = "1.2.57"
+version = "1.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423"
+checksum = "33ef9e3e8154a45c7a95cff4c1299702106ad94062d7bb85fdc5d3a5afd91d45"
dependencies = [
"find-msvc-tools",
- "shlex",
+ "shlex 2.0.1",
]
[[package]]
name = "cfg-if"
-version = "1.0.4"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
[[package]]
name = "cfg_aliases"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
[[package]]
name = "chrono"
-version = "0.4.44"
+version = "0.4.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0"
+checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
dependencies = [
"iana-time-zone",
"js-sys",
@@ -272,23 +272,22 @@ dependencies = [
[[package]]
name = "chumsky"
-version = "0.11.2"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acc17a6284abccac6e50db35c1cee87f605474a72939b959a3a67d9371800efd"
+checksum = "e0d2bfadce76f963d776feff99db6dc33783829539258314776383b33e2a00f8"
dependencies = [
"hashbrown 0.15.5",
- "regex-automata 0.3.9",
+ "regex-automata",
"serde",
- "stacker",
"unicode-ident",
"unicode-segmentation",
]
[[package]]
name = "clap"
-version = "4.6.0"
+version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351"
+checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
dependencies = [
"clap_builder",
"clap_derive",
@@ -296,9 +295,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.6.0"
+version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
+checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
dependencies = [
"anstream 1.0.0",
"anstyle",
@@ -308,32 +307,32 @@ dependencies = [
[[package]]
name = "clap_complete"
-version = "4.6.0"
+version = "4.6.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19c9f1dde76b736e3681f28cec9d5a61299cbaae0fce80a68e43724ad56031eb"
+checksum = "037e2a1a92236d0aff7e845093f64661d6df4c02c9fcc61a60e9e1d736fa392f"
dependencies = [
"clap",
]
[[package]]
name = "clap_derive"
-version = "4.6.0"
+version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a"
+checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0"
dependencies = [
"anstyle",
"heck",
"proc-macro2",
"pulldown-cmark",
"quote",
- "syn",
+ "syn 3.0.10",
]
[[package]]
name = "clap_lex"
-version = "1.1.0"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
+checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
[[package]]
name = "cobs"
@@ -341,7 +340,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1"
dependencies = [
- "thiserror 2.0.18",
+ "thiserror 2.0.21",
]
[[package]]
@@ -352,7 +351,7 @@ checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681"
dependencies = [
"serde",
"termcolor",
- "unicode-width 0.2.2",
+ "unicode-width 0.2.3",
]
[[package]]
@@ -369,45 +368,56 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "cpp_demangle"
-version = "0.4.5"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2bb79cb74d735044c972aae58ed0aaa9a837e85b01106a54c39e42e97f62253"
+checksum = "0667304c32ea56cb4cd6d2d7c0cfe9a2f8041229db8c033af7f8d69492429def"
dependencies = [
"cfg-if",
]
+[[package]]
+name = "cpufeatures"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "cranelift-assembler-x64"
-version = "0.128.1"
+version = "0.137.1"
dependencies = [
"cranelift-assembler-x64-meta",
]
[[package]]
name = "cranelift-assembler-x64-meta"
-version = "0.128.1"
+version = "0.137.1"
dependencies = [
"cranelift-srcgen",
]
[[package]]
name = "cranelift-bforest"
-version = "0.128.1"
+version = "0.137.1"
dependencies = [
"cranelift-entity",
+ "wasmtime-internal-core",
]
[[package]]
name = "cranelift-bitset"
-version = "0.128.1"
+version = "0.137.1"
dependencies = [
"serde",
"serde_derive",
+ "wasmtime-internal-core",
]
[[package]]
name = "cranelift-codegen"
-version = "0.128.1"
+version = "0.137.1"
dependencies = [
"bumpalo",
"cranelift-assembler-x64",
@@ -419,20 +429,24 @@ dependencies = [
"cranelift-entity",
"cranelift-isle",
"gimli",
- "hashbrown 0.15.5",
+ "hashbrown 0.17.1",
+ "libm",
"log",
+ "postcard",
"pulley-interpreter",
"regalloc2",
"rustc-hash",
"serde",
+ "serde_derive",
+ "sha2",
"smallvec",
"target-lexicon",
- "wasmtime-internal-math",
+ "wasmtime-internal-core",
]
[[package]]
name = "cranelift-codegen-meta"
-version = "0.128.1"
+version = "0.137.1"
dependencies = [
"cranelift-assembler-x64-meta",
"cranelift-codegen-shared",
@@ -443,29 +457,31 @@ dependencies = [
[[package]]
name = "cranelift-codegen-shared"
-version = "0.128.1"
+version = "0.137.1"
[[package]]
name = "cranelift-control"
-version = "0.128.1"
+version = "0.137.1"
dependencies = [
"arbitrary",
]
[[package]]
name = "cranelift-entity"
-version = "0.128.1"
+version = "0.137.1"
dependencies = [
"cranelift-bitset",
"serde",
"serde_derive",
+ "wasmtime-internal-core",
]
[[package]]
name = "cranelift-frontend"
-version = "0.128.1"
+version = "0.137.1"
dependencies = [
"cranelift-codegen",
+ "hashbrown 0.17.1",
"log",
"smallvec",
"target-lexicon",
@@ -473,35 +489,36 @@ dependencies = [
[[package]]
name = "cranelift-isle"
-version = "0.128.1"
+version = "0.137.1"
[[package]]
name = "cranelift-native"
-version = "0.128.1"
+version = "0.137.1"
dependencies = [
"cranelift-codegen",
"libc",
+ "mach2",
"target-lexicon",
]
[[package]]
name = "cranelift-srcgen"
-version = "0.128.1"
+version = "0.137.1"
[[package]]
name = "crc32fast"
-version = "1.5.0"
+version = "1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
+checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64"
dependencies = [
"cfg-if",
]
[[package]]
name = "crossbeam"
-version = "0.8.4"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8"
+checksum = "e71406cd8807725f7ac2f999a4cdd32e98f829fdf65f528343cebf945e41df1e"
dependencies = [
"crossbeam-channel",
"crossbeam-deque",
@@ -512,18 +529,18 @@ dependencies = [
[[package]]
name = "crossbeam-channel"
-version = "0.5.15"
+version = "0.5.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2"
+checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-deque"
-version = "0.8.6"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
+checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
@@ -531,27 +548,37 @@ dependencies = [
[[package]]
name = "crossbeam-epoch"
-version = "0.9.18"
+version = "0.9.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
+checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-queue"
-version = "0.3.12"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115"
+checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
-version = "0.8.21"
+version = "0.8.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
+checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
[[package]]
name = "csv"
@@ -576,9 +603,9 @@ dependencies = [
[[package]]
name = "cxx"
-version = "1.0.194"
+version = "1.0.205"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "747d8437319e3a2f43d93b341c137927ca70c0f5dabeea7a005a73665e247c7e"
+checksum = "c8a02bfeba9074b2bbb39492c9b0908ec854f455a3cccdcde7a1de55e2315e40"
dependencies = [
"cc",
"cxx-build",
@@ -591,9 +618,9 @@ dependencies = [
[[package]]
name = "cxx-build"
-version = "1.0.194"
+version = "1.0.205"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0f4697d190a142477b16aef7da8a99bfdc41e7e8b1687583c0d23a79c7afc1e"
+checksum = "bbc2ac76997619d2d888b58ad79488f1c835de41ca4dd3dd7082acf4ecb0a50f"
dependencies = [
"cc",
"codespan-reporting",
@@ -601,39 +628,39 @@ dependencies = [
"proc-macro2",
"quote",
"scratch",
- "syn",
+ "syn 3.0.10",
]
[[package]]
name = "cxxbridge-cmd"
-version = "1.0.194"
+version = "1.0.205"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0956799fa8678d4c50eed028f2de1c0552ae183c76e976cf7ca8c4e36a7c328"
+checksum = "54a486ed16a3f2a053fe7f5b98db4c1a59846a23e8cb9e49f9d1bd48830d51a2"
dependencies = [
"clap",
"codespan-reporting",
"indexmap",
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.10",
]
[[package]]
name = "cxxbridge-flags"
-version = "1.0.194"
+version = "1.0.205"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23384a836ab4f0ad98ace7e3955ad2de39de42378ab487dc28d3990392cb283a"
+checksum = "c72569be94e2283764d334cd285980b747dbe221e27e315484eb6bcd93fa808a"
[[package]]
name = "cxxbridge-macro"
-version = "1.0.194"
+version = "1.0.205"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6acc6b5822b9526adfb4fc377b67128fdd60aac757cc4a741a6278603f763cf"
+checksum = "423e795284a7f7b3f843c956a5322c4bc497b60c2dd1a6339da10313cb18d575"
dependencies = [
"indexmap",
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.10",
]
[[package]]
@@ -657,7 +684,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn",
+ "syn 2.0.119",
]
[[package]]
@@ -668,7 +695,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
dependencies = [
"darling_core",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
@@ -683,12 +710,9 @@ dependencies = [
[[package]]
name = "deranged"
-version = "0.5.8"
+version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
-dependencies = [
- "powerfmt",
-]
+checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e"
[[package]]
name = "derive_builder"
@@ -708,7 +732,7 @@ dependencies = [
"darling",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
@@ -718,7 +742,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
dependencies = [
"derive_builder_core",
- "syn",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
]
[[package]]
@@ -750,9 +784,9 @@ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
[[package]]
name = "either"
-version = "1.15.0"
+version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
+checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
[[package]]
name = "embedded-io"
@@ -768,21 +802,21 @@ checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
[[package]]
name = "enum-as-inner"
-version = "0.6.1"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc"
+checksum = "0359ee92f81184d7985519e474bda2a5738476334edd3746c9b1265c067afe70"
dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "env_filter"
-version = "1.0.0"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a1c3cc8e57274ec99de65301228b537f1e4eedc1b8e0f9411c6caac8ae7308f"
+checksum = "900d271a03799a1ee8d1ca9b19893b48ca674a9284fefcfb85f05e74ed314217"
dependencies = [
"log",
"regex",
@@ -796,11 +830,11 @@ checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe"
[[package]]
name = "env_logger"
-version = "0.11.9"
+version = "0.11.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2daee4ea451f429a58296525ddf28b45a3b64f1acf6587e2067437bb11e218d"
+checksum = "de671bd27a75a797dc9ae289ba1e77276e75e2026408aab65185384e2d5cd3f6"
dependencies = [
- "anstream 0.6.21",
+ "anstream 1.0.0",
"anstyle",
"env_filter",
"jiff",
@@ -809,31 +843,25 @@ dependencies = [
[[package]]
name = "equivalent"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
+checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"
[[package]]
name = "errno"
-version = "0.3.14"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
+checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys",
]
-[[package]]
-name = "fallible-iterator"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
-
[[package]]
name = "find-msvc-tools"
-version = "0.1.9"
+version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
+checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"
[[package]]
name = "fnv"
@@ -853,6 +881,70 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
+[[package]]
+name = "futures"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
+
+[[package]]
+name = "futures-io"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
+
+[[package]]
+name = "futures-sink"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
+
+[[package]]
+name = "futures-task"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
+
+[[package]]
+name = "futures-util"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "slab",
+]
+
[[package]]
name = "fuzzy-matcher"
version = "0.3.7"
@@ -862,6 +954,16 @@ dependencies = [
"thread_local",
]
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
[[package]]
name = "getrandom"
version = "0.2.17"
@@ -887,11 +989,12 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.32.3"
+version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
+checksum = "0bf7f043f89559805f8c7cacc432749b2fa0d0a0a9ee46ce47164ed5ba7f126c"
dependencies = [
- "fallible-iterator",
+ "fnv",
+ "hashbrown 0.16.1",
"indexmap",
"stable_deref_trait",
]
@@ -905,7 +1008,6 @@ dependencies = [
"allocator-api2",
"equivalent",
"foldhash 0.1.5",
- "serde",
]
[[package]]
@@ -914,6 +1016,17 @@ version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
+[[package]]
+name = "hashbrown"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
+dependencies = [
+ "foldhash 0.2.0",
+ "serde",
+ "serde_core",
+]
+
[[package]]
name = "heck"
version = "0.5.0"
@@ -952,12 +1065,12 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "indexmap"
-version = "2.13.0"
+version = "2.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
+checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
dependencies = [
"equivalent",
- "hashbrown 0.16.1",
+ "hashbrown 0.17.1",
"serde",
"serde_core",
]
@@ -977,18 +1090,28 @@ dependencies = [
"either",
]
+[[package]]
+name = "itertools"
+version = "0.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itoa"
-version = "1.0.17"
+version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
+checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4"
[[package]]
name = "jiff"
-version = "0.2.23"
+version = "0.2.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359"
+checksum = "175dc66334db3b9ab9985bf8b61cfed50dc16d20964bb47f9e479adcae984a7f"
dependencies = [
+ "jiff-core",
"jiff-static",
"log",
"portable-atomic",
@@ -996,32 +1119,43 @@ dependencies = [
"serde_core",
]
+[[package]]
+name = "jiff-core"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e599b80292e597019b8b3e392de3f4bea2959ddfb8c7dff60e035e9e311a2c1b"
+dependencies = [
+ "log",
+]
+
[[package]]
name = "jiff-static"
-version = "0.2.23"
+version = "0.2.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4"
+checksum = "c7b1af7547d47354bc438d797e3854601bde8f8d185780c5ba4ab27afa54f1ba"
dependencies = [
+ "jiff-core",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "js-sys"
-version = "0.3.91"
+version = "0.3.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c"
+checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
dependencies = [
- "once_cell",
+ "cfg-if",
+ "futures-util",
"wasm-bindgen",
]
[[package]]
name = "lazy_static"
-version = "1.5.0"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
[[package]]
name = "leb128fmt"
@@ -1031,9 +1165,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
[[package]]
name = "libc"
-version = "0.2.183"
+version = "0.2.191"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
+checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
[[package]]
name = "libm"
@@ -1043,9 +1177,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
[[package]]
name = "libredox"
-version = "0.1.14"
+version = "0.1.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1744e39d1d6a9948f4f388969627434e31128196de472883b39f148769bfe30a"
+checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d"
dependencies = [
"libc",
]
@@ -1067,30 +1201,27 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
[[package]]
name = "log"
-version = "0.4.29"
+version = "0.4.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
+checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c"
[[package]]
name = "mach2"
-version = "0.4.3"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44"
-dependencies = [
- "libc",
-]
+checksum = "dae608c151f68243f2b000364e1f7b186d9c29845f7d2d85bd31b9ad77ad552b"
[[package]]
name = "memchr"
-version = "2.8.0"
+version = "2.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
[[package]]
name = "memfd"
-version = "0.6.5"
+version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227"
+checksum = "57804b2c9b69967f1536a56f86297e367a33b19e98852ed624b84551cdbc0d90"
dependencies = [
"rustix",
]
@@ -1101,7 +1232,7 @@ version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
dependencies = [
- "bitflags 2.11.0",
+ "bitflags 2.13.2",
"cfg-if",
"cfg_aliases",
"libc",
@@ -1109,9 +1240,9 @@ dependencies = [
[[package]]
name = "num-conv"
-version = "0.2.0"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050"
+checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
[[package]]
name = "num-traits"
@@ -1124,21 +1255,21 @@ dependencies = [
[[package]]
name = "num_threads"
-version = "0.1.7"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9"
+checksum = "cabcc654086861f9e1bc5115258de62ef92c79b20f4615a1b0cc57c4e82027d4"
dependencies = [
"libc",
]
[[package]]
name = "object"
-version = "0.37.3"
+version = "0.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
+checksum = "dd229a0361b9d0d4396176e02d65897f487eebeab7caa6d443855ee152ca0b9c"
dependencies = [
"crc32fast",
- "hashbrown 0.15.5",
+ "hashbrown 0.17.1",
"indexmap",
"memchr",
]
@@ -1163,9 +1294,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
[[package]]
name = "polyglot-sql"
-version = "0.1.13"
+version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7d17752e25da3d490c7a5d8b1f7f1c7f1583be33c8463c59f389f4160394a6e"
+checksum = "e2182e70eca8ef9207889597fec219bfa64efa2ec6ae8ead9a02bf95899fc6a4"
dependencies = [
"serde",
"serde_json",
@@ -1175,15 +1306,15 @@ dependencies = [
[[package]]
name = "portable-atomic"
-version = "1.13.1"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
+checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
[[package]]
name = "portable-atomic-util"
-version = "0.2.5"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5"
+checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715"
dependencies = [
"portable-atomic",
]
@@ -1202,9 +1333,9 @@ dependencies = [
[[package]]
name = "powerfmt"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958"
[[package]]
name = "ppv-lite86"
@@ -1217,25 +1348,25 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.106"
+version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
dependencies = [
"unicode-ident",
]
[[package]]
name = "prqlc"
-version = "0.13.10"
+version = "0.13.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8abe1a5ce31be22b91ff324a0a0bdbbba0b70474167d4fd3281c2fcc43273687"
+checksum = "43a839cca77a001d05147bc1d39e60f33df9c2b50716d54b194dcdd8ad508f5a"
dependencies = [
- "anstream 0.6.21",
+ "anstream 1.0.0",
"ariadne",
"chrono",
"csv",
"enum-as-inner",
- "itertools",
+ "itertools 0.15.0",
"log",
"prqlc-parser",
"regex",
@@ -1252,66 +1383,55 @@ dependencies = [
[[package]]
name = "prqlc-parser"
-version = "0.13.10"
+version = "0.13.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63e23243464e0cf6ba4f129c4fa3062ef4bc9388922a59c1abffd6557001bb9c"
+checksum = "464024b555e5c1dc48eca2d600e583dbeb5ff7a960b22f4346997a1b5aca3165"
dependencies = [
"chumsky",
"enum-as-inner",
- "itertools",
+ "itertools 0.15.0",
"log",
"schemars",
"semver",
"serde",
- "stacker",
"strum",
]
-[[package]]
-name = "psm"
-version = "0.1.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3852766467df634d74f0b2d7819bf8dc483a0eb2e3b0f50f756f9cfe8b0d18d8"
-dependencies = [
- "ar_archive_writer",
- "cc",
-]
-
[[package]]
name = "pulldown-cmark"
-version = "0.13.1"
+version = "0.13.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83c41efbf8f90ac44de7f3a868f0867851d261b56291732d0cbf7cceaaeb55a6"
+checksum = "3db2be46835f013dd3f4fa7f5f7402c537787b54ebb6fe2b94bbdd7e2669bb7b"
dependencies = [
- "bitflags 2.11.0",
+ "bitflags 2.13.2",
"memchr",
"unicase",
]
[[package]]
name = "pulley-interpreter"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
"cranelift-bitset",
"log",
"pulley-macros",
- "wasmtime-internal-math",
+ "wasmtime-internal-core",
]
[[package]]
name = "pulley-macros"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.10",
]
[[package]]
name = "quote"
-version = "1.0.45"
+version = "1.0.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
dependencies = [
"proc-macro2",
]
@@ -1324,9 +1444,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "rand"
-version = "0.9.2"
+version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
+checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41"
dependencies = [
"rand_chacha",
"rand_core",
@@ -1353,9 +1473,9 @@ dependencies = [
[[package]]
name = "rayon"
-version = "1.11.0"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
+checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
dependencies = [
"either",
"rayon-core",
@@ -1384,114 +1504,98 @@ dependencies = [
[[package]]
name = "ref-cast"
-version = "1.0.25"
+version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d"
+checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3"
dependencies = [
"ref-cast-impl",
]
[[package]]
name = "ref-cast-impl"
-version = "1.0.25"
+version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
+checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.10",
]
[[package]]
name = "regalloc2"
-version = "0.13.5"
+version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08effbc1fa53aaebff69521a5c05640523fab037b34a4a2c109506bc938246fa"
+checksum = "757712e8e61590d6d4f5d563483755538b5aa13467837a3b41cd9832509a7f85"
dependencies = [
"allocator-api2",
"bumpalo",
- "hashbrown 0.15.5",
+ "hashbrown 0.17.1",
"log",
"rustc-hash",
+ "serde",
"smallvec",
]
[[package]]
name = "regex"
-version = "1.12.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-automata 0.4.14",
- "regex-syntax 0.8.10",
-]
-
-[[package]]
-name = "regex-automata"
-version = "0.3.9"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9"
+checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
dependencies = [
"aho-corasick",
"memchr",
- "regex-syntax 0.7.5",
+ "regex-automata",
+ "regex-syntax",
]
[[package]]
name = "regex-automata"
-version = "0.4.14"
+version = "0.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
+checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"
dependencies = [
"aho-corasick",
"memchr",
- "regex-syntax 0.8.10",
+ "regex-syntax",
]
[[package]]
name = "regex-syntax"
-version = "0.7.5"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
-
-[[package]]
-name = "regex-syntax"
-version = "0.8.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
+checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
[[package]]
name = "rustc-demangle"
-version = "0.1.27"
+version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d"
+checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb"
[[package]]
name = "rustc-hash"
-version = "2.1.1"
+version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
+checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
[[package]]
name = "rustix"
-version = "1.1.4"
+version = "1.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
+checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa"
dependencies = [
- "bitflags 2.11.0",
+ "bitflags 2.13.2",
"errno",
"libc",
"linux-raw-sys",
- "windows-sys 0.61.2",
+ "windows-sys",
]
[[package]]
name = "rustversion"
-version = "1.0.22"
+version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
+checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
[[package]]
name = "ryu"
@@ -1501,9 +1605,9 @@ checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
[[package]]
name = "schemars"
-version = "1.2.1"
+version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc"
+checksum = "ab508826f74a77ca9d5aba6ff19b522583ee3eaf28a19384ff3d0e5835fadf6e"
dependencies = [
"dyn-clone",
"ref-cast",
@@ -1514,14 +1618,14 @@ dependencies = [
[[package]]
name = "schemars_derive"
-version = "1.2.1"
+version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d115b50f4aaeea07e79c1912f645c7513d81715d0420f8bc77a18c6260b307f"
+checksum = "e1c3a92094fa7d61aa124645844facb6b554dfc797136d0f5fd1f890e2bffc69"
dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
- "syn",
+ "syn 3.0.10",
]
[[package]]
@@ -1532,9 +1636,9 @@ checksum = "d68f2ec51b097e4c1a75b681a8bec621909b5e91f15bb7b840c4f2f7b01148b2"
[[package]]
name = "semver"
-version = "1.0.27"
+version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
+checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
dependencies = [
"serde",
"serde_core",
@@ -1542,9 +1646,9 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.228"
+version = "1.0.229"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
dependencies = [
"serde_core",
"serde_derive",
@@ -1552,40 +1656,40 @@ dependencies = [
[[package]]
name = "serde_core"
-version = "1.0.228"
+version = "1.0.229"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.228"
+version = "1.0.229"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.10",
]
[[package]]
name = "serde_derive_internals"
-version = "0.29.1"
+version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
+checksum = "f852137cce035d6a4df67ccce505ff6b3e9fd3a10e3e52b24dc71e650bb1a9bd"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.10",
]
[[package]]
name = "serde_json"
-version = "1.0.149"
+version = "1.0.154"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
+checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
dependencies = [
"itoa",
"memchr",
@@ -1594,6 +1698,17 @@ dependencies = [
"zmij",
]
+[[package]]
+name = "sha2"
+version = "0.10.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
[[package]]
name = "shell-quote"
version = "0.7.2"
@@ -1609,6 +1724,12 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+[[package]]
+name = "shlex"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
+
[[package]]
name = "skim"
version = "0.20.5"
@@ -1632,12 +1753,12 @@ dependencies = [
"rayon",
"regex",
"shell-quote",
- "shlex",
+ "shlex 1.3.0",
"skim-common",
"skim-tuikit",
"time",
"timer",
- "unicode-width 0.2.2",
+ "unicode-width 0.2.3",
"vte",
"which",
]
@@ -1660,14 +1781,20 @@ dependencies = [
"nix",
"skim-common",
"term 0.7.0",
- "unicode-width 0.2.2",
+ "unicode-width 0.2.3",
]
+[[package]]
+name = "slab"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
+
[[package]]
name = "smallvec"
-version = "1.15.1"
+version = "1.16.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
+checksum = "149309498a5f7334b12ddae0cad8aba81ce785fe91755068867e017cf98fee46"
dependencies = [
"serde",
]
@@ -1684,9 +1811,9 @@ dependencies = [
[[package]]
name = "sqlparser"
-version = "0.60.0"
+version = "0.62.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "505aa16b045c4c1375bf5f125cce3813d0176325bfe9ffc4a903f423de7774ff"
+checksum = "13c6d1b651dc4edf07eead2a0c6c78016ce971bc2c10da5266861b13f25e7cec"
dependencies = [
"log",
"serde",
@@ -1698,19 +1825,6 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
-[[package]]
-name = "stacker"
-version = "0.1.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08d74a23609d509411d10e2176dc2a4346e3b4aea2e7b1869f19fdedbc71c013"
-dependencies = [
- "cc",
- "cfg-if",
- "libc",
- "psm",
- "windows-sys 0.59.0",
-]
-
[[package]]
name = "strsim"
version = "0.11.1"
@@ -1719,30 +1833,41 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "strum"
-version = "0.27.2"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
+checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd"
dependencies = [
"strum_macros",
]
[[package]]
name = "strum_macros"
-version = "0.27.2"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7"
+checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664"
dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.119"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
]
[[package]]
name = "syn"
-version = "2.0.117"
+version = "3.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
+checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
dependencies = [
"proc-macro2",
"quote",
@@ -1751,9 +1876,9 @@ dependencies = [
[[package]]
name = "target-lexicon"
-version = "0.13.5"
+version = "0.13.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
+checksum = "8c447be3a2abfa84b2d91680c56600bd6b2873866de27b36ec911be705e291da"
[[package]]
name = "term"
@@ -1772,7 +1897,7 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8c27177b12a6399ffc08b98f76f7c9a1f4fe9fc967c784c5a071fa8d93cf7e1"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys",
]
[[package]]
@@ -1795,11 +1920,11 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.18"
+version = "2.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
+checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
dependencies = [
- "thiserror-impl 2.0.18",
+ "thiserror-impl 2.0.21",
]
[[package]]
@@ -1810,37 +1935,36 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "thiserror-impl"
-version = "2.0.18"
+version = "2.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
+checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.10",
]
[[package]]
name = "thread_local"
-version = "1.1.9"
+version = "1.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
+checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070"
dependencies = [
"cfg-if",
]
[[package]]
name = "time"
-version = "0.3.47"
+version = "0.3.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c"
+checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134"
dependencies = [
"deranged",
- "itoa",
"libc",
"num-conv",
"num_threads",
@@ -1852,15 +1976,15 @@ dependencies = [
[[package]]
name = "time-core"
-version = "0.1.8"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
+checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
[[package]]
name = "time-macros"
-version = "0.2.27"
+version = "0.2.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215"
+checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85"
dependencies = [
"num-conv",
"time-core",
@@ -1882,47 +2006,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
"pin-project-lite",
- "tracing-attributes",
"tracing-core",
]
-[[package]]
-name = "tracing-attributes"
-version = "0.1.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "tracing-core"
version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
-dependencies = [
- "once_cell",
-]
+
+[[package]]
+name = "typenum"
+version = "1.20.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
[[package]]
name = "unicase"
-version = "2.9.0"
+version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"
+checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f"
[[package]]
name = "unicode-ident"
-version = "1.0.24"
+version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
+checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
[[package]]
name = "unicode-segmentation"
-version = "1.12.0"
+version = "1.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
+checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
[[package]]
name = "unicode-width"
@@ -1932,9 +2047,9 @@ checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
[[package]]
name = "unicode-width"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
+checksum = "ca718471876992059f251e33aafc334346ada08042b7661dd1fe313a9bced557"
[[package]]
name = "unicode_categories"
@@ -1997,6 +2112,12 @@ dependencies = [
"rustversion",
]
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
[[package]]
name = "vte"
version = "0.15.0"
@@ -2015,21 +2136,20 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
name = "wasip2"
-version = "1.0.2+wasi-0.2.9"
+version = "1.0.4+wasi-0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
+checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
dependencies = [
"wit-bindgen",
]
[[package]]
name = "wasm-bindgen"
-version = "0.2.114"
+version = "0.2.130"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e"
+checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
dependencies = [
"cfg-if",
- "once_cell",
"rustversion",
"wasm-bindgen-macro",
"wasm-bindgen-shared",
@@ -2037,9 +2157,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.114"
+version = "0.2.130"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6"
+checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -2047,54 +2167,54 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.114"
+version = "0.2.130"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3"
+checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
dependencies = [
"bumpalo",
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.10",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.114"
+version = "0.2.130"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16"
+checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
dependencies = [
"unicode-ident",
]
[[package]]
name = "wasm-encoder"
-version = "0.243.0"
+version = "0.261.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c55db9c896d70bd9fa535ce83cd4e1f2ec3726b0edd2142079f594fc3be1cb35"
+checksum = "2608e8bb6d67fd68f5a8d0eb1363d6e7bcbc1f8ded5a0bd3a1e382462b876b22"
dependencies = [
"leb128fmt",
- "wasmparser 0.243.0",
+ "wasmparser 0.261.0",
]
[[package]]
name = "wasm-encoder"
-version = "0.245.1"
+version = "0.263.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9dca005e69bf015e45577e415b9af8c67e8ee3c0e38b5b0add5aa92581ed5c"
+checksum = "0b883a26aea02eaabe2d2c3fba7eb039ef5cdcb5d5201ae5551e73d5e251a81f"
dependencies = [
"leb128fmt",
- "wasmparser 0.245.1",
+ "wasmparser 0.263.0",
]
[[package]]
name = "wasmparser"
-version = "0.243.0"
+version = "0.261.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6d8db401b0528ec316dfbe579e6ab4152d61739cfe076706d2009127970159d"
+checksum = "4f20f20e44f7e8aeb6744823ea9d869ede51e51be4fdaedede2852282e54d2d8"
dependencies = [
- "bitflags 2.11.0",
- "hashbrown 0.15.5",
+ "bitflags 2.13.2",
+ "hashbrown 0.17.1",
"indexmap",
"semver",
"serde",
@@ -2102,40 +2222,37 @@ dependencies = [
[[package]]
name = "wasmparser"
-version = "0.245.1"
+version = "0.263.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f08c9adee0428b7bddf3890fc27e015ac4b761cc608c822667102b8bfd6995e"
+checksum = "4f5fa0a054ae153606df820eb0a84213e28cda41bbe04ba2628e71b6ba100fcb"
dependencies = [
- "bitflags 2.11.0",
+ "bitflags 2.13.2",
"indexmap",
"semver",
]
[[package]]
name = "wasmprinter"
-version = "0.243.0"
+version = "0.261.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb2b6035559e146114c29a909a3232928ee488d6507a1504d8934e8607b36d7b"
+checksum = "86a21c9e3325655ba02de3e645bc8357a8b3651a2e3ada25b6dbc37560deb9b7"
dependencies = [
"anyhow",
"termcolor",
- "wasmparser 0.243.0",
+ "wasmparser 0.261.0",
]
[[package]]
name = "wasmtime"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
"addr2line",
- "anyhow",
"async-trait",
- "bitflags 2.11.0",
+ "bitflags 2.13.2",
"bumpalo",
"cc",
- "cfg-if",
+ "futures",
"gimli",
- "hashbrown 0.15.5",
- "indexmap",
"libc",
"log",
"mach2",
@@ -2149,27 +2266,24 @@ dependencies = [
"serde_derive",
"smallvec",
"target-lexicon",
- "wasm-encoder 0.243.0",
- "wasmparser 0.243.0",
+ "wasm-encoder 0.261.0",
+ "wasmparser 0.261.0",
"wasmtime-environ",
+ "wasmtime-internal-core",
"wasmtime-internal-cranelift",
"wasmtime-internal-fiber",
"wasmtime-internal-jit-debug",
"wasmtime-internal-jit-icache-coherence",
- "wasmtime-internal-math",
- "wasmtime-internal-slab",
"wasmtime-internal-unwinder",
"wasmtime-internal-versioned-export-macros",
- "wasmtime-internal-winch",
"wat",
- "windows-sys 0.61.2",
+ "windows-sys",
]
[[package]]
name = "wasmtime-c-api-impl"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
- "anyhow",
"log",
"tracing",
"wasmtime",
@@ -2179,76 +2293,92 @@ dependencies = [
[[package]]
name = "wasmtime-environ"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
"anyhow",
"cpp_demangle",
+ "cranelift-bforest",
"cranelift-bitset",
"cranelift-entity",
"gimli",
+ "hashbrown 0.17.1",
"indexmap",
"log",
"object",
"postcard",
"rustc-demangle",
+ "semver",
"serde",
"serde_derive",
"smallvec",
"target-lexicon",
- "wasm-encoder 0.243.0",
- "wasmparser 0.243.0",
+ "wasm-encoder 0.261.0",
+ "wasmparser 0.261.0",
"wasmprinter",
+ "wasmtime-internal-component-util",
+ "wasmtime-internal-core",
]
[[package]]
name = "wasmtime-internal-c-api-macros"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
"proc-macro2",
"quote",
]
+[[package]]
+name = "wasmtime-internal-component-util"
+version = "50.0.1"
+
+[[package]]
+name = "wasmtime-internal-core"
+version = "50.0.1"
+dependencies = [
+ "hashbrown 0.17.1",
+ "libm",
+ "serde",
+]
+
[[package]]
name = "wasmtime-internal-cranelift"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
- "cfg-if",
"cranelift-codegen",
"cranelift-control",
"cranelift-entity",
"cranelift-frontend",
"cranelift-native",
"gimli",
- "itertools",
+ "itertools 0.14.0",
"log",
"object",
"pulley-interpreter",
"smallvec",
"target-lexicon",
- "thiserror 2.0.18",
- "wasmparser 0.243.0",
+ "thiserror 2.0.21",
+ "wasmparser 0.261.0",
"wasmtime-environ",
- "wasmtime-internal-math",
+ "wasmtime-internal-core",
"wasmtime-internal-unwinder",
"wasmtime-internal-versioned-export-macros",
]
[[package]]
name = "wasmtime-internal-fiber"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
"cc",
- "cfg-if",
"libc",
"rustix",
"wasmtime-environ",
"wasmtime-internal-versioned-export-macros",
- "windows-sys 0.61.2",
+ "windows-sys",
]
[[package]]
name = "wasmtime-internal-jit-debug"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
"cc",
"wasmtime-internal-versioned-export-macros",
@@ -2256,30 +2386,17 @@ dependencies = [
[[package]]
name = "wasmtime-internal-jit-icache-coherence"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
- "cfg-if",
"libc",
- "wasmtime-environ",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "wasmtime-internal-math"
-version = "41.0.1"
-dependencies = [
- "libm",
+ "wasmtime-internal-core",
+ "windows-sys",
]
-[[package]]
-name = "wasmtime-internal-slab"
-version = "41.0.1"
-
[[package]]
name = "wasmtime-internal-unwinder"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
- "cfg-if",
"cranelift-codegen",
"log",
"object",
@@ -2288,46 +2405,31 @@ dependencies = [
[[package]]
name = "wasmtime-internal-versioned-export-macros"
-version = "41.0.1"
+version = "50.0.1"
dependencies = [
"proc-macro2",
"quote",
- "syn",
-]
-
-[[package]]
-name = "wasmtime-internal-winch"
-version = "41.0.1"
-dependencies = [
- "cranelift-codegen",
- "gimli",
- "log",
- "object",
- "target-lexicon",
- "wasmparser 0.243.0",
- "wasmtime-environ",
- "wasmtime-internal-cranelift",
- "winch-codegen",
+ "syn 3.0.10",
]
[[package]]
name = "wast"
-version = "245.0.1"
+version = "263.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28cf1149285569120b8ce39db8b465e8a2b55c34cbb586bd977e43e2bc7300bf"
+checksum = "69d90bcf581b501aa1c358bc5dc0faa979cd375796908860ebcb6d1d70b907c7"
dependencies = [
"bumpalo",
"leb128fmt",
"memchr",
- "unicode-width 0.2.2",
- "wasm-encoder 0.245.1",
+ "unicode-width 0.2.3",
+ "wasm-encoder 0.263.0",
]
[[package]]
name = "wat"
-version = "1.245.1"
+version = "1.263.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd48d1679b6858988cb96b154dda0ec5bbb09275b71db46057be37332d5477be"
+checksum = "bbc9c5aca783b3f1838be89f3f9937c528b90ec5faa6fb62d809726c16a7d8f7"
dependencies = [
"wast",
]
@@ -2366,7 +2468,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys",
]
[[package]]
@@ -2375,24 +2477,6 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
-[[package]]
-name = "winch-codegen"
-version = "41.0.1"
-dependencies = [
- "anyhow",
- "cranelift-assembler-x64",
- "cranelift-codegen",
- "gimli",
- "regalloc2",
- "smallvec",
- "target-lexicon",
- "thiserror 2.0.18",
- "wasmparser 0.243.0",
- "wasmtime-environ",
- "wasmtime-internal-cranelift",
- "wasmtime-internal-math",
-]
-
[[package]]
name = "windows-core"
version = "0.62.2"
@@ -2414,7 +2498,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
@@ -2425,7 +2509,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
@@ -2452,15 +2536,6 @@ dependencies = [
"windows-link",
]
-[[package]]
-name = "windows-sys"
-version = "0.59.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
-dependencies = [
- "windows-targets",
-]
-
[[package]]
name = "windows-sys"
version = "0.61.2"
@@ -2470,70 +2545,6 @@ dependencies = [
"windows-link",
]
-[[package]]
-name = "windows-targets"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
-dependencies = [
- "windows_aarch64_gnullvm",
- "windows_aarch64_msvc",
- "windows_i686_gnu",
- "windows_i686_gnullvm",
- "windows_i686_msvc",
- "windows_x86_64_gnu",
- "windows_x86_64_gnullvm",
- "windows_x86_64_msvc",
-]
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
-
-[[package]]
-name = "windows_i686_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
-
[[package]]
name = "winnow"
version = "0.6.26"
@@ -2551,9 +2562,9 @@ checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904"
[[package]]
name = "wit-bindgen"
-version = "0.51.0"
+version = "0.57.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
+checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
[[package]]
name = "yansi"
@@ -2563,26 +2574,26 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049"
[[package]]
name = "zerocopy"
-version = "0.8.42"
+version = "0.8.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3"
+checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.8.42"
+version = "0.8.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f"
+checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "zmij"
-version = "1.0.21"
+version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
+checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
diff --git a/src/Access/AccessRights.cpp b/src/Access/AccessRights.cpp
index 16e8518686e0..2cb66e10b800 100644
--- a/src/Access/AccessRights.cpp
+++ b/src/Access/AccessRights.cpp
@@ -38,6 +38,10 @@ namespace
if (left.full_name.size() != right.full_name.size())
return left.full_name.size() < right.full_name.size();
+ /// Wildcards before exact names: `db*` covers `db`, so its element must be applied first.
+ if (left.wildcard != right.wildcard)
+ return left.wildcard;
+
/// Grants before partial revokes.
if (left.is_partial_revoke != right.is_partial_revoke)
return right.is_partial_revoke; /// if left is grant, right is partial revoke, we assume left < right
@@ -974,7 +978,9 @@ struct AccessRights::Node
auto grants = flags - parent_fl - grants_go;
/// Inserts into result only meaningful nodes (e.g. wildcards or leafs).
- if (target_node && (target_node->isLeaf() || target_node->wildcard_grant))
+ const bool node_meaningful = node && (node->isLeaf() || node->wildcard_grant);
+ const bool node_go_meaningful = node_go && (node_go->isLeaf() || node_go->wildcard_grant);
+ if (node_meaningful || node_go_meaningful)
{
boost::container::small_vector new_full_name = full_name;
@@ -990,19 +996,27 @@ struct AccessRights::Node
}
}
- if (node && revokes)
+ if (node_meaningful && revokes)
res.push_back(ProtoElement{revokes, new_full_name, false, true, node->wildcard_grant});
- if (node_go && revokes_go)
+ if (node_go_meaningful && revokes_go)
res.push_back(ProtoElement{revokes_go, new_full_name, true, true, node_go->wildcard_grant});
- if (node && grants)
+ if (node_meaningful && grants)
res.push_back(ProtoElement{grants, new_full_name, false, false, node->wildcard_grant});
- if (node_go && grants_go)
+ if (node_go_meaningful && grants_go)
res.push_back(ProtoElement{grants_go, new_full_name, true, false, node_go->wildcard_grant});
}
+ /// The two tries compress child names independently: a child of one can be a strict name
+ /// prefix of a child of the other, and only exactly-named pairs can be walked together.
+ if (node && node_go && node_go->children)
+ {
+ for (auto & child_go : *node_go->children)
+ node->getLeaf(child_go.node_name, child_go.level, !child_go.isLeaf());
+ }
+
if (node && node->children)
{
for (auto & child : *node->children)
@@ -1022,19 +1036,8 @@ struct AccessRights::Node
{
for (auto & child : *node_go->children)
{
- if (node && node->children)
- {
- auto starts_with = [&child](const Node & n)
- {
- if (child.isLeaf())
- return n.isLeaf();
-
- return !n.isLeaf() && child.node_name[0] == n.node_name[0];
- };
-
- if (auto it = std::find_if(node->children->begin(), node->children->end(), starts_with); it != node->children->end())
- continue; /// already processed
- }
+ if (node && node->tryGetChildNode(child.node_name))
+ continue; /// already processed
String new_path = path;
new_path.append(child.node_name);
diff --git a/src/Access/ContextAccess.cpp b/src/Access/ContextAccess.cpp
index aedfc9fa08a5..080eab0c7fa1 100644
--- a/src/Access/ContextAccess.cpp
+++ b/src/Access/ContextAccess.cpp
@@ -783,15 +783,16 @@ bool ContextAccess::checkAccessImplHelper(const ContextPtr & context, AccessFlag
const AccessFlags function_ddl = AccessType::CREATE_FUNCTION | AccessType::DROP_FUNCTION;
const AccessFlags workload_ddl = AccessType::CREATE_WORKLOAD | AccessType::DROP_WORKLOAD;
const AccessFlags resource_ddl = AccessType::CREATE_RESOURCE | AccessType::DROP_RESOURCE;
+ const AccessFlags named_collection_ddl = AccessType::CREATE_NAMED_COLLECTION | AccessType::DROP_NAMED_COLLECTION | AccessType::ALTER_NAMED_COLLECTION;
const AccessFlags table_and_dictionary_ddl = table_ddl | dictionary_ddl;
const AccessFlags table_and_dictionary_and_function_ddl = table_ddl | dictionary_ddl | function_ddl;
const AccessFlags write_table_access = AccessType::INSERT | AccessType::OPTIMIZE;
const AccessFlags write_dcl_access = AccessType::ACCESS_MANAGEMENT - AccessType::SHOW_ACCESS;
- const AccessFlags not_readonly_flags = write_table_access | table_and_dictionary_and_function_ddl | workload_ddl | resource_ddl | write_dcl_access | AccessType::SYSTEM | AccessType::KILL_QUERY;
+ const AccessFlags not_readonly_flags = write_table_access | table_and_dictionary_and_function_ddl | workload_ddl | resource_ddl | named_collection_ddl | write_dcl_access | AccessType::SYSTEM | AccessType::KILL_QUERY;
const AccessFlags not_readonly_1_flags = AccessType::CREATE_TEMPORARY_TABLE;
- const AccessFlags ddl_flags = table_ddl | dictionary_ddl | function_ddl | workload_ddl | resource_ddl;
+ const AccessFlags ddl_flags = table_ddl | dictionary_ddl | function_ddl | workload_ddl | resource_ddl | named_collection_ddl;
const AccessFlags introspection_flags = AccessType::INTROSPECTION;
};
static const PrecalculatedFlags precalc;
diff --git a/src/Access/LDAPAccessStorage.cpp b/src/Access/LDAPAccessStorage.cpp
index 939b99396c30..e0f18010b2e4 100644
--- a/src/Access/LDAPAccessStorage.cpp
+++ b/src/Access/LDAPAccessStorage.cpp
@@ -400,37 +400,36 @@ String LDAPAccessStorage::getStorageParamsJSON() const
}
+/// The read-only methods below don't lock `mutex`: `memory_storage` is synchronized by itself,
+/// and `mutex` is held by `authenticateImpl` during the network communication with the LDAP server.
+/// Waiting for it here would make lookups (e.g. the check for a name collision in `MultipleAccessStorage`)
+/// wait for unrelated LDAP authentications.
std::optional LDAPAccessStorage::findImpl(AccessEntityType type, const String & name) const
{
- std::lock_guard lock(mutex);
return memory_storage.find(type, name);
}
std::vector LDAPAccessStorage::findAllImpl(AccessEntityType type) const
{
- std::lock_guard lock(mutex);
return memory_storage.findAll(type);
}
bool LDAPAccessStorage::exists(const UUID & id) const
{
- std::lock_guard lock(mutex);
return memory_storage.exists(id);
}
AccessEntityPtr LDAPAccessStorage::readImpl(const UUID & id, bool throw_if_not_exists) const
{
- std::lock_guard lock(mutex);
return memory_storage.read(id, throw_if_not_exists);
}
std::optional> LDAPAccessStorage::readNameWithTypeImpl(const UUID & id, bool throw_if_not_exists) const
{
- std::lock_guard lock(mutex);
return memory_storage.readNameWithType(id, throw_if_not_exists);
}
diff --git a/src/Access/MultipleAccessStorage.cpp b/src/Access/MultipleAccessStorage.cpp
index c7247900b1c2..40158681c287 100644
--- a/src/Access/MultipleAccessStorage.cpp
+++ b/src/Access/MultipleAccessStorage.cpp
@@ -17,6 +17,7 @@ namespace ErrorCodes
extern const int ACCESS_ENTITY_ALREADY_EXISTS;
extern const int ACCESS_STORAGE_FOR_INSERTION_NOT_FOUND;
extern const int ACCESS_ENTITY_NOT_FOUND;
+ extern const int AUTHENTICATION_FAILED;
}
using Storage = IAccessStorage;
@@ -256,6 +257,24 @@ void MultipleAccessStorage::moveAccessEntities(const std::vector & ids, co
auto destination_storage = getStorageByName(destination_storage_name);
auto to_move = source_storage->read(ids);
+
+ /// The same name must not refer to entities in different storages, so a move is refused if any storage
+ /// other than the source one already holds the name (e.g. a user of the config with the same name).
+ /// This is checked before anything is removed from the source storage.
+ auto storages = getStoragesInternal();
+ for (const auto & entity : to_move)
+ {
+ for (const auto & other_storage : *storages)
+ {
+ if (other_storage == source_storage)
+ continue;
+ if (other_storage->find(entity->getType(), entity->getName()))
+ throw Exception(ErrorCodes::ACCESS_ENTITY_ALREADY_EXISTS, "{}: cannot move to {} because {} already exists in {}",
+ entity->formatTypeWithName(), backQuote(destination_storage_name), entity->formatTypeWithName(),
+ backQuote(other_storage->getStorageName()));
+ }
+ }
+
bool need_rollback = false;
try
@@ -397,6 +416,22 @@ bool MultipleAccessStorage::insertImpl(const UUID & id, const AccessEntityPtr &
getStorageName());
}
+ /// The same name must not refer to entities in different storages.
+ /// A replacement replaces only an entity of the destination storage, so it is refused too if another storage holds the name.
+ for (const auto & other_storage : *storages)
+ {
+ if (other_storage == storage_for_insertion)
+ continue;
+ if (auto existing_id = other_storage->find(entity->getType(), entity->getName()))
+ {
+ if (conflicting_id)
+ *conflicting_id = *existing_id;
+ if (throw_if_exists || replace_if_exists)
+ throwNameCollisionCannotInsert(entity->getType(), entity->getName(), other_storage->getStorageName());
+ return false;
+ }
+ }
+
if (storage_for_insertion->insert(id, entity, replace_if_exists, throw_if_exists, conflicting_id))
{
std::lock_guard lock{mutex};
@@ -431,9 +466,10 @@ bool MultipleAccessStorage::updateImpl(const UUID & id, const UpdateFunc & updat
return false;
}
- /// If the updating involves renaming check that the renamed entity will be accessible by name.
+ /// If the updating involves renaming check that the new name is not used in another storage:
+ /// the same name must not refer to entities in different storages.
auto storages = getStoragesInternal();
- if ((storages->size() > 1) && (storages->front() != storage_for_updating))
+ if (storages->size() > 1)
{
if (auto old_entity = storage_for_updating->tryRead(id))
{
@@ -443,7 +479,7 @@ bool MultipleAccessStorage::updateImpl(const UUID & id, const UpdateFunc & updat
for (const auto & storage : *storages)
{
if (storage == storage_for_updating)
- break;
+ continue;
if (storage->find(new_entity->getType(), new_entity->getName()))
{
throw Exception(ErrorCodes::ACCESS_ENTITY_ALREADY_EXISTS, "{}: cannot rename to {} because {} already exists in {}",
@@ -466,15 +502,62 @@ MultipleAccessStorage::authenticateImpl(const Credentials & credentials, const P
bool allow_no_password, bool allow_plaintext_password) const
{
auto storages = getStoragesInternal();
- for (size_t i = 0; i != storages->size(); ++i)
+
+ /// Users from different user directories are distinct entities, but some code identifies users by name,
+ /// so the same name must not refer to more than one user.
+ auto throw_name_collision = [&](const String & user_name, const StoragePtr & storage, const StoragePtr & other_storage) -> void
+ {
+ throw Exception(ErrorCodes::AUTHENTICATION_FAILED,
+ "User {} exists in {}, but a user with the same name also exists in {}",
+ backQuote(user_name), storage->getStorageName(), other_storage->getStorageName());
+ };
+
+ /// If a user with this name already exists, only its storage may authenticate it. Otherwise an external directory
+ /// (e.g. LDAP) could introduce a second user with the same name on login, in particular with `AlwaysAllowCredentials`,
+ /// which LDAP accepts without contacting the LDAP server.
+ ///
+ /// The same name with the same ID in several storages is one identity, not a collision: external directories
+ /// which derive both the name and the ID of a user from the verified identity (e.g. several token-based directories,
+ /// one per signing key or identity provider) each keep their own copy of the same user, and any of them may authenticate it.
+ std::vector existing_user_storages;
+ if (storages->size() > 1 && credentials.isReady())
+ {
+ std::optional existing_user_id;
+ for (const auto & storage : *storages)
+ {
+ auto user_id = storage->find(AccessEntityType::USER, credentials.getUserName());
+ if (!user_id)
+ continue;
+ if (existing_user_id && *existing_user_id != *user_id)
+ throw_name_collision(credentials.getUserName(), existing_user_storages.front(), storage);
+ existing_user_id = user_id;
+ existing_user_storages.push_back(storage);
+ }
+ }
+
+ /// The storages which may authenticate these credentials.
+ std::vector candidate_storages = existing_user_storages.empty() ? *storages : existing_user_storages;
+
+ for (size_t i = 0; i != candidate_storages.size(); ++i)
{
- const auto & storage = (*storages)[i];
- bool is_last_storage = (i == storages->size() - 1);
+ const auto & storage = candidate_storages[i];
+ bool is_last_storage = (i == candidate_storages.size() - 1);
auto auth_result = storage->authenticate(credentials, address, external_authenticators, client_info,
(throw_if_user_not_exists && is_last_storage),
allow_no_password, allow_plaintext_password);
if (auth_result)
{
+ /// Check again: a user with the same name could have appeared in another storage concurrently,
+ /// or the storage could have just introduced the user.
+ for (const auto & other_storage : *storages)
+ {
+ if (other_storage == storage)
+ continue;
+ auto other_user_id = other_storage->find(AccessEntityType::USER, auth_result->user_name);
+ if (other_user_id && *other_user_id != auth_result->user_id)
+ throw_name_collision(auth_result->user_name, storage, other_storage);
+ }
+
std::lock_guard lock{mutex};
ids_cache.set(auth_result->user_id, storage);
return auth_result;
diff --git a/src/Access/tests/gtest_access_rights_ops.cpp b/src/Access/tests/gtest_access_rights_ops.cpp
index 7e6f3362a902..25a0b13b2108 100644
--- a/src/Access/tests/gtest_access_rights_ops.cpp
+++ b/src/Access/tests/gtest_access_rights_ops.cpp
@@ -96,13 +96,13 @@ TEST(AccessRights, GrantWildcard)
root.grantWildcard(AccessType::INSERT, "default", "t");
ASSERT_EQ(root.isGranted(AccessType::SELECT, "default", "t"), true);
ASSERT_EQ(root.isGranted(AccessType::INSERT, "default", "t"), true);
- ASSERT_EQ(root.toString(), "GRANT SELECT ON default.t, GRANT INSERT ON default.t*");
+ ASSERT_EQ(root.toString(), "GRANT INSERT ON default.t*, GRANT SELECT ON default.t");
root.revoke(AccessType::INSERT, "default", "t");
ASSERT_EQ(root.isGranted(AccessType::SELECT, "default", "t"), true);
ASSERT_EQ(root.isGranted(AccessType::INSERT, "default", "t"), false);
ASSERT_EQ(root.isGranted(AccessType::INSERT, "default", "test"), true);
- ASSERT_EQ(root.toString(), "GRANT SELECT ON default.t, GRANT INSERT ON default.t*, REVOKE INSERT ON default.t");
+ ASSERT_EQ(root.toString(), "GRANT INSERT ON default.t*, GRANT SELECT ON default.t, REVOKE INSERT ON default.t");
root = {};
root.grant(AccessType::SELECT, "default", "t");
@@ -235,6 +235,51 @@ TEST(AccessRights, GrantWildcard)
ASSERT_EQ(root.toString(), "GRANT SELECT ON db*.* WITH GRANT OPTION, GRANT INSERT ON db.`table`");
}
+TEST(AccessRights, WildcardBeforeExactNameInElements)
+{
+ /// The elements are applied in the order of `getElements`, so `REVOKE ... ON dbx*.*` must precede `GRANT ... ON dbx.*`.
+ AccessRights root;
+ root.grantWildcard(AccessType::SELECT, "db");
+ root.revokeWildcard(AccessType::SELECT, "dbx");
+ root.grant(AccessType::SELECT, "dbx");
+ ASSERT_EQ(root.toString(), "GRANT SELECT ON db*.*, REVOKE SELECT ON dbx*.*, GRANT SELECT ON dbx.*");
+ AccessRights restored{root.getElements()};
+ ASSERT_TRUE(restored.isGranted(AccessType::SELECT, "dbx"));
+ ASSERT_FALSE(restored.isGranted(AccessType::SELECT, "dbx1"));
+ ASSERT_EQ(restored, root);
+
+ root = {};
+ root.grant(AccessType::SELECT, "db");
+ root.revokeWildcard(AccessType::SELECT, "db", "t");
+ root.grant(AccessType::SELECT, "db", "t");
+ ASSERT_EQ(root.toString(), "GRANT SELECT ON db.*, REVOKE SELECT ON db.t*, GRANT SELECT ON db.t");
+ restored = AccessRights{root.getElements()};
+ ASSERT_TRUE(restored.isGranted(AccessType::SELECT, "db", "t"));
+ ASSERT_FALSE(restored.isGranted(AccessType::SELECT, "db", "t1"));
+ ASSERT_EQ(restored, root);
+
+ root = {};
+ root.grantWithGrantOption(AccessType::SELECT);
+ root.revokeWildcardGrantOption(AccessType::SELECT, "db");
+ root.grantWithGrantOption(AccessType::SELECT, "db");
+ ASSERT_EQ(root.toString(),
+ "GRANT SELECT ON *.* WITH GRANT OPTION, REVOKE GRANT OPTION SELECT ON db*.*, GRANT SELECT ON db.* WITH GRANT OPTION");
+ restored = AccessRights{root.getElements()};
+ ASSERT_TRUE(restored.hasGrantOption(AccessType::SELECT, "db"));
+ ASSERT_FALSE(restored.hasGrantOption(AccessType::SELECT, "db1"));
+ ASSERT_EQ(restored, root);
+
+ /// The same after a union, like the rights of two roles.
+ AccessRights lhs;
+ AccessRights rhs;
+ lhs.grant(AccessType::SELECT);
+ lhs.revokeWildcard(AccessType::SELECT, "db");
+ rhs.grant(AccessType::SELECT, "db");
+ lhs.makeUnion(rhs);
+ ASSERT_EQ(lhs.toString(), "GRANT SELECT ON *.*, REVOKE SELECT ON db*.*, GRANT SELECT ON db.*");
+ ASSERT_TRUE(AccessRights{lhs.getElements()}.isGranted(AccessType::SELECT, "db"));
+}
+
TEST(AccessRights, Union)
{
AccessRights lhs;
@@ -598,6 +643,55 @@ TEST(AccessRights, ParialRevokeWithGrantOption)
ASSERT_TRUE(root.isGranted(AccessType::SELECT, "default", "zoo"));
}
+TEST(AccessRights, PartialRevokeGrantOptionWithSharedPrefix)
+{
+ /// Each arm pairs a grant-option-only revoke whose name shares a prefix with a plain revoke
+ /// (the shape that used to be dropped) with a control name that shares nothing.
+
+ /// Database level.
+ AccessRights root;
+ root.grantWithGrantOption(AccessType::SELECT);
+ root.revoke(AccessType::SELECT, "db1");
+ root.revokeGrantOption(AccessType::SELECT, "db2");
+ root.revokeGrantOption(AccessType::SELECT, "zdb2");
+ ASSERT_EQ(root.toString(), "GRANT SELECT ON *.* WITH GRANT OPTION, REVOKE SELECT ON db1.*, "
+ "REVOKE GRANT OPTION SELECT ON db2.*, REVOKE GRANT OPTION SELECT ON zdb2.*");
+
+ /// Database level, grant-option name is a strict prefix of the plain one.
+ root = {};
+ root.grantWithGrantOption(AccessType::SELECT);
+ root.revoke(AccessType::SELECT, "dbx");
+ root.revokeGrantOption(AccessType::SELECT, "db");
+ ASSERT_EQ(root.toString(), "GRANT SELECT ON *.* WITH GRANT OPTION, REVOKE GRANT OPTION SELECT ON db.*, "
+ "REVOKE SELECT ON dbx.*");
+
+ /// Table level.
+ root = {};
+ root.grantWithGrantOption(AccessType::SELECT);
+ root.revoke(AccessType::SELECT, "d", "t1");
+ root.revokeGrantOption(AccessType::SELECT, "d", "t2");
+ root.revokeGrantOption(AccessType::SELECT, "d", "zt2");
+ ASSERT_EQ(root.toString(), "GRANT SELECT ON *.* WITH GRANT OPTION, REVOKE SELECT ON d.t1, "
+ "REVOKE GRANT OPTION SELECT ON d.t2, REVOKE GRANT OPTION SELECT ON d.zt2");
+
+ /// Column level.
+ root = {};
+ root.grantWithGrantOption(AccessType::SELECT);
+ root.revoke(AccessType::SELECT, "d", "t", "c1");
+ root.revokeGrantOption(AccessType::SELECT, "d", "t", "c2");
+ root.revokeGrantOption(AccessType::SELECT, "d", "t", "zc2");
+ ASSERT_EQ(root.toString(), "GRANT SELECT ON *.* WITH GRANT OPTION, REVOKE SELECT(c1) ON d.t, "
+ "REVOKE GRANT OPTION SELECT(c2, zc2) ON d.t");
+
+ /// Wildcard grant-option revoke whose name is a strict prefix of the plain one.
+ root = {};
+ root.grantWithGrantOption(AccessType::SELECT);
+ root.revoke(AccessType::SELECT, "dbx1");
+ root.revokeWildcardGrantOption(AccessType::SELECT, "db");
+ ASSERT_EQ(root.toString(), "GRANT SELECT ON *.* WITH GRANT OPTION, REVOKE GRANT OPTION SELECT ON db*.*, "
+ "REVOKE SELECT ON dbx1.*");
+}
+
TEST(AccessRights, WildcardGrantEdgeCases)
{
AccessRights root;
diff --git a/src/AggregateFunctions/Combinators/AggregateFunctionCombinatorsArgMinArgMax.cpp b/src/AggregateFunctions/Combinators/AggregateFunctionCombinatorsArgMinArgMax.cpp
index eea1590813d0..8d6467666f88 100644
--- a/src/AggregateFunctions/Combinators/AggregateFunctionCombinatorsArgMinArgMax.cpp
+++ b/src/AggregateFunctions/Combinators/AggregateFunctionCombinatorsArgMinArgMax.cpp
@@ -25,6 +25,10 @@ struct AggregateFunctionCombinatorArgMinArgMaxData
SingleValueDataBase & data() { return v_data.get(); }
const SingleValueDataBase & data() const { return v_data.get(); }
+
+ /// False after the nested state is destroyed until it is created again, so a throwing nested `create` does not lead
+ /// to a second nested `destroy`.
+ bool nested_created = true;
};
template
@@ -49,6 +53,19 @@ class AggregateFunctionCombinatorArgMinArgMax final : public IAggregateFunctionH
return *reinterpret_cast(place + key_offset);
}
+ /// Replaces the nested state with an empty one.
+ void resetNested(AggregateDataPtr __restrict place) const
+ {
+ auto & key = data(place);
+ if (key.nested_created)
+ {
+ nested_function->destroy(place);
+ key.nested_created = false;
+ }
+ nested_function->create(place);
+ key.nested_created = true;
+ }
+
public:
AggregateFunctionCombinatorArgMinArgMax(AggregateFunctionPtr nested_function_, const DataTypes & arguments, const Array & params)
: IAggregateFunctionHelper>{arguments, params, nested_function_->getResultType()}
@@ -108,19 +125,31 @@ class AggregateFunctionCombinatorArgMinArgMax final : public IAggregateFunctionH
void create(AggregateDataPtr __restrict place) const override
{
nested_function->create(place);
- new (place + key_offset) Key(key_type);
+ try
+ {
+ new (place + key_offset) Key(key_type);
+ }
+ catch (...)
+ {
+ nested_function->destroy(place);
+ throw;
+ }
}
void destroy(AggregateDataPtr __restrict place) const noexcept override
{
+ const bool nested_created = data(place).nested_created;
data(place).~Key();
- nested_function->destroy(place);
+ if (nested_created)
+ nested_function->destroy(place);
}
void destroyUpToState(AggregateDataPtr __restrict place) const noexcept override
{
+ const bool nested_created = data(place).nested_created;
data(place).~Key();
- nested_function->destroyUpToState(place);
+ if (nested_created)
+ nested_function->destroyUpToState(place);
}
void add(AggregateDataPtr __restrict place, const IColumn ** columns, size_t row_num, Arena * arena) const override
@@ -128,8 +157,7 @@ class AggregateFunctionCombinatorArgMinArgMax final : public IAggregateFunctionH
if ((isMin && data(place).data().setIfSmaller(*columns[key_col], row_num, arena))
|| (!isMin && data(place).data().setIfGreater(*columns[key_col], row_num, arena)))
{
- nested_function->destroy(place);
- nested_function->create(place);
+ resetNested(place);
nested_function->add(place, columns, row_num, arena);
}
else if (data(place).data().isEqualTo(*columns[key_col], row_num))
@@ -143,8 +171,7 @@ class AggregateFunctionCombinatorArgMinArgMax final : public IAggregateFunctionH
if ((isMin && data(place).data().setIfSmaller(data(rhs).data(), arena))
|| (!isMin && data(place).data().setIfGreater(data(rhs).data(), arena)))
{
- nested_function->destroy(place);
- nested_function->create(place);
+ resetNested(place);
nested_function->merge(place, rhs, arena);
}
else if (data(place).data().isEqualTo(data(rhs).data()))
diff --git a/src/AggregateFunctions/Combinators/AggregateFunctionDistinct.h b/src/AggregateFunctions/Combinators/AggregateFunctionDistinct.h
index 8eb7300a9e30..5a8c1da8ac5c 100644
--- a/src/AggregateFunctions/Combinators/AggregateFunctionDistinct.h
+++ b/src/AggregateFunctions/Combinators/AggregateFunctionDistinct.h
@@ -257,7 +257,15 @@ class AggregateFunctionDistinct final : public IAggregateFunctionDataHelpercreate(getNestedPlace(place));
+ try
+ {
+ nested_func->create(getNestedPlace(place));
+ }
+ catch (...)
+ {
+ this->data(place).~Data();
+ throw;
+ }
}
void destroy(AggregateDataPtr __restrict place) const noexcept override
diff --git a/src/AggregateFunctions/Combinators/AggregateFunctionMap.cpp b/src/AggregateFunctions/Combinators/AggregateFunctionMap.cpp
index 19d26afcdad2..4c2dd3634462 100644
--- a/src/AggregateFunctions/Combinators/AggregateFunctionMap.cpp
+++ b/src/AggregateFunctions/Combinators/AggregateFunctionMap.cpp
@@ -8,6 +8,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -306,7 +307,19 @@ class AggregateFunctionMap final
KeyType key{};
this->data(place).readKey(key, buf);
-
+ if constexpr (std::is_same_v)
+ {
+ /// `keyAt` reads exactly N bytes of a `FixedString(N)` key, so a key of another length
+ /// could never be found again (e.g. by `rollbackInsertResult`).
+ if (key_type->getTypeId() == TypeIndex::FixedString)
+ {
+ const size_t n = assert_cast(*key_type).getN();
+ if (key.size() != n)
+ throw Exception(ErrorCodes::INCORRECT_DATA,
+ "Key of size {} in the serialized state of aggregate function {} does not match its type {}",
+ key.size(), getName(), key_type->getName());
+ }
+ }
/// Take the slot before creating the state. `emplace` on a key that is already present
/// does not insert, so creating first would abandon the fresh state: nothing would
/// reference it and `destroyImpl` walks only `merged_maps`. `serialize` writes each key
diff --git a/src/AggregateFunctions/SingleValueData.cpp b/src/AggregateFunctions/SingleValueData.cpp
index d5767ab9d07d..fbead839a698 100644
--- a/src/AggregateFunctions/SingleValueData.cpp
+++ b/src/AggregateFunctions/SingleValueData.cpp
@@ -1224,6 +1224,14 @@ void SingleValueDataString::read(ReadBuffer & buf, const ISerialization & /*seri
}
else
{
+ /// The buffer was allocated for `size - 1` bytes above, so it may have no room for the appended byte.
+ if (capacity < size)
+ {
+ /// Arena allocations remain valid until the Arena is destroyed.
+ const char * old_data = large_data;
+ allocateLargeDataIfNeeded(size, arena);
+ memcpy(large_data, old_data, size - 1);
+ }
large_data[size - 1] = last_char;
}
++size;
diff --git a/src/AggregateFunctions/WindowFunction.h b/src/AggregateFunctions/WindowFunction.h
index 27a25ebe6384..1128a4ae484b 100644
--- a/src/AggregateFunctions/WindowFunction.h
+++ b/src/AggregateFunctions/WindowFunction.h
@@ -53,6 +53,10 @@ struct WindowFunctionWorkspace
// Will not be initialized for a pure window function.
mutable AlignedBuffer aggregate_function_state;
+ /// False after the state is destroyed until it is created again, so a throwing `create` does not lead to a second
+ /// `destroy`.
+ bool aggregate_function_state_created = false;
+
// Argument columns. Be careful, this is a per-block cache.
VectorWithMemoryTracking argument_columns;
UInt64 cached_block_number = std::numeric_limits::max();
diff --git a/src/Analyzer/FunctionNode.h b/src/Analyzer/FunctionNode.h
index 0ec99c9ab40c..b30b2905532b 100644
--- a/src/Analyzer/FunctionNode.h
+++ b/src/Analyzer/FunctionNode.h
@@ -217,6 +217,9 @@ class FunctionNode final : public IQueryTreeNode
settings_changes = std::move(settings_changes_);
}
+ /// Whether `convertToNullable` was called, also when the result type cannot be `Nullable` and did not change.
+ bool isConvertedToNullable() const { return wrap_with_nullable; }
+
void dumpTreeImpl(WriteBuffer & buffer, FormatState & format_state, size_t indent) const override;
protected:
diff --git a/src/Analyzer/Passes/IfChainToMultiIfPass.cpp b/src/Analyzer/Passes/IfChainToMultiIfPass.cpp
index 067e9caa6f59..4f7c5de8c202 100644
--- a/src/Analyzer/Passes/IfChainToMultiIfPass.cpp
+++ b/src/Analyzer/Passes/IfChainToMultiIfPass.cpp
@@ -3,9 +3,13 @@
#include
#include
+#include
+#include
#include
#include
+#include
+
namespace DB
{
namespace Setting
@@ -18,6 +22,39 @@ namespace Setting
namespace
{
+/// The `if` nodes of the query, outside of its subqueries, that are `GROUP BY` keys, collected before any of them is rewritten.
+std::unordered_set collectGroupByKeyIfNodes(const QueryNode & query_node)
+{
+ auto is_if = [](const QueryTreeNodePtr & node)
+ {
+ const auto * function_node = node->as();
+ return function_node && function_node->getFunctionName() == "if" && function_node->getArguments().getNodes().size() == 3;
+ };
+
+ auto if_keys = getGroupByKeys(query_node);
+ std::erase_if(if_keys, [&](const auto & key) { return !is_if(key); });
+
+ std::unordered_set result;
+ if (if_keys.empty())
+ return result;
+
+ std::vector nodes{&query_node};
+ while (!nodes.empty())
+ {
+ const auto * node = nodes.back();
+ nodes.pop_back();
+ for (const auto & child : node->getChildren())
+ {
+ if (!child || child->getNodeType() == QueryTreeNodeType::QUERY || child->getNodeType() == QueryTreeNodeType::UNION)
+ continue;
+ if (is_if(child) && isGroupByKeyAfterAggregation(child, if_keys))
+ result.insert(child);
+ nodes.push_back(child.get());
+ }
+ }
+ return result;
+}
+
class IfChainToMultiIfPassVisitor : public InDepthQueryTreeVisitorWithContext
{
public:
@@ -27,10 +64,19 @@ class IfChainToMultiIfPassVisitor : public InDepthQueryTreeVisitorWithContextas())
+ {
+ group_by_key_if_nodes_stack.push_back(
+ getSettings()[Setting::optimize_if_chain_to_multiif] ? collectGroupByKeyIfNodes(*query_node) : std::unordered_set{});
+ return;
+ }
+
if (!getSettings()[Setting::optimize_if_chain_to_multiif])
return;
@@ -52,6 +98,10 @@ class IfChainToMultiIfPassVisitor : public InDepthQueryTreeVisitorWithContextgetFunctionName() != "if" || if_chain_function_node->getArguments().getNodes().size() != 3)
break;
+ /// A `GROUP BY` key is read from the aggregation result, so it is not spliced into the chain.
+ if (if_chain_function_node->isConvertedToNullable() || group_by_key_if_nodes_stack.back().contains(if_chain_node))
+ break;
+
/// Replace last `multiIf` argument with `if` function arguments
multi_if_arguments.pop_back();
@@ -79,8 +129,17 @@ class IfChainToMultiIfPassVisitor : public InDepthQueryTreeVisitorWithContextgetNodeType() == QueryTreeNodeType::QUERY)
+ group_by_key_if_nodes_stack.pop_back();
+ }
+
private:
FunctionOverloadResolverPtr multi_if_function_ptr;
+
+ /// For each enclosing query, its `if` nodes that are `GROUP BY` keys; the first set is for an expression outside of any query.
+ std::vector> group_by_key_if_nodes_stack;
};
}
diff --git a/src/Analyzer/Passes/OptimizeKeyExpressionsUtils.cpp b/src/Analyzer/Passes/OptimizeKeyExpressionsUtils.cpp
new file mode 100644
index 000000000000..39ea2a9457b7
--- /dev/null
+++ b/src/Analyzer/Passes/OptimizeKeyExpressionsUtils.cpp
@@ -0,0 +1,41 @@
+#include
+
+#include
+
+#include
+#include
+#include
+#include
+
+namespace DB
+{
+
+QueryTreeNodes getGroupByKeys(const QueryNode & query_node)
+{
+ QueryTreeNodes keys;
+ if (!query_node.hasGroupBy())
+ return keys;
+
+ for (const auto & node : query_node.getGroupBy().getNodes())
+ {
+ if (query_node.isGroupByWithGroupingSets())
+ {
+ const auto & grouping_set_keys = node->as().getNodes();
+ keys.insert(keys.end(), grouping_set_keys.begin(), grouping_set_keys.end());
+ }
+ else
+ {
+ keys.push_back(node);
+ }
+ }
+ return keys;
+}
+
+bool isGroupByKeyAfterAggregation(const QueryTreeNodePtr & node, const QueryTreeNodes & group_by_keys)
+{
+ if (const auto * function_node = node->as(); function_node && function_node->isConvertedToNullable())
+ return true;
+ return std::ranges::any_of(group_by_keys, [&](const auto & key) { return compareGroupByKeys(node, key); });
+}
+
+}
diff --git a/src/Analyzer/Passes/OptimizeKeyExpressionsUtils.h b/src/Analyzer/Passes/OptimizeKeyExpressionsUtils.h
new file mode 100644
index 000000000000..352cfb757081
--- /dev/null
+++ b/src/Analyzer/Passes/OptimizeKeyExpressionsUtils.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include
+
+namespace DB
+{
+
+class QueryNode;
+
+/// The `GROUP BY` keys of `query_node`, of all grouping sets.
+QueryTreeNodes getGroupByKeys(const QueryNode & query_node);
+
+/// Returns true if `node`, in an expression computed after `GROUP BY`, is a key, read from the aggregation result.
+/// Under `group_by_use_nulls` the analyzer replaces a key there with a copy converted to `Nullable`, not equal to the key.
+bool isGroupByKeyAfterAggregation(const QueryTreeNodePtr & node, const QueryTreeNodes & group_by_keys);
+
+}
diff --git a/src/Analyzer/Passes/OrderByTupleEliminationPass.cpp b/src/Analyzer/Passes/OrderByTupleEliminationPass.cpp
index 7c1060821240..e346bbea180d 100644
--- a/src/Analyzer/Passes/OrderByTupleEliminationPass.cpp
+++ b/src/Analyzer/Passes/OrderByTupleEliminationPass.cpp
@@ -2,6 +2,7 @@
#include
#include
+#include
#include
#include
#include
@@ -21,13 +22,17 @@ class OrderByTupleEliminationVisitor : public InDepthQueryTreeVisitorhasOrderBy())
return;
+ const auto group_by_keys = getGroupByKeys(*query_node);
+
QueryTreeNodes result_nodes;
for (auto & sort_node : query_node->getOrderBy().getNodes())
{
auto & sort_node_typed = sort_node->as();
auto * function_expression = sort_node_typed.getExpression()->as();
- if (sort_node_typed.withFill() || !function_expression || function_expression->getFunctionName() != "tuple")
+ /// Splitting a key would read its arguments, which do not exist after aggregation.
+ if (sort_node_typed.withFill() || !function_expression || function_expression->getFunctionName() != "tuple"
+ || isGroupByKeyAfterAggregation(sort_node_typed.getExpression(), group_by_keys))
{
result_nodes.push_back(sort_node);
continue;
diff --git a/src/Analyzer/Passes/RewriteAggregateFunctionWithIfPass.cpp b/src/Analyzer/Passes/RewriteAggregateFunctionWithIfPass.cpp
index 4e1dec0a9b27..009499e1bcfc 100644
--- a/src/Analyzer/Passes/RewriteAggregateFunctionWithIfPass.cpp
+++ b/src/Analyzer/Passes/RewriteAggregateFunctionWithIfPass.cpp
@@ -20,11 +20,70 @@ namespace DB
namespace Setting
{
extern const SettingsBool optimize_rewrite_aggregate_function_with_if;
+ extern const SettingsShortCircuitFunctionEvaluation short_circuit_function_evaluation;
}
namespace
{
+/// A branch of `if` runs only on the rows its condition selects when lazy execution picks it up.
+/// A nested short-circuit mask is not assumed to protect the rows the outer condition excluded, so
+/// the walk continues through it.
+bool branchCanBeSkippedByShortCircuit(const QueryTreeNodePtr & branch, bool every_function_is_lazy)
+{
+ std::vector nodes_to_process;
+ nodes_to_process.push_back(branch.get());
+
+ while (!nodes_to_process.empty())
+ {
+ const auto * node = nodes_to_process.back();
+ nodes_to_process.pop_back();
+
+ /// A constant is already evaluated when the query tree is built, so it cannot throw per row.
+ if (node->as())
+ continue;
+
+ /// A table expression or a subquery in an argument slot is evaluated in its own scope, as a
+ /// set or a scalar, so lazy execution of this expression never reaches inside it.
+ switch (node->getNodeType())
+ {
+ case QueryTreeNodeType::TABLE:
+ case QueryTreeNodeType::TABLE_FUNCTION:
+ case QueryTreeNodeType::QUERY:
+ case QueryTreeNodeType::UNION:
+ continue;
+ default:
+ break;
+ }
+
+ if (const auto * function_node = node->as())
+ {
+ if (auto function_base = function_node->getFunction())
+ {
+ if (every_function_is_lazy)
+ return true;
+
+ /// getArgumentColumns describes each slot the way the resolver did, so the `in`
+ /// right-hand side is reported as a set instead of being asked for a result type.
+ const auto argument_columns = function_node->getArgumentColumns();
+ DataTypesWithConstInfo argument_types;
+ argument_types.reserve(argument_columns.size());
+ for (const auto & argument_column : argument_columns)
+ argument_types.push_back({argument_column.type, argument_column.column != nullptr});
+
+ if (function_base->isSuitableForShortCircuitArgumentsExecution(argument_types))
+ return true;
+ }
+ }
+
+ for (const auto & child : node->getChildren())
+ if (child)
+ nodes_to_process.push_back(child.get());
+ }
+
+ return false;
+}
+
class RewriteAggregateFunctionWithIfVisitor : public InDepthQueryTreeVisitorWithContext
{
public:
@@ -57,6 +116,18 @@ class RewriteAggregateFunctionWithIfVisitor : public InDepthQueryTreeVisitorWith
auto if_arguments_nodes = if_node->getArguments().getNodes();
auto * first_const_node = if_arguments_nodes[1]->as();
auto * second_const_node = if_arguments_nodes[2]->as();
+
+ const auto short_circuit = getSettings()[Setting::short_circuit_function_evaluation];
+ if (short_circuit != ShortCircuitFunctionEvaluation::DISABLE && (second_const_node || first_const_node))
+ {
+ /// The -If combinator evaluates its argument for every row, so lifting a branch that lazy
+ /// execution would have skipped makes a throwing expression run on the rows the condition
+ /// excluded.
+ const auto & lifted_branch = second_const_node ? if_arguments_nodes[1] : if_arguments_nodes[2];
+ if (branchCanBeSkippedByShortCircuit(lifted_branch, short_circuit == ShortCircuitFunctionEvaluation::FORCE_ENABLE))
+ return;
+ }
+
if (second_const_node)
{
const auto & second_const_value = second_const_node->getValue();
diff --git a/src/Analyzer/Resolve/IdentifierLookup.h b/src/Analyzer/Resolve/IdentifierLookup.h
index 9c6176cb4a95..25e20f6214fc 100644
--- a/src/Analyzer/Resolve/IdentifierLookup.h
+++ b/src/Analyzer/Resolve/IdentifierLookup.h
@@ -46,6 +46,13 @@ struct IdentifierLookup
IdentifierLookupContext lookup_context;
ASTPtr original_ast_node = nullptr;
+ /// Join tree resolution of an expression identifier that binds to columns of several joined tables
+ /// returns a result with `ambiguous_in_join_tree` set instead of throwing `AMBIGUOUS_IDENTIFIER`.
+ /// The caller decides whether another resolution path (aliases) can take over.
+ /// Participates in comparison and hashing, so such a lookup does not share an identifier resolve
+ /// cache entry with an ordinary expression lookup.
+ bool allow_ambiguous_join_tree_identifier = false;
+
bool isExpressionLookup() const
{
return lookup_context == IdentifierLookupContext::EXPRESSION;
@@ -69,7 +76,9 @@ struct IdentifierLookup
inline bool operator==(const IdentifierLookup & lhs, const IdentifierLookup & rhs)
{
- return lhs.identifier.getFullName() == rhs.identifier.getFullName() && lhs.lookup_context == rhs.lookup_context;
+ return lhs.identifier.getFullName() == rhs.identifier.getFullName()
+ && lhs.lookup_context == rhs.lookup_context
+ && lhs.allow_ambiguous_join_tree_identifier == rhs.allow_ambiguous_join_tree_identifier;
}
[[maybe_unused]] inline bool operator!=(const IdentifierLookup & lhs, const IdentifierLookup & rhs)
@@ -81,7 +90,9 @@ struct IdentifierLookupHash
{
size_t operator()(const IdentifierLookup & identifier_lookup) const
{
- return std::hash()(identifier_lookup.identifier.getFullName()) ^ static_cast(identifier_lookup.lookup_context);
+ return std::hash()(identifier_lookup.identifier.getFullName())
+ ^ static_cast(identifier_lookup.lookup_context)
+ ^ (static_cast(identifier_lookup.allow_ambiguous_join_tree_identifier) << 9);
}
};
@@ -120,6 +131,15 @@ struct IdentifierResolveResult
QueryTreeNodePtr resolved_identifier;
IdentifierResolvePlace resolve_place = IdentifierResolvePlace::NONE;
+ /// Only for lookups with `allow_ambiguous_join_tree_identifier`: the identifier binds to columns
+ /// of several joined tables, so `resolved_identifier` is empty and no join tree column may win.
+ bool ambiguous_in_join_tree = false;
+
+ static IdentifierResolveResult ambiguousInJoinTree()
+ {
+ return { .resolved_identifier = nullptr, .resolve_place = IdentifierResolvePlace::NONE, .ambiguous_in_join_tree = true };
+ }
+
explicit operator bool() const
{
chassert(check_invariant());
@@ -160,7 +180,7 @@ struct IdentifierResolveResult
{
if (!resolved_identifier)
{
- buffer << "unresolved";
+ buffer << (ambiguous_in_join_tree ? "ambiguous" : "unresolved");
return;
}
diff --git a/src/Analyzer/Resolve/IdentifierResolver.cpp b/src/Analyzer/Resolve/IdentifierResolver.cpp
index 62655bb77430..b3fa657aefb6 100644
--- a/src/Analyzer/Resolve/IdentifierResolver.cpp
+++ b/src/Analyzer/Resolve/IdentifierResolver.cpp
@@ -927,6 +927,8 @@ IdentifierResolveResult IdentifierResolver::tryResolveIdentifierFromCrossJoin(co
for (const auto & expr : from_cross_join_node.getTableExpressions())
{
auto identifier = tryResolveIdentifierFromJoinTreeNode(identifier_lookup, expr, scope);
+ if (identifier.ambiguous_in_join_tree)
+ return identifier;
if (!identifier)
continue;
@@ -963,6 +965,9 @@ IdentifierResolveResult IdentifierResolver::tryResolveIdentifierFromCrossJoin(co
}
else if (!prefer_left_table)
{
+ if (identifier_lookup.allow_ambiguous_join_tree_identifier)
+ return IdentifierResolveResult::ambiguousInJoinTree();
+
throw Exception(ErrorCodes::AMBIGUOUS_IDENTIFIER,
"JOIN {} ambiguous identifier '{}'. In scope {}",
table_expression_node->formatASTForErrorMessage(),
@@ -1065,12 +1070,14 @@ IdentifierResolveResult IdentifierResolver::tryResolveIdentifierFromJoin(const I
}
}
+ bool ambiguous_in_join_tree = false;
auto try_resolve_identifier_from_join_tree_node = [&](const QueryTreeNodePtr & join_tree_node, bool may_be_override_by_using_column)
{
if (may_be_override_by_using_column && !join_using_column_name_to_column_node.empty())
scope.join_using_columns.push_back(&join_using_column_name_to_column_node);
auto res = tryResolveIdentifierFromJoinTreeNode(identifier_lookup, join_tree_node, scope);
+ ambiguous_in_join_tree |= res.ambiguous_in_join_tree;
if (may_be_override_by_using_column && !join_using_column_name_to_column_node.empty())
scope.join_using_columns.pop_back();
@@ -1081,6 +1088,9 @@ IdentifierResolveResult IdentifierResolver::tryResolveIdentifierFromJoin(const I
auto left_resolved_identifier = try_resolve_identifier_from_join_tree_node(from_join_node.getLeftTableExpression(), join_kind == JoinKind::Right);
auto right_resolved_identifier = try_resolve_identifier_from_join_tree_node(from_join_node.getRightTableExpression(), join_kind != JoinKind::Right);
+ if (ambiguous_in_join_tree)
+ return IdentifierResolveResult::ambiguousInJoinTree();
+
if (!identifier_lookup.isExpressionLookup())
{
if (left_resolved_identifier && right_resolved_identifier)
@@ -1267,6 +1277,10 @@ IdentifierResolveResult IdentifierResolver::tryResolveIdentifierFromJoin(const I
resolved_side = JoinTableSide::Left;
resolved_identifier = left_resolved_identifier;
}
+ else if (identifier_lookup.allow_ambiguous_join_tree_identifier)
+ {
+ return IdentifierResolveResult::ambiguousInJoinTree();
+ }
else
{
throw Exception(ErrorCodes::AMBIGUOUS_IDENTIFIER,
@@ -1495,6 +1509,8 @@ IdentifierResolveResult IdentifierResolver::tryResolveIdentifierFromArrayJoin(co
{
const auto & from_array_join_node = table_expression_node->as();
auto resolve_result = tryResolveIdentifierFromJoinTreeNode(identifier_lookup, from_array_join_node.getTableExpression(), scope);
+ if (resolve_result.ambiguous_in_join_tree)
+ return resolve_result;
if (scope.table_expressions_in_resolve_process.contains(table_expression_node.get()) || !identifier_lookup.isExpressionLookup())
return resolve_result;
diff --git a/src/Analyzer/Resolve/QueryAnalyzer.cpp b/src/Analyzer/Resolve/QueryAnalyzer.cpp
index 3ec6e21cface..b7311afd0cf0 100644
--- a/src/Analyzer/Resolve/QueryAnalyzer.cpp
+++ b/src/Analyzer/Resolve/QueryAnalyzer.cpp
@@ -1397,15 +1397,40 @@ IdentifierResolveResult QueryAnalyzer::tryResolveIdentifier(const IdentifierLook
if (unlikely(prefer_column_name_to_alias))
{
+ bool can_check_aliases = identifier_resolve_settings.allow_to_check_aliases && !already_in_resolve_process;
+ bool ambiguous_in_join_tree = false;
+
if (identifier_resolve_settings.allow_to_check_join_tree)
{
- resolve_result = identifier_resolver.tryResolveIdentifierFromJoinTree(identifier_lookup, scope);
+ /** A column name that is ambiguous between joined tables but also names an alias resolves to the alias,
+ * as the old analyzer did (`JoinToSubqueryTransformVisitor`, `allow_ambiguous = got_alias`).
+ * Example: SELECT t1.x AS x FROM t1, t2, t3 WHERE ... ORDER BY x
+ */
+ bool alias_can_take_over = can_check_aliases
+ && identifier_lookup.isExpressionLookup()
+ && scope.aliases.find(identifier_lookup, ScopeAliases::FindOption::FIRST_NAME) != nullptr;
+
+ if (alias_can_take_over)
+ {
+ auto tolerant_lookup = identifier_lookup;
+ tolerant_lookup.allow_ambiguous_join_tree_identifier = true;
+ resolve_result = identifier_resolver.tryResolveIdentifierFromJoinTree(tolerant_lookup, scope);
+ ambiguous_in_join_tree = resolve_result.ambiguous_in_join_tree;
+ }
+ else
+ {
+ resolve_result = identifier_resolver.tryResolveIdentifierFromJoinTree(identifier_lookup, scope);
+ }
}
- if (identifier_resolve_settings.allow_to_check_aliases && !resolve_result.resolved_identifier && !already_in_resolve_process)
+ if (can_check_aliases && !resolve_result.resolved_identifier)
{
resolve_result = tryResolveIdentifierFromAliases(identifier_lookup, scope, identifier_resolve_settings);
}
+
+ /// No alias took over: resolve from the join tree again to throw the original `AMBIGUOUS_IDENTIFIER`.
+ if (ambiguous_in_join_tree && !resolve_result.resolved_identifier)
+ resolve_result = identifier_resolver.tryResolveIdentifierFromJoinTree(identifier_lookup, scope);
}
else
{
@@ -4575,6 +4600,20 @@ void QueryAnalyzer::resolveJoin(QueryTreeNodePtr & join_node, IdentifierResolveS
auto & join_using_list = join_node_typed.getJoinExpression()->as();
std::unordered_set join_using_identifiers;
+ /// The old analyzer rewrote a query with several JOINs into nested subqueries, so an inner JOIN never saw an alias
+ /// of the query and resolved its key from the left table. Only the outermost JOIN keeps the alias lookup.
+ auto is_outermost_join = [&join_node, &scope]() -> bool
+ {
+ const auto * scope_query_node = scope.scope_node ? scope.scope_node->as() : nullptr;
+ if (!scope_query_node)
+ return false;
+
+ IQueryTreeNode * join_tree_root = scope_query_node->getJoinTree().get();
+ while (join_tree_root->getNodeType() == QueryTreeNodeType::ARRAY_JOIN)
+ join_tree_root = join_tree_root->as().getTableExpression().get();
+ return join_tree_root == join_node.get();
+ };
+
for (auto & join_using_node : join_using_list.getNodes())
{
auto * identifier_node = join_using_node->as();
@@ -4613,30 +4652,71 @@ void QueryAnalyzer::resolveJoin(QueryTreeNodePtr & join_node, IdentifierResolveS
{
if (projection_node->hasAlias() && identifier_full_name_ == projection_node->getAlias())
{
+ /// The query node only scopes the resolution: identifier lookups and matchers inside the expression reach the left
+ /// side through its join tree, and it names the scope in error messages.
auto left_subquery = std::make_shared(query_node->getMutableContext());
left_subquery->getProjection().getNodes().push_back(projection_node->clone());
left_subquery->getJoinTree() = left_table_expression;
IdentifierResolveScope & left_subquery_scope = createIdentifierResolveScope(left_subquery, nullptr /*parent_scope*/);
/// We are using alias column mechanism for USING column from projection.
- /// It will be calculated right after reading, so column will be not nullable there.
+ /// It will be calculated right after reading, so column will be not nullable there, and a column of a USING key
+ /// inside the left side keeps the type it is read with rather than the key's supertype, the same way as in PREWHERE.
left_subquery_scope.join_use_nulls = false;
+ left_subquery_scope.allow_resolve_from_using = false;
+
+ /// The left side is already resolved (a USING list inside it holds columns, not identifiers), so it must not be
+ /// resolved again; the scope takes over what resolveQuery builds for a join tree: the table expression data of
+ /// the leaves, their aliases (a qualified matcher such as `t1.*` finds its table only through them) and the
+ /// join counter.
+ for (const auto & table_expression : extractTableExpressions(left_table_expression, true /*add_array_join*/))
+ {
+ left_subquery_scope.registered_table_expression_nodes.insert(table_expression);
+ if (table_expression->hasAlias())
+ left_subquery_scope.aliases.alias_name_to_table_expression_node.emplace(table_expression->getAlias(), table_expression);
+ if (table_expression->getNodeType() != QueryTreeNodeType::ARRAY_JOIN)
+ left_subquery_scope.table_expression_node_to_data.emplace(table_expression, scope_.getTableExpressionDataOrThrow(table_expression));
+ }
+
+ for (std::vector join_tree_nodes{left_table_expression.get()}; !join_tree_nodes.empty();)
+ {
+ const auto * join_tree_node = join_tree_nodes.back();
+ join_tree_nodes.pop_back();
+
+ if (const auto * join = join_tree_node->as())
+ {
+ ++left_subquery_scope.joins_count;
+ join_tree_nodes.push_back(join->getLeftTableExpression().get());
+ join_tree_nodes.push_back(join->getRightTableExpression().get());
+ }
+ else if (const auto * cross_join = join_tree_node->as())
+ {
+ left_subquery_scope.joins_count += cross_join->getTableExpressions().size() - 1;
+ for (const auto & cross_join_table_expression : cross_join->getTableExpressions())
+ join_tree_nodes.push_back(cross_join_table_expression.get());
+ }
+ else if (const auto * array_join = join_tree_node->as())
+ join_tree_nodes.push_back(array_join->getTableExpression().get());
+ }
- resolveQuery(left_subquery, left_subquery_scope);
+ auto & resolved_node = left_subquery->getProjection().getNodes().front();
+ QueryExpressionsAliasVisitor alias_visitor(left_subquery_scope.aliases);
+ alias_visitor.visit(resolved_node);
+ resolveExpressionNode(resolved_node, left_subquery_scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/);
- const auto & resolved_nodes = left_subquery->getProjection().getNodes();
- if (resolved_nodes.size() == 1)
+ /// A matcher resolves into a list of columns.
+ if (resolved_node->getNodeType() != QueryTreeNodeType::LIST)
{
/// Added column should not conflict with existing column names
NameSet existing_columns;
if (!getColumnsFromTableExpression(left_table_expression, existing_columns))
return nullptr;
- NameAndTypePair column_name_type(identifier_full_name_, resolved_nodes.front()->getResultType());
+ NameAndTypePair column_name_type(identifier_full_name_, resolved_node->getResultType());
while (existing_columns.contains(column_name_type.name))
column_name_type.name = "_" + column_name_type.name;
- auto [expression_source, is_single_source] = getExpressionSource(resolved_nodes.front());
+ auto [expression_source, is_single_source] = getExpressionSource(resolved_node);
/// Do not support `SELECT t1.a + t2.a AS id ... USING id`
if (!is_single_source)
return nullptr;
@@ -4651,7 +4731,7 @@ void QueryAnalyzer::resolveJoin(QueryTreeNodePtr & join_node, IdentifierResolveS
return nullptr;
/// Create ColumnNode with expression from parent projection
- return std::make_shared(std::move(column_name_type), resolved_nodes.front(),
+ return std::make_shared(std::move(column_name_type), resolved_node,
expression_source ? expression_source : left_table_expression);
}
}
@@ -4665,9 +4745,9 @@ void QueryAnalyzer::resolveJoin(QueryTreeNodePtr & join_node, IdentifierResolveS
/** With `analyzer_compatibility_join_using_top_level_identifier` alias in projection has higher priority than column from left table.
* But if aliased expression cannot be resolved from left table, we get UNKNOW_IDENTIFIER error,
* despite the fact that column from USING could be resolved from left table.
- * It's compatible with a default behavior for old analyzer.
+ * It's compatible with a default behavior for old analyzer, which also never used an alias for an inner JOIN.
*/
- if (settings[Setting::analyzer_compatibility_join_using_top_level_identifier])
+ if (settings[Setting::analyzer_compatibility_join_using_top_level_identifier] && is_outermost_join())
result_left_table_expression = try_resolve_identifier_from_query_projection(identifier_full_name, join_node_typed.getLeftTableExpression(), scope);
if (!result_left_table_expression)
@@ -4680,7 +4760,7 @@ void QueryAnalyzer::resolveJoin(QueryTreeNodePtr & join_node, IdentifierResolveS
{
String extra_message;
const QueryNode * query_node = scope.scope_node ? scope.scope_node->as() : nullptr;
- if (!settings[Setting::analyzer_compatibility_join_using_top_level_identifier] && query_node)
+ if (!settings[Setting::analyzer_compatibility_join_using_top_level_identifier] && query_node && is_outermost_join())
{
for (const auto & projection_node : query_node->getProjection().getNodes())
{
diff --git a/src/Analyzer/Resolve/resolveFunction.cpp b/src/Analyzer/Resolve/resolveFunction.cpp
index 1afe91a44f47..5f730c8970e7 100644
--- a/src/Analyzer/Resolve/resolveFunction.cpp
+++ b/src/Analyzer/Resolve/resolveFunction.cpp
@@ -434,7 +434,10 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi
if (is_special_function_dict_get)
{
- scope.context->getExternalDictionariesLoader().assertDictionaryStructureExists(identifier.getFullName(), scope.context);
+ /// Check access before reading the dictionary definition, so that a user without access learns nothing
+ /// about the dictionary.
+ const auto & external_loader = scope.context->getExternalDictionariesLoader();
+ (void)external_loader.getDictionaryStructure(external_loader.resolveDictionaryCheckingAccess(identifier.getFullName(), scope.context));
}
else
{
diff --git a/src/Client/Connection.cpp b/src/Client/Connection.cpp
index 6dca066137ca..4178ab6ea770 100644
--- a/src/Client/Connection.cpp
+++ b/src/Client/Connection.cpp
@@ -79,6 +79,7 @@ namespace FailPoints
namespace ErrorCodes
{
+ extern const int AUTHENTICATION_FAILED;
extern const int NETWORK_ERROR;
extern const int SOCKET_TIMEOUT;
extern const int UNEXPECTED_PACKET_FROM_SERVER;
@@ -666,7 +667,8 @@ void Connection::receiveHello()
if (server_revision >= DBMS_MIN_REVISION_WITH_SERVER_SETTINGS)
{
Settings settings;
- settings.read(*in, SettingsWriteFormat::STRINGS_WITH_FLAGS);
+ /// A server of another version may send values that this version rejects.
+ settings.read(*in, SettingsWriteFormat::STRINGS_WITH_FLAGS, /* skip_invalid_values= */ true);
settings_from_server = settings.changes();
}
@@ -938,6 +940,20 @@ void Connection::sendQuery(
disconnect();
});
+ /// Over the cluster secret a shard authenticates as `initial_user` without a password, so forward
+ /// only an `initial_user` equal to the authenticated `current_user`. Skip the check when
+ /// `current_user` is empty -- server-internal paths (async `Distributed` insert, buffer flush) have none.
+ if (!cluster_secret.empty() && client_info && !client_info->current_user.empty()
+ && client_info->initial_user != client_info->current_user)
+ {
+ /// A mismatch means a forged SECONDARY_QUERY impersonating another user -- including an empty
+ /// initial_user, which the shard would otherwise run with full access -- so refuse it.
+ throw Exception(ErrorCodes::AUTHENTICATION_FAILED,
+ "Refusing to forward a query over the cluster secret: its initial_user '{}' differs "
+ "from the authenticated user '{}'.",
+ client_info->initial_user, client_info->current_user);
+ }
+
writeVarUInt(Protocol::Client::Query, *out);
writeStringBinary(query_id, *out);
diff --git a/src/Columns/ColumnAggregateFunction.cpp b/src/Columns/ColumnAggregateFunction.cpp
index a88103df3b89..91fb6b37671b 100644
--- a/src/Columns/ColumnAggregateFunction.cpp
+++ b/src/Columns/ColumnAggregateFunction.cpp
@@ -39,6 +39,7 @@ namespace ErrorCodes
namespace FailPoints
{
extern const char column_aggregate_function_ensureOwnership_exception[];
+ extern const char column_aggregate_function_expand_exception[];
}
@@ -392,32 +393,61 @@ void ColumnAggregateFunction::expand(const Filter & mask, bool inverted)
if (mask.size() < data.size())
throw Exception(ErrorCodes::LOGICAL_ERROR, "Mask size should be no less than data size.");
- ssize_t from = data.size() - 1;
- ssize_t index = mask.size() - 1;
- data.resize(mask.size());
- while (index >= 0)
+ const size_t set_bytes = countBytesInFilter(mask);
+ const size_t selected = inverted ? mask.size() - set_bytes : set_bytes;
+ if (selected > data.size())
+ throw Exception(ErrorCodes::LOGICAL_ERROR, "Too many bytes in mask");
+ if (selected < data.size())
+ throw Exception(ErrorCodes::LOGICAL_ERROR, "Not enough bytes in mask");
+
+ bool inject_memory_limit_exceeded = false;
+ /// Avoid checking failpoint in a loop, since it uses atomic's
+ fiu_do_on(FailPoints::column_aggregate_function_expand_exception,
{
- if (!!mask[index] ^ inverted)
- {
- if (from < 0)
- throw Exception(ErrorCodes::LOGICAL_ERROR, "Too many bytes in mask");
+ inject_memory_limit_exceeded = true;
+ });
- /// Copy only if it makes sense.
- if (index != from)
- data[index] = data[from];
- --from;
- }
- else
+ /// The destructor destroys every state in `data`, so `data` must never hold a pointer to a state
+ /// that is not created. Build the expanded array aside and publish it only when it is complete.
+ Container new_data;
+ new_data.resize_exact(mask.size());
+
+ size_t from = 0;
+ size_t index = 0;
+ try
+ {
+ for (; index < mask.size(); ++index)
{
- data[index] = arena.alignedAlloc(func->sizeOfData(), func->alignOfData());
- func->create(data[index]);
- }
+ if (!!mask[index] ^ inverted)
+ {
+ new_data[index] = data[from];
+ ++from;
+ }
+ else
+ {
+ new_data[index] = arena.alignedAlloc(func->sizeOfData(), func->alignOfData());
+ func->create(new_data[index]);
- --index;
+ /// Throw after a state is created, so that the cleanup has something to destroy.
+ if (unlikely(inject_memory_limit_exceeded))
+ {
+ ++index;
+ throw Exception(ErrorCodes::MEMORY_LIMIT_EXCEEDED, "Failpoint triggered");
+ }
+ }
+ }
+ }
+ catch (...)
+ {
+ /// Destroy the states created so far; the ones taken from `data` stay owned by `data`.
+ if (!func->hasTrivialDestructor())
+ for (size_t i = 0; i < index; ++i)
+ if (!(!!mask[i] ^ inverted))
+ func->destroy(new_data[i]);
+ throw;
}
- if (from != -1)
- throw Exception(ErrorCodes::LOGICAL_ERROR, "Not enough bytes in mask");
+ data.swap(new_data);
}
ColumnPtr ColumnAggregateFunction::permute(const Permutation & perm, size_t limit) const
diff --git a/src/Columns/ColumnObject.cpp b/src/Columns/ColumnObject.cpp
index de82de324970..51a79919b02d 100644
--- a/src/Columns/ColumnObject.cpp
+++ b/src/Columns/ColumnObject.cpp
@@ -15,6 +15,7 @@ namespace DB
namespace ErrorCodes
{
extern const int ATTEMPT_TO_READ_AFTER_EOF;
+ extern const int INCORRECT_DATA;
extern const int NOT_IMPLEMENTED;
extern const int LOGICAL_ERROR;
extern const int PARAMETER_OUT_OF_BOUND;
@@ -1112,6 +1113,7 @@ void ColumnObject::deserializeDynamicPathsAndSharedDataFromArena(ReadBuffer & in
readBinaryLittleEndian(num_paths, in);
const auto [shared_data_paths, shared_data_values] = getSharedDataPathsAndValues();
+ const size_t shared_data_row_start = shared_data_paths->size();
for (size_t i = 0; i != num_paths; ++i)
{
size_t path_size;
@@ -1130,9 +1132,17 @@ void ColumnObject::deserializeDynamicPathsAndSharedDataFromArena(ReadBuffer & in
size_t value_size;
readBinaryLittleEndian(value_size, in);
+ /// `serializeDynamicPathsAndSharedDataIntoArena` writes every path of a row once. A path repeated
+ /// in the row would get several values in a column of a dynamic path, or break the order of shared data.
+ /// Typed paths are deserialized before, so a typed path here would be a second value of it.
+ if (typed_paths.contains(path))
+ throw Exception(ErrorCodes::INCORRECT_DATA, "Typed path '{}' in dynamic paths of a serialized value of JSON column", path);
+
/// Check if we have this path in dynamic paths.
if (auto dynamic_it = dynamic_paths.find(path); dynamic_it != dynamic_paths.end())
{
+ if (dynamic_it->second->size() != current_size)
+ throw Exception(ErrorCodes::INCORRECT_DATA, "Duplicate path '{}' in a serialized value of JSON column", path);
getDynamicSerialization()->deserializeBinary(*dynamic_it->second, in, getFormatSettings());
}
/// Try to add a new dynamic path.
@@ -1150,6 +1160,9 @@ void ColumnObject::deserializeDynamicPathsAndSharedDataFromArena(ReadBuffer & in
"Attempt to read {} bytes for the value size, but only {} bytes are available",
value_size,
in.available());
+ if (shared_data_paths->size() > shared_data_row_start && shared_data_paths->getDataAt(shared_data_paths->size() - 1) >= path)
+ throw Exception(ErrorCodes::INCORRECT_DATA,
+ "Paths of a serialized value of JSON column are not sorted or have duplicates (at path '{}')", path);
std::string_view value(in.position(), value_size);
in.ignore(value_size);
shared_data_paths->insertData(path.data(), path.size());
diff --git a/src/Columns/ColumnUnique.h b/src/Columns/ColumnUnique.h
index f83dc7613196..59a1ac0efce6 100644
--- a/src/Columns/ColumnUnique.h
+++ b/src/Columns/ColumnUnique.h
@@ -29,6 +29,7 @@ namespace DB
namespace ErrorCodes
{
extern const int ATTEMPT_TO_READ_AFTER_EOF;
+ extern const int INCORRECT_DATA;
extern const int LOGICAL_ERROR;
extern const int ILLEGAL_COLUMN;
extern const int NOT_IMPLEMENTED;
@@ -559,6 +560,9 @@ size_t ColumnUnique::uniqueDeserializeAndInsertFromArena(ReadBuffer
if (in.available() < string_size)
throw Exception(ErrorCodes::ATTEMPT_TO_READ_AFTER_EOF, "Not enough data to deserialize string value in ColumnUnique.");
+ if (unlikely(string_size < serialize_string_with_zero_byte))
+ throw Exception(ErrorCodes::INCORRECT_DATA, "String size is smaller than its zero-byte terminator");
+
size_t ret = uniqueInsertData(in.position(), string_size - serialize_string_with_zero_byte);
in.ignore(string_size);
return ret;
@@ -567,39 +571,8 @@ size_t ColumnUnique::uniqueDeserializeAndInsertFromArena(ReadBuffer
template
size_t ColumnUnique::uniqueDeserializeAndInsertAggregationStateValueFromArena(ReadBuffer & in)
{
- if (is_nullable)
- {
- UInt8 val;
- readBinaryLittleEndian(val, in);
-
- if (val)
- return getNullValueIndex();
-
- }
-
- /// Numbers, FixedString
- if (size_of_value_if_fixed)
- {
- if (in.available() < size_of_value_if_fixed)
- throw Exception(ErrorCodes::ATTEMPT_TO_READ_AFTER_EOF, "Not enough data to deserialize fixed size value in ColumnUnique.");
-
- size_t ret = uniqueInsertData(in.position(), size_of_value_if_fixed);
- in.ignore(size_of_value_if_fixed);
- return ret;
-
- }
-
- /// String
- /// For compatibility, serialized string value contains zero byte at the end, we just ignore this byte.
- size_t string_size_with_zero_byte;
- readBinaryLittleEndian(string_size_with_zero_byte, in);
- if (in.available() < string_size_with_zero_byte)
- throw Exception(ErrorCodes::ATTEMPT_TO_READ_AFTER_EOF, "Not enough data to deserialize string value in ColumnUnique.");
-
- size_t ret = uniqueInsertData(in.position(), string_size_with_zero_byte - 1);
- in.ignore(string_size_with_zero_byte);
-
- return ret;
+ const auto settings = IColumn::SerializationSettings::createForAggregationState();
+ return uniqueDeserializeAndInsertFromArena(in, &settings);
}
template
diff --git a/src/Common/FailPoint.cpp b/src/Common/FailPoint.cpp
index 2c35364c01bd..977e927f65fa 100644
--- a/src/Common/FailPoint.cpp
+++ b/src/Common/FailPoint.cpp
@@ -110,6 +110,7 @@ static struct InitFiu
ONCE(delta_kernel_force_stale_token_error) \
REGULAR(object_storage_force_refresh_callback_success) \
ONCE(column_aggregate_function_ensureOwnership_exception) \
+ ONCE(column_aggregate_function_expand_exception) \
REGULAR(keepermap_fail_drop_data) \
REGULAR(keeper_fault_on_watch_request) \
REGULAR(lazy_pipe_fds_fail_close) \
diff --git a/src/Common/HTTPHeaderFilter.cpp b/src/Common/HTTPHeaderFilter.cpp
index 2285f8f6ab02..59e0e5948e0d 100644
--- a/src/Common/HTTPHeaderFilter.cpp
+++ b/src/Common/HTTPHeaderFilter.cpp
@@ -3,7 +3,9 @@
#include
#include
#include
+#include
#include
+#include
#include
#include
@@ -53,6 +55,37 @@ void HTTPHeaderFilter::checkAndNormalizeHeaders(HTTPHeaderEntries & entries) con
}
}
+void HTTPHeaderFilter::checkBasicCredentials(const Poco::Net::HTTPBasicCredentials & credentials) const
+{
+ if (credentials.getUsername().empty())
+ return;
+
+ checkAuthorizationHeader("Basic authentication credentials, for example the userinfo of a URL, are sent in this header");
+}
+
+void HTTPHeaderFilter::checkURIUserInfo(const Poco::URI & uri) const
+{
+ if (uri.getUserInfo().empty())
+ return;
+
+ checkAuthorizationHeader("The userinfo of the URL is sent in this header as Basic authentication credentials");
+}
+
+void HTTPHeaderFilter::checkAuthorizationHeader(const std::string & reason) const
+{
+ /// A forbidden header is matched by name, and a Base64 value has no CR or LF, so a placeholder value suffices.
+ HTTPHeaderEntries entries{{"Authorization", "Basic"}};
+ try
+ {
+ checkAndNormalizeHeaders(entries);
+ }
+ catch (Exception & e)
+ {
+ e.addMessage(reason);
+ throw;
+ }
+}
+
void HTTPHeaderFilter::setValuesFromConfig(const Poco::Util::AbstractConfiguration & config)
{
std::lock_guard guard(mutex);
diff --git a/src/Common/HTTPHeaderFilter.h b/src/Common/HTTPHeaderFilter.h
index b6232b40b932..4d3a034320fc 100644
--- a/src/Common/HTTPHeaderFilter.h
+++ b/src/Common/HTTPHeaderFilter.h
@@ -8,6 +8,8 @@
#include
namespace re2 { class RE2; }
+namespace Poco { class URI; }
+namespace Poco::Net { class HTTPBasicCredentials; }
namespace DB
{
@@ -19,7 +21,14 @@ class HTTPHeaderFilter
void setValuesFromConfig(const Poco::Util::AbstractConfiguration & config);
void checkAndNormalizeHeaders(HTTPHeaderEntries & entries) const;
+ /// Throws if the `Authorization` header that sends these credentials is forbidden. An empty username sends no header.
+ void checkBasicCredentials(const Poco::Net::HTTPBasicCredentials & credentials) const;
+ /// The same for a sender that sends any non-empty userinfo of `uri` as Basic credentials, even without a username.
+ void checkURIUserInfo(const Poco::URI & uri) const;
+
private:
+ void checkAuthorizationHeader(const std::string & reason) const;
+
/// Header names are case-insensitive (RFC 7230 3.2): entries are stored
/// lower-cased and the incoming name is lower-cased before lookup.
std::unordered_set forbidden_headers;
diff --git a/src/Common/NamedCollections/NamedCollections.cpp b/src/Common/NamedCollections/NamedCollections.cpp
index 90e4b5aaa141..6b524d379a71 100644
--- a/src/Common/NamedCollections/NamedCollections.cpp
+++ b/src/Common/NamedCollections/NamedCollections.cpp
@@ -178,10 +178,12 @@ class NamedCollection::Impl
NamedCollection::NamedCollection(
ImplPtr pimpl_,
const std::string & collection_name_,
- const bool is_mutable_)
+ const bool is_mutable_,
+ const SourceId source_id_)
: pimpl(std::move(pimpl_))
, collection_name(collection_name_)
, is_mutable(is_mutable_)
+ , source_id(source_id_)
{
}
@@ -286,7 +288,7 @@ MutableNamedCollectionPtr NamedCollection::duplicate() const
std::lock_guard lock(mutex);
auto impl = pimpl->createCopy(collection_name);
return std::unique_ptr(
- new NamedCollection(std::move(impl), collection_name, true));
+ new NamedCollection(std::move(impl), collection_name, true, source_id));
}
NamedCollection::Keys NamedCollection::getKeys(ssize_t depth, const std::string & prefix) const
@@ -335,7 +337,8 @@ NamedCollectionFromConfig::NamedCollectionFromConfig(
const std::string & collection_name_,
const std::string & collection_path_,
const Keys & keys_)
- : NamedCollection(Impl::create(config_, collection_name_, collection_path_, keys_), collection_name_, /* is_mutable */ false)
+ : NamedCollection(
+ Impl::create(config_, collection_name_, collection_path_, keys_), collection_name_, /* is_mutable */ false, SourceId::CONFIG)
{
}
@@ -356,7 +359,7 @@ MutableNamedCollectionPtr NamedCollectionFromSQL::create(const ASTCreateNamedCol
}
NamedCollectionFromSQL::NamedCollectionFromSQL(const ASTCreateNamedCollectionQuery & query_)
- : NamedCollection(nullptr, query_.collection_name, true)
+ : NamedCollection(nullptr, query_.collection_name, true, SourceId::SQL)
, create_query_ptr(query_.clone()->as())
{
const auto config = NamedCollectionConfiguration::createConfiguration(collection_name, create_query_ptr.changes, create_query_ptr.overridability);
diff --git a/src/Common/NamedCollections/NamedCollections.h b/src/Common/NamedCollections/NamedCollections.h
index 673476271387..bc0693724b8c 100644
--- a/src/Common/NamedCollections/NamedCollections.h
+++ b/src/Common/NamedCollections/NamedCollections.h
@@ -29,8 +29,6 @@ class NamedCollection
using Keys = std::set>;
enum class SourceId : uint8_t
{
- /// None source_id is possible only if the object is a
- /// duplicate of some named collection. See `duplicate` method.
NONE = 0,
CONFIG = 1,
SQL = 2,
@@ -65,7 +63,7 @@ class NamedCollection
template void remove(const Key & key);
- /// Creates mutable, with NONE source id full copy.
+ /// Creates a mutable full copy, keeping the source of the original.
MutableNamedCollectionPtr duplicate() const;
Keys getKeys(ssize_t depth = -1, const std::string & prefix = "") const;
@@ -81,7 +79,7 @@ class NamedCollection
bool isMutable() const { return is_mutable; }
- virtual SourceId getSourceId() const { return SourceId::NONE; }
+ SourceId getSourceId() const { return source_id; }
virtual String getCreateStatement(bool /*show_secrects*/) { return {}; }
@@ -95,7 +93,8 @@ class NamedCollection
NamedCollection(
ImplPtr pimpl_,
const std::string & collection_name,
- bool is_mutable_
+ bool is_mutable_,
+ SourceId source_id_
);
void assertMutable() const;
@@ -104,6 +103,7 @@ class NamedCollection
ImplPtr pimpl;
const std::string collection_name;
const bool is_mutable;
+ const SourceId source_id;
mutable std::mutex mutex;
};
@@ -116,8 +116,6 @@ class NamedCollectionFromSQL final : public NamedCollection
void update(const ASTAlterNamedCollectionQuery & query) override;
- NamedCollection::SourceId getSourceId() const override { return SourceId::SQL; }
-
private:
explicit NamedCollectionFromSQL(const ASTCreateNamedCollectionQuery & query_);
@@ -138,8 +136,6 @@ class NamedCollectionFromConfig final : public NamedCollection
void update(const ASTAlterNamedCollectionQuery & /*query*/) override { NamedCollection::assertMutable(); }
- NamedCollection::SourceId getSourceId() const override { return SourceId::CONFIG; }
-
private:
NamedCollectionFromConfig(
diff --git a/src/Common/RemoteHostFilter.cpp b/src/Common/RemoteHostFilter.cpp
index 5b5da5ec7c6b..a5f8b81e1220 100644
--- a/src/Common/RemoteHostFilter.cpp
+++ b/src/Common/RemoteHostFilter.cpp
@@ -17,13 +17,15 @@ namespace ErrorCodes
bool RemoteHostFilter::checkURL(const Poco::URI & uri, bool throw_on_error) const
{
- if (checkForDirectEntry(uri.getHost()) || checkForDirectEntry(uri.getHost() + ":" + toString(uri.getPort())))
+ const std::string host_and_port = uri.getHost() + ":" + toString(uri.getPort());
+ if (checkForDirectEntry(uri.getHost()) || checkForDirectEntry(host_and_port))
return true;
if (!throw_on_error)
return false;
+ /// Only the host and port are checked. The rest of the URL can carry secrets and is not printed.
throw Exception(ErrorCodes::UNACCEPTABLE_URL, "URL \"{}\" is not allowed in configuration file, "
- "see ", uri.toString());
+ "see ", host_and_port);
}
void RemoteHostFilter::checkHostAndPort(const std::string & host, const std::string & port) const
diff --git a/src/Common/Scheduler/Workload/WorkloadEntityKeeperStorage.cpp b/src/Common/Scheduler/Workload/WorkloadEntityKeeperStorage.cpp
index a06fed9710e4..ed55f0e0c8a6 100644
--- a/src/Common/Scheduler/Workload/WorkloadEntityKeeperStorage.cpp
+++ b/src/Common/Scheduler/Workload/WorkloadEntityKeeperStorage.cpp
@@ -178,8 +178,12 @@ WorkloadEntityStorageBase::OperationResult WorkloadEntityKeeperStorage::storeEnt
auto component_guard = Coordination::setCurrentComponent("WorkloadEntityKeeperStorage::storeEntityImpl");
LOG_DEBUG(log, "Storing workload entity {}", backQuote(entity_name));
- String new_data = serializeLocalEntities(Event{entity_type, entity_name, create_entity_query});
+ Int32 validated_version = current_version;
auto zookeeper = getZooKeeper();
+ if (current_version != validated_version)
+ return OperationResult::Retry; /// A new session has refreshed the entities, so the caller's validation is stale
+
+ String new_data = serializeLocalEntities(Event{entity_type, entity_name, create_entity_query});
Coordination::Stat stat;
auto code = zookeeper->trySet(zookeeper_path, new_data, current_version, &stat);
@@ -206,8 +210,12 @@ WorkloadEntityStorageBase::OperationResult WorkloadEntityKeeperStorage::removeEn
auto component_guard = Coordination::setCurrentComponent("WorkloadEntityKeeperStorage::removeEntityImpl");
LOG_DEBUG(log, "Removing workload entity {}", backQuote(entity_name));
- String new_data = serializeLocalEntities(Event{entity_type, entity_name, {}});
+ Int32 validated_version = current_version;
auto zookeeper = getZooKeeper();
+ if (current_version != validated_version)
+ return OperationResult::Retry; /// A new session has refreshed the entities, so the caller's validation is stale
+
+ String new_data = serializeLocalEntities(Event{entity_type, entity_name, {}});
Coordination::Stat stat;
auto code = zookeeper->trySet(zookeeper_path, new_data, current_version, &stat);
diff --git a/src/Common/Scheduler/Workload/WorkloadEntityStorageBase.cpp b/src/Common/Scheduler/Workload/WorkloadEntityStorageBase.cpp
index 27947b32e243..cb722a4c7650 100644
--- a/src/Common/Scheduler/Workload/WorkloadEntityStorageBase.cpp
+++ b/src/Common/Scheduler/Workload/WorkloadEntityStorageBase.cpp
@@ -535,7 +535,7 @@ bool WorkloadEntityStorageBase::removeEntity(
{
std::unique_lock lock(mutex);
auto it = entities.find(entity_name);
- if (it == entities.end())
+ if (it == entities.end() || getEntityType(it->second) != entity_type)
{
if (throw_if_not_exists)
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Workload entity '{}' doesn't exist", entity_name);
diff --git a/src/Common/maskURIPassword.h b/src/Common/maskURIPassword.h
index a4f762ec2d57..a16f7263c508 100644
--- a/src/Common/maskURIPassword.h
+++ b/src/Common/maskURIPassword.h
@@ -71,10 +71,11 @@ inline bool maskURIPassword(std::string * uri)
}
/** Mask the values of the query parameters that carry credentials in a presigned URL, so that
- * `...?X-Amz-Signature=abc&foo=1` becomes `...?X-Amz-Signature=[HIDDEN]&foo=1`. Every occurrence
- * is masked. Returns whether anything was masked.
+ * `...?X-Amz-Signature=abc&foo=1` becomes `...?X-Amz-Signature=[HIDDEN]&foo=1`, and of the
+ * `connection_string` parameter of an ODBC/JDBC bridge request. Every occurrence is masked.
+ * Returns whether anything was masked.
*
- * Mirrors the regular expression
+ * Apart from `connection_string`, mirrors the regular expression
* `([?&](?:AWSAccessKeyId|Signature|Expires|GoogleAccessId|X-Amz-[A-Za-z0-9\-]*|X-Goog-[A-Za-z0-9\-]*)=)[^]*`
* that `FunctionSecretArgumentsFinder` applies to a presigned URL, and the parameter set mirrors
* `BackupInfo::removeCredentialsFromS3URL`. Matching is case-sensitive, as in the expression.
@@ -86,6 +87,9 @@ inline bool maskPresignedURLParameters(std::string & url)
auto is_secret_parameter = [](std::string_view name)
{
+ if (name == "connection_string")
+ return true;
+
for (auto exact : exact_names)
if (name == exact)
return true;
diff --git a/src/Coordination/KeeperStorage.cpp b/src/Coordination/KeeperStorage.cpp
index 3319668b9508..dcb92d03788b 100644
--- a/src/Coordination/KeeperStorage.cpp
+++ b/src/Coordination/KeeperStorage.cpp
@@ -2573,7 +2573,9 @@ processImpl(const Coordination::ZooKeeperCheckWatchRequest & zk_request, Storage
}
}
- if (!storage.containsWatch(zk_request.getPath(), zk_request.type))
+ if (!magic_enum::enum_contains(zk_request.type))
+ response->error = Coordination::Error::ZBADARGUMENTS;
+ else if (!storage.containsWatch(zk_request.getPath(), zk_request.type))
response->error = Coordination::Error::ZNOWATCHER;
return response;
}
@@ -2610,7 +2612,9 @@ processImpl(const Coordination::ZooKeeperRemoveWatchRequest & zk_request, Storag
}
}
- if (!storage.removePersistentWatch(zk_request.path, zk_request.type, session_id))
+ if (!magic_enum::enum_contains(zk_request.type))
+ response->error = Coordination::Error::ZBADARGUMENTS;
+ else if (!storage.removePersistentWatch(zk_request.path, zk_request.type, session_id))
response->error = Coordination::Error::ZNOWATCHER;
return response;
@@ -2648,7 +2652,10 @@ processImpl(const Coordination::ZooKeeperAddWatchRequest & zk_request, Storage &
}
}
- storage.addPersistentWatch(zk_request.path, zk_request.mode, session_id);
+ if (!magic_enum::enum_contains(zk_request.mode))
+ response->error = Coordination::Error::ZBADARGUMENTS;
+ else
+ storage.addPersistentWatch(zk_request.path, zk_request.mode, session_id);
return response;
}
diff --git a/src/Core/BackgroundSchedulePool.cpp b/src/Core/BackgroundSchedulePool.cpp
index e0511c7643fe..227db0b72fb5 100644
--- a/src/Core/BackgroundSchedulePool.cpp
+++ b/src/Core/BackgroundSchedulePool.cpp
@@ -414,10 +414,12 @@ void BackgroundSchedulePool::scheduleDelayedTask(TaskInfo & task, size_t ms, std
{
std::lock_guard lock(delayed_tasks_mutex);
+ /// Insert before erasing the old entry: if the insertion throws, the task keeps its old entry and `task.iterator` stays valid.
+ auto it = delayed_tasks.emplace(current_time + (ms * 1000), task.shared_from_this());
if (task.delayed)
delayed_tasks.erase(task.iterator);
- task.iterator = delayed_tasks.emplace(current_time + (ms * 1000), task.shared_from_this());
+ task.iterator = it;
task.delayed = true;
}
diff --git a/src/Core/BaseSettings.cpp b/src/Core/BaseSettings.cpp
index df8aae280239..f39686140dfe 100644
--- a/src/Core/BaseSettings.cpp
+++ b/src/Core/BaseSettings.cpp
@@ -1,6 +1,7 @@
#include
#include
#include
+#include
#include
#include
@@ -9,6 +10,7 @@ namespace DB
{
namespace ErrorCodes
{
+ extern const int BAD_ARGUMENTS;
extern const int INCORRECT_DATA;
extern const int TOO_LARGE_ARRAY_SIZE;
extern const int UNKNOWN_SETTING;
@@ -95,6 +97,15 @@ void BaseSettingsHelpers::warningSettingNotFound(std::string_view name)
}
}
+bool BaseSettingsHelpers::skipInvalidSettingValue(std::string_view name, const Exception & e)
+{
+ if (e.code() != ErrorCodes::BAD_ARGUMENTS && !isParseError(e.code()))
+ return false;
+
+ LOG_WARNING(getLogger("Settings"), "Cannot parse the value of setting `{}`, skipping it: {}", name, e.message());
+ return true;
+}
+
void BaseSettingsHelpers::flushWarnings()
{
unknown_settings.clear();
diff --git a/src/Core/BaseSettings.h b/src/Core/BaseSettings.h
index 2952f9c3f287..49d3411d5a1c 100644
--- a/src/Core/BaseSettings.h
+++ b/src/Core/BaseSettings.h
@@ -53,6 +53,8 @@ struct BaseSettingsHelpers
[[noreturn]] static void throwSettingNotFound(std::string_view name);
[[noreturn]] static void throwTooManySettings(std::string_view what);
static void warningSettingNotFound(std::string_view name);
+ /// Returns true (and logs a warning) if `e` is `BAD_ARGUMENTS` or a parse error (`isParseError`); other errors are not skipped.
+ static bool skipInvalidSettingValue(std::string_view name, const Exception & e);
static void flushWarnings();
/// Serialization helpers
@@ -253,8 +255,9 @@ class BaseSettings : public TTraits::Data
/// Write all settings (or only changed ones depending on format)
void write(WriteBuffer & out, SettingsWriteFormat format = SettingsWriteFormat::DEFAULT) const;
- /// Read settings from a buffer
- void read(ReadBuffer & in, SettingsWriteFormat format = SettingsWriteFormat::DEFAULT);
+ /// Read settings from a buffer.
+ /// With `skip_invalid_values`, a non-important setting whose value is rejected keeps its default instead of failing the read.
+ void read(ReadBuffer & in, SettingsWriteFormat format = SettingsWriteFormat::DEFAULT, bool skip_invalid_values = false);
/// Write only changed settings in binary format
void writeChangedBinary(WriteBuffer & out) const;
@@ -662,7 +665,7 @@ void BaseSettings::readBinary(ReadBuffer & in)
}
template
-void BaseSettings::read(ReadBuffer & in, SettingsWriteFormat format)
+void BaseSettings::read(ReadBuffer & in, SettingsWriteFormat format, bool skip_invalid_values)
{
resetToDefault();
const auto & accessor = Traits::Accessor::instance();
@@ -695,7 +698,26 @@ void BaseSettings::read(ReadBuffer & in, SettingsWriteFormat format)
accessor.setValue(*this, index, static_cast(temp));
}
else if (format >= SettingsWriteFormat::STRINGS_WITH_FLAGS)
- accessor.setValueString(*this, index, BaseSettingsHelpers::readString(in));
+ {
+ String value = BaseSettingsHelpers::readString(in);
+ try
+ {
+ accessor.setValueString(*this, index, value);
+ /// In this version some values are rejected only when a setting is assigned from a `Field`,
+ /// not when it is parsed from a string (e.g. a negative value of a `Seconds` setting).
+ /// The caller applies the settings it has read as `SettingsChanges`, that is, as `Field`s,
+ /// so a value that cannot be assigned this way is rejected here as well.
+ if (skip_invalid_values)
+ accessor.setValue(*this, index, accessor.getValue(*this, index));
+ }
+ catch (const Exception & e)
+ {
+ if (!skip_invalid_values || is_important || !BaseSettingsHelpers::skipInvalidSettingValue(name, e))
+ throw;
+ /// A failed parse may have assigned the field already.
+ accessor.resetValueToDefault(*this, index);
+ }
+ }
else
accessor.readBinary(*this, index, in);
}
diff --git a/src/Core/Field.cpp b/src/Core/Field.cpp
index ceb68fc42be2..eec1a4aab8bc 100644
--- a/src/Core/Field.cpp
+++ b/src/Core/Field.cpp
@@ -631,29 +631,40 @@ void writeText(const CustomType & x, WriteBuffer & buf)
template
void readQuoted(DecimalField & x, ReadBuffer & buf)
{
- assertChar('\'', buf);
- T value;
- UInt32 scale;
- int32_t exponent;
+ String text;
+ readQuotedString(text, buf);
+ ReadBufferFromString in(text);
+ T value{};
+ int32_t exponent = 0;
uint32_t max_digits = static_cast(-1);
- readDigits(buf, value, max_digits, exponent, true);
- if (exponent > 0)
+ bool has_digits = false;
+ if (!text.empty())
+ readDigits(in, value, max_digits, exponent, true, &has_digits);
+ if (!has_digits || !in.eof())
+ throw Exception(ErrorCodes::CANNOT_PARSE_NUMBER, "Cannot parse decimal dump '{}'", text);
+
+ /// `readDigits` drops trailing fractional zeroes, but the dump writes them to keep the scale.
+ size_t mantissa_end = std::min(text.find_first_of("eE"), text.size());
+ uint32_t trailing_zeroes = 0;
+ if (text.find('.') < mantissa_end)
+ while (text[mantissa_end - 1 - trailing_zeroes] == '0')
+ ++trailing_zeroes;
+ if (!mulPow10AddChecked(value.value, trailing_zeroes, typename T::NativeType(0)))
+ throw Exception(ErrorCodes::DECIMAL_OVERFLOW, "Decimal math overflow");
+
+ /// An out-of-range scale overruns the decimal text writer.
+ Int64 total_exponent = static_cast(exponent) - trailing_zeroes;
+ UInt32 scale = 0;
+ if (total_exponent > 0)
{
- scale = 0;
- if (common::mulOverflow(value.value, DecimalUtils::scaleMultiplier(exponent), value.value))
+ if (!mulPow10AddChecked(value.value, static_cast(std::min(total_exponent, UINT32_MAX)), typename T::NativeType(0)))
throw Exception(ErrorCodes::DECIMAL_OVERFLOW, "Decimal math overflow");
}
- else
- scale = -exponent;
- /// The scale comes from untrusted text: `restoreFromDump` is reached from the pre-auth native
- /// settings reader for a `CUSTOM`-flagged setting (`SettingFieldCustom::parseFromString`), and an
- /// exponent-form value such as `Decimal64_'1e-1000'` builds a scale that bypasses the binary
- /// reader's check. An out-of-range scale later overruns a fixed-size buffer in the decimal text
- /// writer, so reject it here, matching `readDecimalFieldBinary` and `DataTypeDecimalBase`.
- if (scale > DecimalUtils::max_precision)
+ else if (-total_exponent > static_cast(DecimalUtils::max_precision))
throw Exception(ErrorCodes::ARGUMENT_OUT_OF_BOUND, "Scale {} is out of bounds (max scale: {})",
- scale, DecimalUtils::max_precision);
- assertChar('\'', buf);
+ -total_exponent, DecimalUtils::max_precision);
+ else
+ scale = static_cast(-total_exponent);
x = DecimalField{value, scale};
}
diff --git a/src/Core/ServerSettings.cpp b/src/Core/ServerSettings.cpp
index faf26fb7d0fa..48381a3726d8 100644
--- a/src/Core/ServerSettings.cpp
+++ b/src/Core/ServerSettings.cpp
@@ -383,38 +383,9 @@ namespace
The delay during which a dropped table can be restored using the [`UNDROP`](/sql-reference/statements/undrop.md) statement. If `DROP TABLE` ran with a `SYNC` modifier, the setting is ignored.
The default for this setting is `480` (8 minutes).
)", 0) \
- DECLARE(UInt64, database_catalog_unused_dir_hide_timeout_sec, 60 * 60, R"(
- Parameter of a task that cleans up garbage from `store/` directory.
- If some subdirectory is not used by clickhouse-server and this directory was not modified for last
- [`database_catalog_unused_dir_hide_timeout_sec`](/operations/server-configuration-parameters/settings#database_catalog_unused_dir_hide_timeout_sec) seconds, the task will "hide" this directory by
- removing all access rights. It also works for directories that clickhouse-server does not
- expect to see inside `store/`.
-
- :::note
- A value of `0` means "immediately".
- :::
- )", 0) \
- DECLARE(UInt64, database_catalog_unused_dir_rm_timeout_sec, 30 * 24 * 60 * 60, R"(
- Parameter of a task that cleans up garbage from `store/` directory.
- If some subdirectory is not used by clickhouse-server and it was previously "hidden"
- (see [database_catalog_unused_dir_hide_timeout_sec](/operations/server-configuration-parameters/settings#database_catalog_unused_dir_hide_timeout_sec))
- and this directory was not modified for last
- [`database_catalog_unused_dir_rm_timeout_sec`]/operations/server-configuration-parameters/settings#database_catalog_unused_dir_rm_timeout_sec) seconds, the task will remove this directory.
- It also works for directories that clickhouse-server does not
- expect to see inside `store/`.
-
- :::note
- A value of `0` means "never". The default value corresponds to 30 days.
- :::
- )", 0) \
- DECLARE(UInt64, database_catalog_unused_dir_cleanup_period_sec, 24 * 60 * 60, R"(
- Parameter of a task that cleans up garbage from `store/` directory.
- Sets scheduling period of the task.
-
- :::note
- A value of `0` means "never". The default value corresponds to 1 day.
- :::
- )", 0) \
+ DECLARE(UInt64, database_catalog_unused_dir_hide_timeout_sec, 60 * 60, R"(Parameter of the background task that cleaned up garbage from the `store/` directory: the time after which the task revoked all access rights from an unused directory. The setting is deprecated and has no effect: the task was removed, and ClickHouse never hides or removes unused directories in `store/` automatically.)", SettingsTierType::OBSOLETE) \
+ DECLARE(UInt64, database_catalog_unused_dir_rm_timeout_sec, 30 * 24 * 60 * 60, R"(Parameter of the background task that cleaned up garbage from the `store/` directory: the time after which the task removed an unused directory. The setting is deprecated and has no effect: the task was removed, and ClickHouse never hides or removes unused directories in `store/` automatically.)", SettingsTierType::OBSOLETE) \
+ DECLARE(UInt64, database_catalog_unused_dir_cleanup_period_sec, 24 * 60 * 60, R"(Parameter of the background task that cleaned up garbage from the `store/` directory: the scheduling period of the task. The setting is deprecated and has no effect: the task was removed, and ClickHouse never hides or removes unused directories in `store/` automatically.)", SettingsTierType::OBSOLETE) \
DECLARE(UInt64, database_catalog_drop_error_cooldown_sec, 5, R"(In case of a failed table drop, ClickHouse will wait for this time-out before retrying the operation.)", 0) \
DECLARE(UInt64, database_catalog_drop_table_concurrency, 16, R"(The size of the threadpool used for dropping tables.)", 0) \
\
diff --git a/src/Core/Settings.cpp b/src/Core/Settings.cpp
index 841c225b473c..80a693fb30f6 100644
--- a/src/Core/Settings.cpp
+++ b/src/Core/Settings.cpp
@@ -2717,6 +2717,22 @@ Possible values:
- 0 — The column name is substituted with the alias.
- 1 — The column name is not substituted with the alias.
+If the column name is ambiguous between joined tables and an alias with the same name exists, the alias is used:
+
+```sql
+SET prefer_column_name_to_alias = 1;
+SELECT t1.id + 10 AS id, id AS x
+FROM (SELECT 1 AS id) AS t1, (SELECT 1 AS k) AS t2, (SELECT 2 AS id) AS t3;
+```
+
+```text
+┌─id─┬──x─┐
+│ 11 │ 11 │
+└────┴────┘
+```
+
+Here `id` in `id AS x` is a column of both `t1` and `t3`, so it resolves to the alias `t1.id + 10`.
+
**Example**
The difference between enabled and disabled:
@@ -7256,7 +7272,7 @@ Cloud default value: `1`.
Allow new query analyzer.
)", IMPORTANT, enable_analyzer) \
DECLARE(Bool, analyzer_compatibility_join_using_top_level_identifier, false, R"(
-Force to resolve identifier in JOIN USING from projection (for example, in `SELECT a + 1 AS b FROM t1 JOIN t2 USING (b)` join will be performed by `t1.a + 1 = t2.b`, rather then `t1.b = t2.b`).
+Force to resolve identifier in JOIN USING from projection (for example, in `SELECT a + 1 AS b FROM t1 JOIN t2 USING (b)` join will be performed by `t1.a + 1 = t2.b`, rather then `t1.b = t2.b`). In a query with several `JOIN`s only the outermost `JOIN` resolves its `USING` identifier from an alias; an inner `JOIN` resolves it from its left table, as the old analyzer did.
)", 0) \
DECLARE(Bool, analyzer_compatibility_allow_compound_identifiers_in_unflatten_nested, true, R"(
Allow to add compound identifiers to nested. This is a compatibility setting because it changes the query result. When disabled, `SELECT a.b.c FROM table ARRAY JOIN a` does not work, and `SELECT a FROM table` does not include `a.b.c` column into `Nested a` result.
@@ -8632,9 +8648,9 @@ void Settings::write(WriteBuffer & out, SettingsWriteFormat format) const
impl->write(out, format);
}
-void Settings::read(ReadBuffer & in, SettingsWriteFormat format)
+void Settings::read(ReadBuffer & in, SettingsWriteFormat format, bool skip_invalid_values)
{
- impl->read(in, format);
+ impl->read(in, format, skip_invalid_values);
}
void Settings::writeEmpty(WriteBuffer & out)
diff --git a/src/Core/Settings.h b/src/Core/Settings.h
index 19f6c672cb7e..8098257c45a0 100644
--- a/src/Core/Settings.h
+++ b/src/Core/Settings.h
@@ -162,7 +162,7 @@ struct Settings
NameToNameMap toNameToNameMap() const;
void write(WriteBuffer & out, SettingsWriteFormat format = SettingsWriteFormat::DEFAULT) const;
- void read(ReadBuffer & in, SettingsWriteFormat format = SettingsWriteFormat::DEFAULT);
+ void read(ReadBuffer & in, SettingsWriteFormat format = SettingsWriteFormat::DEFAULT, bool skip_invalid_values = false);
/// Equivalent to Settings().write(out, ) but faster.
static void writeEmpty(WriteBuffer & out);
diff --git a/src/Core/SettingsFields.cpp b/src/Core/SettingsFields.cpp
index 14ac68e209ab..ac533bcf9a84 100644
--- a/src/Core/SettingsFields.cpp
+++ b/src/Core/SettingsFields.cpp
@@ -315,14 +315,14 @@ namespace
if (d != 0.0 && !std::isnormal(d))
throw Exception(
ErrorCodes::CANNOT_PARSE_NUMBER, "A setting's value in seconds must be a normal floating point number or zero. Got {}", d);
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wimplicit-const-int-float-conversion"
- if (d * 1000000 > std::numeric_limits::max() || d * 1000000 < std::numeric_limits::min())
+ if (d < 0)
+ throw Exception(ErrorCodes::BAD_ARGUMENTS, "A setting's value in seconds cannot be negative. Got {}", d);
+ const Float64 microseconds = d * 1000000;
+ if (accurate::greaterOp(microseconds, std::numeric_limits::max()))
throw Exception(
ErrorCodes::BAD_ARGUMENTS, "Cannot convert seconds to microseconds: the setting's value in seconds is too big: {}", d);
-#pragma clang diagnostic pop
- return static_cast(d * 1000000);
+ return static_cast(microseconds);
}
}
diff --git a/src/Core/tests/gtest_field.cpp b/src/Core/tests/gtest_field.cpp
index 560370bbd0c9..aa495ea93652 100644
--- a/src/Core/tests/gtest_field.cpp
+++ b/src/Core/tests/gtest_field.cpp
@@ -1,5 +1,6 @@
#include
#include
+#include
#include
#include
#include
@@ -9,6 +10,8 @@ namespace DB::ErrorCodes
{
extern const int TOO_DEEP_RECURSION;
extern const int ARGUMENT_OUT_OF_BOUND;
+ extern const int CANNOT_PARSE_NUMBER;
+ extern const int DECIMAL_OVERFLOW;
}
using namespace DB;
@@ -210,3 +213,76 @@ GTEST_TEST(Field, RestoreFromDumpDecimalOutOfRangeScaleThrows)
Field restored = Field::restoreFromDump("Decimal64_'1e-5'");
ASSERT_EQ(restored.safeGet>().getScale(), 5u);
}
+
+static void expectRestoreFromDumpError(const std::string & dump, int code)
+{
+ try
+ {
+ Field::restoreFromDump(dump);
+ FAIL() << "expected error " << code << " for " << dump;
+ }
+ catch (const Exception & e)
+ {
+ EXPECT_EQ(e.code(), code) << dump;
+ }
+}
+
+GTEST_TEST(Field, RestoreFromDumpDecimalExtremeExponent)
+{
+ /// Negating `INT32_MIN` must not be reached.
+ expectRestoreFromDumpError("Decimal64_'1e-2147483648'", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
+ /// The exponent sum overflows `int32_t` (only digits after the point decrease it).
+ expectRestoreFromDumpError("Decimal64_'0.1e-2147483648'", ErrorCodes::CANNOT_PARSE_NUMBER);
+ /// `scaleMultiplier` saturates beyond the precision, so `1 * max` must not be accepted as the value.
+ expectRestoreFromDumpError("Decimal64_'1e100'", ErrorCodes::DECIMAL_OVERFLOW);
+ expectRestoreFromDumpError("Decimal32_'1e2147483647'", ErrorCodes::DECIMAL_OVERFLOW);
+ expectRestoreFromDumpError("Decimal256_'1e100'", ErrorCodes::DECIMAL_OVERFLOW);
+ /// No digits at all.
+ expectRestoreFromDumpError("Decimal64_'.'", ErrorCodes::CANNOT_PARSE_NUMBER);
+ expectRestoreFromDumpError("Decimal64_'-'", ErrorCodes::CANNOT_PARSE_NUMBER);
+ expectRestoreFromDumpError("Decimal64_''", ErrorCodes::CANNOT_PARSE_NUMBER);
+
+ /// The largest exponents that fit still work, and zero takes any positive exponent.
+ ASSERT_EQ(Field::restoreFromDump("Decimal64_'1e18'").safeGet>().getValue(), Decimal64(1000000000000000000LL));
+ ASSERT_EQ(Field::restoreFromDump("Decimal64_'1e-18'").safeGet>().getScale(), 18u);
+ ASSERT_EQ(Field::restoreFromDump("Decimal64_'0e2147483647'").safeGet>().getValue(), Decimal64(0));
+}
+
+GTEST_TEST(Field, RestoreFromDumpDecimalMantissaOverflow)
+{
+ /// A mantissa that does not fit the native integer must not wrap (here to zero, skipping the exponent check).
+ expectRestoreFromDumpError("Decimal32_'4294967296e2147483647'", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
+ expectRestoreFromDumpError("Decimal64_'18446744073709551616e2147483647'", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
+ expectRestoreFromDumpError("Decimal32_'2147483648'", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
+ expectRestoreFromDumpError("Decimal128_'170141183460469231731687303715884105728'", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
+ expectRestoreFromDumpError("Decimal256_'-57896044618658097711785492504343953926634992332820282019728792003956564819969'", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
+
+ /// The exponent must not wrap the wide types either.
+ expectRestoreFromDumpError("Decimal128_'2e38'", ErrorCodes::DECIMAL_OVERFLOW);
+ expectRestoreFromDumpError("Decimal128_'-18e37'", ErrorCodes::DECIMAL_OVERFLOW);
+ expectRestoreFromDumpError("Decimal256_'6e76'", ErrorCodes::DECIMAL_OVERFLOW);
+ expectRestoreFromDumpError("Decimal256_'-58e75'", ErrorCodes::DECIMAL_OVERFLOW);
+ ASSERT_EQ(Field::restoreFromDump("Decimal128_'17e37'").safeGet>().getValue(), Decimal128(Int128(17) * DecimalUtils::scaleMultiplier(37)));
+ ASSERT_EQ(Field::restoreFromDump("Decimal256_'-57e75'").safeGet>().getValue().value, Int256(-57) * DecimalUtils::scaleMultiplier(75));
+
+ /// The full native range and the scale (trailing zeroes) round-trip through a dump.
+ auto round_trip = [](const DecimalField & decimal)
+ {
+ const String dump = Field(decimal).dump();
+ const auto restored = Field::restoreFromDump(dump).safeGet>();
+ EXPECT_EQ(restored.getValue(), decimal.getValue()) << dump;
+ EXPECT_EQ(restored.getScale(), decimal.getScale()) << dump;
+ };
+ round_trip(DecimalField(std::numeric_limits::max(), 0));
+ round_trip(DecimalField(std::numeric_limits::min(), 3));
+ round_trip(DecimalField(std::numeric_limits::max(), 18));
+ round_trip(DecimalField(std::numeric_limits::min(), 0));
+ round_trip(DecimalField(std::numeric_limits::max(), 38));
+ round_trip(DecimalField(std::numeric_limits::min(), 1));
+ round_trip(DecimalField(std::numeric_limits::max(), 0));
+ round_trip(DecimalField(std::numeric_limits::min(), 76));
+ round_trip(DecimalField(100, 2));
+ round_trip(DecimalField(100, 1));
+ round_trip(DecimalField(0, 3));
+ round_trip(DecimalField(-1000, 18));
+}
diff --git a/src/Core/tests/gtest_settings.cpp b/src/Core/tests/gtest_settings.cpp
index 21fff5dc25b5..de4508ad0f4f 100644
--- a/src/Core/tests/gtest_settings.cpp
+++ b/src/Core/tests/gtest_settings.cpp
@@ -15,6 +15,7 @@
#include
#include
+#include
#include
namespace DB::ErrorCodes
@@ -22,6 +23,9 @@ namespace DB::ErrorCodes
extern const int ATTEMPT_TO_READ_AFTER_EOF;
extern const int TOO_LARGE_STRING_SIZE;
extern const int ARGUMENT_OUT_OF_BOUND;
+ extern const int BAD_ARGUMENTS;
+ extern const int CANNOT_PARSE_BOOL;
+ extern const int UNKNOWN_LOAD_BALANCING;
}
namespace
@@ -337,3 +341,66 @@ GTEST_TEST(Settings, CustomFlaggedDecimalWithOutOfRangeScaleRejected)
ASSERT_EQ(e.code(), ErrorCodes::ARGUMENT_OUT_OF_BOUND);
}
}
+
+GTEST_TEST(Settings, SkipInvalidValuesKeepsTheDefaultsAndReadsTheRest)
+{
+ /// The settings a server of an older version sends in `Hello` may hold values this version rejects.
+ using Entry = std::tuple;
+ auto wire = [](std::initializer_list entries)
+ {
+ WriteBufferFromOwnString out;
+ for (const auto & [name, flags, value] : entries)
+ {
+ BaseSettingsHelpers::writeString(name, out);
+ BaseSettingsHelpers::writeFlags(flags, out);
+ BaseSettingsHelpers::writeString(value, out);
+ }
+ BaseSettingsHelpers::writeString("", out); /// end of settings
+ return out.str();
+ };
+
+ auto read_error_code = [](const String & bytes, bool skip_invalid_values)
+ {
+ ReadBufferFromString in(bytes);
+ Settings settings;
+ try
+ {
+ settings.read(in, SettingsWriteFormat::STRINGS_WITH_FLAGS, skip_invalid_values);
+ }
+ catch (const Exception & e)
+ {
+ return e.code();
+ }
+ return 0;
+ };
+
+ const String bytes = wire({
+ /// In this version a negative value of a `Seconds` setting is rejected when it is assigned from a `Field`,
+ /// but not when it is parsed from a string.
+ {"max_execution_time", {}, "-1"},
+ {"max_block_size", {}, "0"}, /// `NonZeroUInt64` assigns the value before it rejects it.
+ {"log_queries", {}, "maybe"},
+ {"max_threads", {}, "4"},
+ });
+ ReadBufferFromString in(bytes);
+ Settings settings;
+ settings.read(in, SettingsWriteFormat::STRINGS_WITH_FLAGS, /* skip_invalid_values= */ true);
+ const SettingsChanges changes = settings.changes();
+ ASSERT_EQ(changes.size(), 1u);
+ ASSERT_EQ(changes[0].name, "max_threads");
+ ASSERT_EQ(changes[0].value, Field(UInt64(4)));
+ ASSERT_FALSE(settings.isChanged("max_execution_time"));
+ ASSERT_FALSE(settings.isChanged("max_block_size"));
+ ASSERT_EQ(settings.get("max_block_size"), Settings().get("max_block_size"));
+ ASSERT_FALSE(settings.isChanged("log_queries"));
+
+ /// Every change that was read can be applied as a `Field`, which is what the client does with them.
+ Settings applied;
+ applied.applyChanges(changes);
+
+ /// The default read stays strict; an important setting and other error codes are not skipped.
+ ASSERT_EQ(read_error_code(bytes, false), ErrorCodes::BAD_ARGUMENTS);
+ ASSERT_EQ(read_error_code(wire({{"log_queries", {}, "maybe"}}), false), ErrorCodes::CANNOT_PARSE_BOOL);
+ ASSERT_EQ(read_error_code(wire({{"max_execution_time", BaseSettingsHelpers::Flags::IMPORTANT, "-1"}}), true), ErrorCodes::BAD_ARGUMENTS);
+ ASSERT_EQ(read_error_code(wire({{"load_balancing", {}, "nonsense"}}), true), ErrorCodes::UNKNOWN_LOAD_BALANCING);
+}
diff --git a/src/DataTypes/Serializations/SerializationInfo.cpp b/src/DataTypes/Serializations/SerializationInfo.cpp
index cbae0c80aae7..e7f79bfdd14b 100644
--- a/src/DataTypes/Serializations/SerializationInfo.cpp
+++ b/src/DataTypes/Serializations/SerializationInfo.cpp
@@ -231,12 +231,6 @@ void SerializationInfo::checkKindStack(ISerialization::KindSet allowed_kinds) co
for (auto kind : kind_stack)
{
- if (!allowed_kinds.contains(kind))
- throw Exception(
- ErrorCodes::INCORRECT_DATA,
- "Unexpected serialization kind {} in the received data",
- ISerialization::kindToString(kind));
-
expected = std::find(expected, canonical_kind_order.end(), kind);
if (expected == canonical_kind_order.end())
throw Exception(
@@ -246,6 +240,14 @@ void SerializationInfo::checkKindStack(ISerialization::KindSet allowed_kinds) co
++expected;
}
+
+ /// A well-formed stack is checked from the outermost kind, the first one a consumer would have to unwrap.
+ for (auto it = kind_stack.rbegin(); it != kind_stack.rend(); ++it)
+ if (!allowed_kinds.contains(*it))
+ throw Exception(
+ ErrorCodes::INCORRECT_DATA,
+ "Unexpected serialization kind {} in the received data",
+ ISerialization::kindToString(*it));
}
void SerializationInfo::deserializeFromKindsBinary(ReadBuffer & in, ISerialization::KindSet allowed_kinds)
diff --git a/src/DataTypes/Serializations/SerializationInfoTuple.cpp b/src/DataTypes/Serializations/SerializationInfoTuple.cpp
index 7807d2d5e846..bc806b1ac9dd 100644
--- a/src/DataTypes/Serializations/SerializationInfoTuple.cpp
+++ b/src/DataTypes/Serializations/SerializationInfoTuple.cpp
@@ -161,8 +161,9 @@ void SerializationInfoTuple::deserializeFromKindsBinary(ReadBuffer & in, ISerial
{
SerializationInfo::deserializeFromKindsBinary(in, allowed_kinds);
- /// A detached blob always covers a whole column, never a single tuple element.
- auto elements_allowed_kinds = allowed_kinds.without(ISerialization::Kind::DETACHED);
+ /// `Detached` and `Replicated` always wrap a whole column, never a single tuple element:
+ /// no writer builds such an element, and both are unwrapped only at the top level of a column.
+ auto elements_allowed_kinds = allowed_kinds.without(ISerialization::Kind::DETACHED).without(ISerialization::Kind::REPLICATED);
for (const auto & elem : elems)
elem->deserializeFromKindsBinary(in, elements_allowed_kinds);
}
diff --git a/src/Databases/DatabaseFactory.cpp b/src/Databases/DatabaseFactory.cpp
index 4b518dd89080..fa2185afed5e 100644
--- a/src/Databases/DatabaseFactory.cpp
+++ b/src/Databases/DatabaseFactory.cpp
@@ -59,8 +59,8 @@ void cckMetadataPathForOrdinary(const ASTCreateQuery & create, const String & me
/// Between 20.7 and 22.7 metadata/db_name.sql was created in this case as well.
/// Since 20.7 `default` database is created with Atomic engine on the very first server run.
/// The problem is that if server crashed during the very first run and metadata/db_name/ -> store/whatever symlink was created
- /// then it's considered as Ordinary database. And it even works somehow
- /// until background task tries to remove unused dir from store/...
+ /// then it's considered as Ordinary database. And it even worked somehow
+ /// until the background task (which no longer exists) tried to remove the unused dir from store/...
throw Exception(ErrorCodes::CANNOT_CREATE_DATABASE,
"Metadata directory {} for Ordinary database {} is a symbolic link to {}. "
"It may be a result of manual intervention, crash on very first server start or a bug. "
diff --git a/src/Databases/DatabaseFilesystem.cpp b/src/Databases/DatabaseFilesystem.cpp
index 6e5e3010d685..34826778564b 100644
--- a/src/Databases/DatabaseFilesystem.cpp
+++ b/src/Databases/DatabaseFilesystem.cpp
@@ -18,6 +18,8 @@
#include
#include
#include
+#include
+#include
#include
#include
@@ -43,6 +45,31 @@ namespace ErrorCodes
extern const int FILE_DOESNT_EXIST;
}
+namespace
+{
+
+/// Whether `table_path`, already normalized, stays inside `directory`. The `file` table function
+/// expands `{a,b}` groups before it walks the filesystem and does not normalize the result, so an
+/// alternative carrying a `..` is refused instead of being resolved against a possible symlink.
+bool isInsideDirectory(const String & table_path, const String & directory)
+{
+ if (!containsGlobs(table_path))
+ return fileOrSymlinkPathStartsWith(table_path, directory);
+
+ for (const auto & expanded_path : expandSelectionGlob(table_path))
+ {
+ for (const auto & component : fs::path(expanded_path))
+ if (component == "..")
+ return false;
+
+ if (!fileOrSymlinkPathStartsWith(expanded_path, directory))
+ return false;
+ }
+ return true;
+}
+
+}
+
DatabaseFilesystem::DatabaseFilesystem(
const String & name_, const String & path_, ContextPtr context_, bool is_internal_metadata_replay)
: IDatabase(name_), WithContext(context_->getGlobalContext()), path(path_), log(getLogger("DatabaseFileSystem(" + name_ + ")"))
@@ -105,6 +132,10 @@ bool DatabaseFilesystem::checkTableFilePath(const std::string & table_path, Cont
throw Exception(ErrorCodes::PATH_ACCESS_DENIED, "File is not inside {}", user_files_path);
}
+ /// A table of this database is a file under its own directory, not anywhere in `user_files`.
+ if (check_path && !isInsideDirectory(table_path, path))
+ throw Exception(ErrorCodes::PATH_ACCESS_DENIED, "File is not inside the database directory {}", path);
+
if (!containsGlobs(table_path))
{
/// Check if the corresponding file exists.
diff --git a/src/Databases/DatabaseOnDisk.cpp b/src/Databases/DatabaseOnDisk.cpp
index c3e3756181d8..7d2a82ea83e7 100644
--- a/src/Databases/DatabaseOnDisk.cpp
+++ b/src/Databases/DatabaseOnDisk.cpp
@@ -484,11 +484,9 @@ void DatabaseOnDisk::renameTable(
if (auto * target_db = dynamic_cast(&to_database))
target_db->checkMetadataFilenameAvailability(to_table_name);
- /// This place is actually quite dangerous. Since data directory is moved to store/
- /// DatabaseCatalog may try to clean it up as unused. We add UUID mapping to avoid this.
- /// However, we may fail after data directory move, but before metadata file creation in the destination db.
- /// In this case nothing will protect data directory (except 30-days timeout).
- /// But this situation (when table in Ordinary database is partially renamed) require manual intervention anyway.
+ /// The data directory is moved to store/, so the UUID must be marked as used first (see `DatabaseCatalog::addUUIDMapping`).
+ /// We may fail after data directory move, but before metadata file creation in the destination db.
+ /// This situation (when table in Ordinary database is partially renamed) requires manual intervention.
if (from_ordinary_to_atomic)
{
DatabaseCatalog::instance().addUUIDMapping(create.uuid);
diff --git a/src/Databases/DatabaseOrdinary.cpp b/src/Databases/DatabaseOrdinary.cpp
index d7ef12962b2f..27ef012a5fba 100644
--- a/src/Databases/DatabaseOrdinary.cpp
+++ b/src/Databases/DatabaseOrdinary.cpp
@@ -160,12 +160,20 @@ void DatabaseOrdinary::checkReplicaPathIsSafe(const ASTCreateQuery & create_quer
/*validate_substitutions=*/true);
}
+String DatabaseOrdinary::getConvertedMergeTreeEngineName(const String & engine_name, bool replicated)
+{
+ if (replicated)
+ return "Replicated" + engine_name;
+ chassert(engine_name.starts_with("Replicated"));
+ return engine_name.substr(strlen("Replicated"));
+}
+
void DatabaseOrdinary::setMergeTreeEngine(ASTCreateQuery & create_query, ContextPtr local_context, bool replicated)
{
auto * storage = create_query.storage;
auto args = make_intrusive();
auto engine = make_intrusive();
- String engine_name;
+ const String engine_name = getConvertedMergeTreeEngineName(storage->engine->name, replicated);
if (replicated)
{
@@ -182,8 +190,6 @@ void DatabaseOrdinary::setMergeTreeEngine(ASTCreateQuery & create_query, Context
for (size_t i = 0; i < storage->engine->arguments->children.size(); ++i)
args->children.push_back(storage->engine->arguments->children[i]->clone());
}
-
- engine_name = "Replicated" + storage->engine->name;
}
else
{
@@ -193,8 +199,6 @@ void DatabaseOrdinary::setMergeTreeEngine(ASTCreateQuery & create_query, Context
for (size_t i = 2; i < storage->engine->arguments->children.size(); ++i)
args->children.push_back(storage->engine->arguments->children[i]->clone());
}
-
- engine_name = storage->engine->name.substr(strlen("Replicated"));
}
/// Set new engine for the old query
diff --git a/src/Databases/DatabaseOrdinary.h b/src/Databases/DatabaseOrdinary.h
index 4360b695a2aa..628d5c13279c 100644
--- a/src/Databases/DatabaseOrdinary.h
+++ b/src/Databases/DatabaseOrdinary.h
@@ -87,6 +87,10 @@ class DatabaseOrdinary : public DatabaseOnDisk
static void setMergeTreeEngine(ASTCreateQuery & create_query, ContextPtr context, bool replicated);
+ /// The name of the engine that `setMergeTreeEngine` sets for a table of the engine `engine_name`.
+ /// For `replicated = false`, `engine_name` must start with `Replicated`.
+ static String getConvertedMergeTreeEngineName(const String & engine_name, bool replicated);
+
/// Rejects a conversion to a replicated engine whose Keeper path would not be a safe one.
/// Contacts nothing and mutates nothing, so a caller can run it before its own side effects.
static void checkReplicaPathIsSafe(const ASTCreateQuery & create_query, ContextPtr context);
diff --git a/src/Databases/PostgreSQL/fetchPostgreSQLTableStructure.cpp b/src/Databases/PostgreSQL/fetchPostgreSQLTableStructure.cpp
index 50dbf8ed4cd8..29a4aac9e4ba 100644
--- a/src/Databases/PostgreSQL/fetchPostgreSQLTableStructure.cpp
+++ b/src/Databases/PostgreSQL/fetchPostgreSQLTableStructure.cpp
@@ -30,6 +30,29 @@ namespace ErrorCodes
extern const int UNKNOWN_TABLE;
extern const int BAD_ARGUMENTS;
extern const int LOGICAL_ERROR;
+ extern const int INCORRECT_DATA;
+}
+
+namespace
+{
+
+/// PostgreSQL itself does not allow more than 6 dimensions (MAXDIM). The number comes from the remote server,
+/// and each dimension is one more level of `Array`, so refuse absurd values instead of building a type
+/// so deep that working with it exhausts the stack.
+constexpr Int64 MAX_POSTGRESQL_ARRAY_DIMENSIONS = 100;
+
+DataTypePtr wrapInArrays(DataTypePtr type, Int64 dimensions)
+{
+ if (dimensions < 1 || dimensions > MAX_POSTGRESQL_ARRAY_DIMENSIONS)
+ throw Exception(ErrorCodes::INCORRECT_DATA,
+ "PostgreSQL array has unsupported number of dimensions: {} (must be from 1 to {})",
+ dimensions, MAX_POSTGRESQL_ARRAY_DIMENSIONS);
+
+ for (Int64 i = 0; i < dimensions; ++i)
+ type = std::make_shared(type);
+ return type;
+}
+
}
@@ -156,8 +179,7 @@ static DataTypePtr convertPostgreSQLDataType(String & type, Fn auto && r
}
else
{
- while (dimensions--)
- res = std::make_shared(res);
+ res = wrapInArrays(res, dimensions);
}
}
@@ -276,9 +298,7 @@ PostgreSQLTableStructure::ColumnsInfoPtr readNamesAndTypesList(
int dimensions = result[0][1].as();
/// It is always 1d array if it is in recheck.
- DataTypePtr type = assert_cast(name_and_type.type.get())->getNestedType();
- while (dimensions--)
- type = std::make_shared(type);
+ DataTypePtr type = wrapInArrays(assert_cast(name_and_type.type.get())->getNestedType(), dimensions);
columns[i] = NameAndTypePair(name_and_type.name, type);
}
diff --git a/src/Dictionaries/HTTPDictionarySource.cpp b/src/Dictionaries/HTTPDictionarySource.cpp
index acad7babb588..051b21de8bd3 100644
--- a/src/Dictionaries/HTTPDictionarySource.cpp
+++ b/src/Dictionaries/HTTPDictionarySource.cpp
@@ -11,6 +11,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -86,9 +87,17 @@ void HTTPDictionarySource::getUpdateFieldAndDate(Poco::URI & uri)
}
}
+void HTTPDictionarySource::checkCredentials() const
+{
+ /// Per request: a loaded source is kept and cloned across updates, and can change meanwhile.
+ if (configuration.created_from_ddl)
+ context->getHTTPHeaderFilter().checkBasicCredentials(credentials);
+}
+
BlockIO HTTPDictionarySource::loadAll()
{
LOG_TRACE(log, "loadAll {}", toString());
+ checkCredentials();
Poco::URI uri(configuration.url);
@@ -106,9 +115,12 @@ BlockIO HTTPDictionarySource::loadAll()
BlockIO HTTPDictionarySource::loadUpdatedAll()
{
+ checkCredentials();
Poco::URI uri(configuration.url);
getUpdateFieldAndDate(uri);
- LOG_TRACE(log, "loadUpdatedAll {}", uri.toString());
+ String masked_uri = uri.toString();
+ maskURICredentials(masked_uri);
+ LOG_TRACE(log, "loadUpdatedAll {}", masked_uri);
auto buf = BuilderRWBufferFromHTTP(uri)
.withConnectionGroup(HTTPConnectionGroupType::STORAGE)
@@ -126,6 +138,7 @@ BlockIO HTTPDictionarySource::loadUpdatedAll()
BlockIO HTTPDictionarySource::loadIds(const VectorWithMemoryTracking & ids)
{
LOG_TRACE(log, "loadIds {} size = {}", toString(), ids.size());
+ checkCredentials();
auto block = blockForIds(dict_struct, ids);
@@ -157,6 +170,7 @@ BlockIO HTTPDictionarySource::loadIds(const VectorWithMemoryTracking & i
BlockIO HTTPDictionarySource::loadKeys(const Columns & key_columns, const VectorWithMemoryTracking & requested_rows)
{
LOG_TRACE(log, "loadKeys {} size = {}", toString(), requested_rows.size());
+ checkCredentials();
auto block = blockForKeys(dict_struct, key_columns, requested_rows);
@@ -207,8 +221,10 @@ DictionarySourcePtr HTTPDictionarySource::clone() const
std::string HTTPDictionarySource::toString() const
{
- Poco::URI uri(configuration.url);
- return uri.toString();
+ /// Shown in `system.dictionaries` and in the logs.
+ String uri = Poco::URI(configuration.url).toString();
+ maskURICredentials(uri);
+ return uri;
}
void registerDictionarySourceHTTP(DictionarySourceFactory & factory)
@@ -304,7 +320,8 @@ void registerDictionarySourceHTTP(DictionarySourceFactory & factory)
.format = format,
.update_field = config.getString(settings_config_prefix + ".update_field", ""),
.update_lag = config.getUInt64(settings_config_prefix + ".update_lag", 1),
- .header_entries = std::move(header_entries)
+ .header_entries = std::move(header_entries),
+ .created_from_ddl = created_from_ddl
};
return std::make_unique(dict_struct, configuration, credentials, sample_block, context);
diff --git a/src/Dictionaries/HTTPDictionarySource.h b/src/Dictionaries/HTTPDictionarySource.h
index b3638051ec24..2a9b845846f6 100644
--- a/src/Dictionaries/HTTPDictionarySource.h
+++ b/src/Dictionaries/HTTPDictionarySource.h
@@ -31,6 +31,8 @@ class HTTPDictionarySource final : public IDictionarySource
const std::string update_field;
const UInt64 update_lag;
const HTTPHeaderEntries header_entries;
+ /// Whether the dictionary was created via DDL (`CREATE DICTIONARY`).
+ const bool created_from_ddl = false;
};
HTTPDictionarySource(
@@ -64,6 +66,8 @@ class HTTPDictionarySource final : public IDictionarySource
private:
void getUpdateFieldAndDate(Poco::URI & uri);
+ void checkCredentials() const;
+
// wrap buffer using encoding from made request
QueryPipeline createWrappedBuffer(std::unique_ptr http_buffer);
diff --git a/src/Dictionaries/IDictionary.h b/src/Dictionaries/IDictionary.h
index 754037e9d386..dfb2688fe330 100644
--- a/src/Dictionaries/IDictionary.h
+++ b/src/Dictionaries/IDictionary.h
@@ -97,7 +97,12 @@ class IDictionary : public IExternalLoadable, public IKeyValueEntity
std::string getDatabaseOrNoDatabaseTag() const
{
std::lock_guard lock{mutex};
+ return getDatabaseOrNoDatabaseTag(dictionary_id);
+ }
+ /// The database name used for access checks of the dictionary with the given ID.
+ static std::string getDatabaseOrNoDatabaseTag(const StorageID & dictionary_id)
+ {
if (!dictionary_id.database_name.empty())
return dictionary_id.database_name;
diff --git a/src/Dictionaries/MongoDBDictionarySource.cpp b/src/Dictionaries/MongoDBDictionarySource.cpp
index 21fc0088c6ba..3b9f964193e2 100644
--- a/src/Dictionaries/MongoDBDictionarySource.cpp
+++ b/src/Dictionaries/MongoDBDictionarySource.cpp
@@ -9,6 +9,7 @@
#include
#include
+#include
#include
#include
#include
@@ -210,7 +211,10 @@ BlockIO MongoDBDictionarySource::loadKeys(const Columns & key_columns, const Vec
std::string MongoDBDictionarySource::toString() const
{
- return fmt::format("MongoDB: {}", configuration->uri->to_string());
+ /// Shown in `system.dictionaries` and in the logs.
+ String uri = configuration->uri->to_string();
+ maskURIPassword(&uri);
+ return fmt::format("MongoDB: {}", uri);
}
#endif
diff --git a/src/Disks/DiskEncrypted.cpp b/src/Disks/DiskEncrypted.cpp
index 3433b7e9cf8c..f208abeff6ea 100644
--- a/src/Disks/DiskEncrypted.cpp
+++ b/src/Disks/DiskEncrypted.cpp
@@ -2,6 +2,7 @@
#if USE_SSL
#include
+#include
#include
#include
#include
@@ -13,10 +14,14 @@
#include
#include
#include
+
#if CLICKHOUSE_CLOUD
#include
#endif
+#include
+#include
+
namespace DB
{
@@ -185,6 +190,16 @@ namespace
return parseAlgorithmFromString(config.getString(path));
}
+ void checkCustomDiskPathIsInsideWrappedDisk(const String & path)
+ {
+ std::filesystem::path fs_path(path);
+ if (fs_path.is_absolute() || std::ranges::any_of(fs_path, [](const auto & component) { return component == ".."; }))
+ throw Exception(
+ ErrorCodes::BAD_ARGUMENTS,
+ "Path of the encrypted custom disk must be relative to the wrapped disk and must not contain `..`, but got {}",
+ quoteString(path));
+ }
+
/// Reads the name of a wrapped disk & the path on the wrapped disk and then finds that disk in a disk map.
void getDiskAndPathFromConfig(const Poco::Util::AbstractConfiguration & config, const String & config_prefix, const DisksMap & map,
DiskPtr & out_disk, String & out_path)
@@ -519,11 +534,24 @@ void registerDiskEncrypted(DiskFactory & factory, bool global_skip_access_check)
const String & name,
const Poco::Util::AbstractConfiguration & config,
const String & config_prefix,
- ContextPtr,
+ ContextPtr context,
const DisksMap & map,
- bool, bool) -> DiskPtr
+ bool attach,
+ bool custom_disk) -> DiskPtr
{
bool skip_access_check = global_skip_access_check || config.getBool(config_prefix + ".skip_access_check", false);
+
+ if (custom_disk && !attach)
+ {
+ DiskPtr wrapped_disk;
+ String path;
+ getDiskAndPathFromConfig(config, config_prefix, map, wrapped_disk, path);
+
+ checkCustomDiskPathIsInsideWrappedDisk(path);
+ if (!wrapped_disk->isRemote())
+ checkCustomLocalDiskPath(wrapped_disk->getPath() + path, context);
+ }
+
DiskPtr disk = std::make_shared(name, config, config_prefix, map);
disk->startup(skip_access_check);
return disk;
diff --git a/src/Disks/DiskFromAST.cpp b/src/Disks/DiskFromAST.cpp
index 44765fb4726d..6c4cb60aa3d4 100644
--- a/src/Disks/DiskFromAST.cpp
+++ b/src/Disks/DiskFromAST.cpp
@@ -1,11 +1,10 @@
#include
+#include
+#include
#include
#include
-#include
#include
#include
-#include
-#include
#include
#include
#include
@@ -17,6 +16,8 @@
#include
#include
+#include