179 Commits
Author SHA1 Message Date
Alexey MilovidovandClaude Opus 5.5 95df4ffeaa Address review: mirror DiskAccessStorage rebuild and fall through to a later non-XML storage in clickhouse install
When the access lists are rebuilt, only regular `<uuid>.sql` files are entities and unreadable or unparsable
files are skipped, like `DiskAccessStorage::reloadAllAndRebuildLists` does.

If no XML users config defines the default user and a storage that is not an XML users config follows
all of them, report that the default user may be defined there instead of reporting it as removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 10:20:15 +00:00
Alexey MilovidovandClaude Opus 5.5 fc2299f900 Address review: create a missing bare-relative users config in the config directory only for users.xml in clickhouse install
A bare-relative `users.yaml` / `users.yml` may point to a file in the working
directory of the server; creating it in the config directory would silently
switch the active users storage on the next start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:15:50 +00:00
Alexey MilovidovandClaude Opus 5.5 9686736c78 Address review: write the default user password to the merge directory applied last in clickhouse install
`ConfigProcessor::getConfigMergeFiles` merges both `<name>.d` and `conf.d` of a users config,
sorted by full paths. For a custom users config like `a.xml`, `conf.d` is applied after `a.d`,
so `default-password.xml` written to `a.d` could be overridden by a `conf.d` fragment.
Choose whichever of the two directories is applied last.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 08:14:15 +00:00
Eduardo Gomez Saldias e9df878332 Address review: treat a user-level time_based_one_time_password as credentials in clickhouse install
The server checks a user-level OTP with every authentication method of the user, even `no_password` or
an empty password (`checkBasicAuthentication` returns `NeedSecondFactor` without it), so such a `default`
user cannot log in without credentials. `hasCredentials` now says so, so the installer no longer reports it
as accessible without a password and asks the `listen_host` question for it.
2026-10-05 21:30:44 +02:00
Alexey MilovidovandClaude Opus 5.5 8edcd29bed Address review: fix up all users configs and tell passwords from other credentials in clickhouse install
- Apply the ownership and permission fixups to every absolute XML users config the server loads
  and to its merge directories (`<name>.d` and `conf.d`, like `ConfigProcessor`), not only to the
  first users config and the `.d` directory of the one that defines the default user.
- Split `hasCredentials` (the default user cannot log in without credentials, used for the
  `listen_host` question) from the new `hasPassword` (used for the "Password for the default user
  is already specified" message and the `clickhouse-client --password` hint), so that e.g.
  `ssl_certificates`, `ssh_keys` or `kerberos` are not reported as a password.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 12:41:25 +00:00
Alexey MilovidovandClaude Opus 5.5 f9d517f6bb Address review: compare the stock users config extension case-insensitively in clickhouse install
`ConfigProcessor::parseConfig` treats the extension case-insensitively, so a
relative `users.YAML` / `users.XML` users config must also be treated as the
stock one and resolved against the config directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 07:47:37 +00:00
Alexey MilovidovandClaude Opus 5.5 eedf27dc17 Address review: do not treat no_password as a password for the default user in clickhouse install
`hasAuthentication` counts any configured method, including `no_password`, and is
right for deciding whether the installer may set up a password, but its result also
drove the "password is already specified" message, the `--password` hint for
`clickhouse-client`, and the prompt to accept connections from the network.

Split the two: `hasAuthentication` now only blocks the password prompt, while the new
`hasCredentials` (the flat fields and every entry of `auth_methods`, any of which
without credentials makes the user accessible without them) decides whether the
default user needs credentials. A default user configured with `no_password` gets
a dedicated message and no `--password` hint or `listen_host` prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 06:53:32 +00:00
Alexey MilovidovandClaude Opus 5.5 66f727451d Address review: check a just created users config for the default user in clickhouse install
When the first users config was missing, `clickhouse install` created it but skipped the scan
for the default user, so existing fragments in the companion `users.d` directory (e.g.
`<default remove="1" />`, or authentication for `default`) were ignored and the installer
still asked for a password. Run the same `ConfigProcessor`-based scan after creating the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 05:53:35 +00:00
Alexey MilovidovandClaude Opus 5.5 c1371eaf3a Address review: create a missing bare users.yaml / users.yml users config in the config directory
Like the stock `users.xml`, a bare relative `users.yaml` or `users.yml` as the first users config
is now resolved against the config directory, so `clickhouse install` seeds it from the YAML template
instead of treating it as resolved against the working directory of the server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 02:21:36 +00:00
Alexey MilovidovandClaude Opus 5.5 0e68f41c57 Address review: fix default-user auth detection, override location and YAML extension check in clickhouse install
- `hasAuthentication` now counts an authentication method by its presence, like
  `UsersConfigParser`: any of `no_password`, the hashed password fields, `ldap`,
  `kerberos`, `ssl_certificates`, `ssh_keys`, `http_authentication`,
  `auth_methods` or `time_based_one_time_password`, or a non-empty `password`.
  The installer's override replaces only a flat `password` with
  `password_sha256_hex`, so prompting in any other case would make the merged
  users config invalid.
- When the `default` user is removed from the first XML users config and defined
  in a later one, write `default-password.xml` into the `.d` directory of the
  config that defines it, instead of creating a new `default` user in the first
  one that would shadow the later definition.
- Compare the users config extension case-insensitively, like
  `ConfigProcessor::parseConfig`, when choosing between XML and YAML templates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:47:41 +00:00
Alexey MilovidovandClaude Opus 5.5 cd564b02e0 Fix style check: explain the catch (...) when reading access list files in clickhouse install
Same as `DiskAccessStorage::readLists`, a list file that cannot be read means the lists are rebuilt from the `.sql` files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 05:59:53 +00:00
Alexey MilovidovandClaude Opus 5.5 f2128c2131 Address review: mirror DiskAccessStorage list loading, don't skip a later relative users config
`isKnownWithoutDefaultUserDiskAccessStorage` now follows `DiskAccessStorage` startup:
if there is no `need_rebuild_lists.mark` and all `*.list` files can be read, only
`users.list` is consulted and unlisted `<id>.sql` files are ignored, as the server does;
otherwise all `<id>.sql` files are scanned, as in rebuild mode.

A later XML users config with a relative path that does not exist in the config directory
is resolved by the server against its working directory, which is not known here.
Previously the scan skipped it and could conclude that the default user was removed;
now it stops there and does not set up a password, reporting that the default user may be
defined in that file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 05:20:27 +00:00
Alexey MilovidovandClaude Opus 5.5 7b8c8c38cc Address review: don't move a non-stock relative users config into the config directory
`AccessControl` resolves a relative users config path against the working directory
of the server when the file does not exist in the config directory. Rewriting it to the
config directory and creating it there could silently switch the server to a new users
config. Only the stock `users.xml` keeps being created in the config directory; for any
other such path the installer neither creates the users config nor sets up a password.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 04:31:24 +00:00
Alexey MilovidovandClaude Opus 5.5 ac87dd636d Report why a disk access storage cannot be inspected in clickhouse install
Fixes the `catch_all` style check: the `catch (...)` in
`isKnownWithoutDefaultUserDiskAccessStorage` silently swallowed the exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 04:31:24 +00:00
Alexey MilovidovandClaude Opus 5.5 a1931fd266 Address review: look for the default user in a disk access storage instead of any .list file
A `DiskAccessStorage` writes empty `*.list` files after the first server start, and may hold only roles or settings profiles, so the existence of `*.list` or `*.sql` files does not mean that it defines the default user. `clickhouse install` now reads the names in `users.list` and deserializes the `<id>.sql` files (the two sources `DiskAccessStorage` loads users from), and treats the storage as shadowing the XML users config only if one of them defines `default`. An unreadable or corrupted directory still counts as possibly shadowing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 02:01:32 +00:00
Alexey MilovidovandClaude Opus 5.5 02bbf80911 Address review: keep creating the users config when a disk access storage precedes it, seed YAML users configs as YAML
- When `access_control_path` or a `local_directory` precedes every XML users config, the installer
  still creates the users config if it is missing (the server reads it), and only skips the password
  setup for the default user. A local directory storage that has no access entities (no `<id>.sql`
  or `*.list` files, or the directory does not exist) cannot define the default user, so it does not
  shadow the XML users config at all. Errors while inspecting the directory are treated as "not
  known empty" instead of being thrown.
- A missing users config with a `.yaml` / `.yml` extension is created from the embedded
  `users.yaml.example`, because `ConfigProcessor` parses the file according to its extension.
- A missing first users config with a relative path is created in the config directory again, as
  before this PR: once it exists there, the server resolves the relative path to it. Previously
  `clickhouse install` did not recreate `users.xml` for the stock `config.xml`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 21:44:47 +00:00
Alexey MilovidovandClaude Opus 5.5 d982f4089e Address review: don't trust the XML-only scan when a non-XML access storage can shadow default
`MultipleAccessStorage::find` looks up the default user across all access storages in order,
so a `local_directory`, `replicated` or `ldap` storage (or `access_control_path`) placed before
the XML users config that defines `default` may hold the effective default user. In that case
`clickhouse install` now neither writes `default-password.xml` nor reports the user as removed,
and prints which storage may define it instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 10:55:02 +00:00
Alexey MilovidovandClaude Opus 5.5 c2c6c6355b Fix -Wshadow in clickhouse install on macOS
On macOS, `mainEntryClickHouseInstall` has a local `path` holding the executable path,
so the new lambdas and the loop over users configs that also named their variable `path` broke the Darwin builds.

https://s3.amazonaws.com/clickhouse-test-reports/PRs/110438/226263bf3a966b9f6e3c33b2183e0dffd1466dde/pr/build_arm_darwin/build_clickhouse/build_clickhouse.log
Related: https://github.com/ClickHouse/ClickHouse/pull/110438

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 06:27:47 +00:00
Alexey MilovidovandClaude Opus 5.5 91fdcf477f Address review: recognize all auth carriers of default and chown an external users config
`clickhouse install` now treats the default user as secured if it has any authentication method
that `UsersConfigParser` accepts besides an empty password or `no_password`, including
`password_scram_sha256_hex` and entries of `auth_methods`.

When the active users config or its `.d` directory lives outside the config directory,
it is chowned to the server user before its permissions are tightened.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 05:30:25 +00:00
Alexey MilovidovandClaude Opus 5.5 74ddeeba80 Address review: resolve relative users config paths like AccessControl in clickhouse install
`AccessControl` prepends the config directory to a relative users config path
only if the file exists there; otherwise the server resolves it against its
working directory. The installer now does the same, and if the first XML users
config remains a bare relative path it neither creates nor modifies it and does
not set up a password for the default user.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 20:49:21 +00:00
Alexey MilovidovandClaude Opus 5.5 0d1c023481 Address review: check all XML users storages for the default user in clickhouse install
`AccessControl` reads users from the top-level `users_config` and from every XML
entry in `user_directories`, and `MultipleAccessStorage::find` falls through to
later storages when an earlier one does not define a user. Collect all XML users
configs in the server's order, keep the first one as the write target, and treat
the default user as removed only if none of them defines it; the password check
uses the first definition found.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 17:57:53 +00:00
Alexey MilovidovandClaude Opus 5.5 a3677e1189 Address review: enumerate user_directories like AccessControl in clickhouse install
Recognize every `users_xml` / `users.xml` / `users_config` entry under
`<user_directories>` (including indexed entries such as `users_xml[1]`),
the same way as `AccessControl::addStoragesFromUserDirectoriesConfig`,
and inspect the first one, instead of only `user_directories.users_xml.path`.
Otherwise a supported layout like `<users_config><path>...</path></users_config>`
made `clickhouse install` skip the password setup even though `default`
still existed with an empty password.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 13:04:27 +00:00
Alexey MilovidovandClaude Opus 5.5 7219cfea20 Resolve the users config path from config.xml in clickhouse install
Address review: the installer always assumed `<config-path>/users.xml`, but the
server takes the users config from `users_config` or
`user_directories.users_xml.path` (relative to the config directory), falls
back to the main config when neither `users_config` nor `user_directories`
is set, and reads no XML users config when `user_directories` has no
`users_xml`. Mirror `AccessControl::setupFromMainConfig`, derive the
matching `.d` directory, and skip the password setup when there is no XML
users config.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 07:51:26 +00:00
Eduardo Gomez Saldias 57f767e2d4 update variable name 2026-07-15 09:46:05 +02:00
Eduardo Gomez Saldias 50f7f317a2 Skip default-user password setup on install when default user is removed
Fixes #83887
2026-07-14 21:03:47 +02:00
Alexey Milovidov c6183beed9 Merge pull request #100399 from ClickHouse/clang-tidy-init-variables
Enable clang-tidy check for uninitialized variables
2026-05-31 21:56:29 -07:00
Alexey Milovidov 10a70647da Merge remote-tracking branch 'origin/master' into clang-tidy-init-variables
# Conflicts:
#	src/Client/BuzzHouse/Generator/QueryOracle.h
#	src/Functions/hilbertEncode.cpp
#	src/Interpreters/ProfileEventsExt.h
#	src/Storages/Statistics/ConditionSelectivityEstimator.cpp
#	src/Storages/Statistics/Statistics.cpp
#	src/Storages/Statistics/tests/gtest_stats.cpp
2026-05-19 16:20:47 +00:00
Alexey Milovidov 1085d7199b Merge remote-tracking branch 'origin/master' into fix-compiler-warnings 2026-05-19 15:05:56 +00:00
Raúl MarínandClaude Opus 4.7 632ac75db5 Share shellQuote and apply it to remaining shell sinks
Move the `shellQuote` helper out of `clickhouse install` into
`Common/shellQuote.h` so it can be reused. Apply it to two more
shell-command construction sites:

- `formatWithSudo` on FreeBSD wraps the inner command in `su -c '...'`.
  All current callers pass static literals, but an embedded single
  quote would break the wrapper. Quote the command via `shellQuote`
  so future callers can pass arbitrary strings safely.
- `clickhouse git-import` interpolates a commit hash parsed from
  `git log --pretty=%H` into `git show ... {hash}` and runs it via
  `/bin/sh -c`. `%H` is hex-only today, but a hand-crafted hash list
  or a future format change should not be able to inject shell
  syntax through the input.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 14:50:27 +00:00
Raúl MarínandClaude Opus 4.7 de0b18bcf5 Quote shell arguments in clickhouse install
`changeOwnership`, `createGroup`, `createUser`, and the `setcap`
invocation in `clickhouse install` interpolated CLI-controlled values
(`--user`, `--group`, `--log-path`, `--data-path`, `--pid-path`,
`--config-path`, `--binary-path`, `--prefix`) directly into shell
command strings passed to `/bin/sh -c`. The `shellQuote` helper
already used by the sudo invocation in the same file was not applied
elsewhere. Wrap every interpolated value in `shellQuote` so shell
metacharacters in CLI arguments cannot be interpreted by the shell.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 14:41:03 +00:00
Alexey Milovidov 59da8a8b8a Merge remote-tracking branch 'origin/master' into clang-tidy-init-variables
# Conflicts:
#	src/Processors/QueryPlan/Optimizations/Optimizations.h
#	src/Storages/MaterializedView/RefreshTask.cpp
2026-05-08 03:15:33 +00:00
Alexey Milovidov ac598f3a7e Merge remote-tracking branch 'origin/master' into fix-compiler-warnings
# Conflicts:
#	programs/main.cpp
2026-05-06 03:18:15 +00:00
Alexey Milovidov e7d44505aa Address review: only apply --group when explicitly specified
`--group` for `clickhouse start` / `restart` had a default value of
`clickhouse` purely for documentation. The launcher applied it
unconditionally on the `sudo` path, so

    clickhouse start --user alice

was silently expanded to `sudo --preserve-env -u alice -g clickhouse ...`.
That fails when `alice` is not a member of the `clickhouse` group,
which is a behavior regression for users who only ever passed `--user`.

Clear `group` in `mainEntryClickHouseStart` and `mainEntryClickHouseRestart`
when `options["group"].defaulted()` is true, so the default is shown in
`--help` but not applied to the spawned server. The `no-sudo` path then
runs `clickhouse su user:`, where `setUserAndGroup` falls back to the
user's primary group.
2026-05-01 03:50:59 +00:00
Alexey MilovidovandClaude Opus 4.7 dd10ab72df Address review: apply --group on sudo path of clickhouse start
The `--group` option for `clickhouse start` / `restart` was only honored on
the `--no-sudo` branch (`clickhouse su user:group ...`). On the default path
the command was built as `sudo --preserve-env -u <user> ...`, with no `-g`,
so the group was silently ignored.

Pass `-g <group>` to `sudo` (shell-quoted) when `group` is non-empty so the
advertised CLI option takes effect on both code paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 09:54:07 +00:00
Alexey MilovidovandClaude Opus 4.7 5c09460bea Shell-escape interpolated values in clickhouse start / restart
The previous attempt to harden the `--no-sudo` and `sudo` paths in
`clickhouse start` wrapped interpolated `user`, `group`, and binary
paths in single quotes only. This is insufficient: a value containing
a single quote (e.g. `bob';rm -rf /;'`) still breaks out because
single quotes do not nest.

Introduce a POSIX-compliant `shellQuote` helper in `Install.cpp` and
apply it to every user-controlled field interpolated into the `su` /
`sudo` command strings: `executable`, `config`, `pid_file`,
`binary`, `user`, and `group`. The helper replaces any `'` inside
the value with `'\''` before re-wrapping, which is the standard POSIX
idiom and safe against arbitrary byte content.

While CLI arguments to `clickhouse start` are not typically attacker
controlled (the caller already runs the binary), defense-in-depth is
worthwhile: these commands go through `/bin/sh -c` via
`ShellCommand::execute`, and unquoted interpolation has been flagged
as a hazard in code review.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 00:12:53 +00:00
Alexey MilovidovandClaude Opus 4.6 fd9f1be36c Address review feedback: stderr for error help, shell quoting, keeper test
- `printHelp` now takes an `std::ostream &` parameter: explicit `help`
  writes to stdout, while `printHelpOnError` (mistyped commands) writes
  to stderr, preserving the error-output contract for scripts.
- Shell-quote binary path and user:group in the `--no-sudo` branch of
  `clickhouse start` to prevent command injection via crafted CLI args.
- Make the keeper availability check in the help return codes test more
  precise: match `clickhouse keeper [args]` exactly instead of bare
  `keeper` which could false-match `keeper-converter` etc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 20:27:13 +00:00
Alexey MilovidovandClaude Opus 4.6 31c5d3c1db Fix issues that caused the revert of the original help improvements
The original PR #96025 was reverted (#98038) because:
1. The install completion message showed wrong relative paths like
   `var/run/clickhouse-server` instead of absolute `/var/run/clickhouse-server`.
   This happened because `options.contains()` returns true even for options
   with default values in boost::program_options. Fix: use `defaulted()`
   to only include options that the user explicitly specified.
2. The install completion message did not suggest `sudo` for the
   start/restart command. This happened because `getuid() != 0` is false
   when install runs as root via sudo, but the user returns to their
   unprivileged shell afterward. Fix: always suggest sudo (matching the
   original behavior).

Also address review feedback:
- Fix `clickhouse-client` help: remove misleading "initial table definition"
  (a `clickhouse-local` concept) from usage line
- Fix typo: "as command line tool" → "as a command line tool"
- Fix `clickhouse-local` help grammar: "After you can execute" → "After that,
  you can execute", "in first query" → "in the first query"
- Make keeper `--help` test robust for builds without `ENABLE_CLICKHOUSE_KEEPER`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 08:06:11 +00:00
Alexey Milovidov 49ce5f9f0a Merge remote-tracking branch 'origin/master' into revert-98038-revert-96025-clickhouse-help 2026-03-30 07:43:50 +00:00
Alexey Milovidov 139fe9e3bf Merge remote-tracking branch 'origin/master' into clang-tidy-init-variables 2026-03-30 02:51:23 +00:00
Alexey Milovidov 371e0b496d Merge remote-tracking branch 'origin/master' into fix-compiler-warnings 2026-03-29 23:20:54 +00:00
Alexey Milovidov e1628e842e Merge branch 'master' into revert-98038-revert-96025-clickhouse-help 2026-03-28 23:50:35 +01:00
Alexey MilovidovandClaude Opus 4.6 d5f952b04a Enable -Wmissing-prototypes compiler warning
Add `static` to file-local functions and forward declarations
for cross-TU functions to satisfy `-Wmissing-prototypes`.

This ensures all functions have visible prototypes before their
definitions, improving code quality and catching accidental
linkage issues.

Reference: https://github.com/ClickHouse/ClickHouse/issues/76944

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 20:11:07 +00:00
Alexey MilovidovandClaude Opus 4.6 ad7c4352fb Address review comments: remove stale #embed comments and add missing deps
- Remove "CMake doesn't recognize changes in #embed-ed files" comments
  from all files, since this PR now tracks those dependencies.
- Add conditional `OBJECT_DEPENDS` for `FrequencyHolder.cpp` NLP blobs
  (guarded by `if (EXISTS ...)` for when the submodule is not checked out).
- Add `OBJECT_DEPENDS` for `attachInformationSchemaTables.cpp` which was
  also missing dependency tracking for its embedded SQL files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 00:40:29 +01:00
Alexey Milovidov 0f5b3ae23f Merge branch 'master' into clang-tidy-init-variables
# Conflicts:
#	src/Coordination/KeeperSnapshotManager.cpp
#	src/Storages/ObjectStorage/DataLakes/Iceberg/FileNamesGenerator.h
#	src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergDataObjectInfo.h
#	src/Storages/ObjectStorage/DataLakes/Iceberg/Mutations.cpp
#	src/Storages/ObjectStorage/DataLakes/Iceberg/Snapshot.h
2026-03-24 19:34:14 +00:00
Alexey MilovidovandClaude Opus 4.6 f8e56caa44 Fix clang-tidy cppcoreguidelines-init-variables and hicpp-member-init after merge with master
New code from master introduced uninitialized variables and struct
members that trigger the newly enabled clang-tidy checks. Fix all 368
errors by adding default initializers (`{}`, `= 0`, `= nullptr`) to
local variables and struct/class member declarations.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100399&sha=78a76ff56fc5747009e8c34795b8a3cb2432eeae&name_0=PR

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 11:25:35 +00:00
Robert Schulze 898b0d8270 Add comments 2026-03-15 19:01:55 +00:00
Alexey Milovidov 85164c93d4 Revert "Revert "Improve help output for ClickHouse applications"" 2026-02-27 00:49:00 +01:00
Alexey Milovidov e8654c51eb Revert "Improve help output for ClickHouse applications" 2026-02-26 07:51:17 +01:00
Raúl MarínandClaude Opus 4.6 9aa8e4ed27 Move ErrnoException from Exception.h to its own header
Extract `ErrnoException` into `Common/ErrnoException.h` to reduce the
include footprint of `Exception.h`. This removes `<base/errnoToString.h>`
and `<cerrno>` from `Exception.h`, which is included by ~95% of all
translation units.

All files referencing `ErrnoException` now include the new header
directly. Files that used `errnoToString` without `ErrnoException`
got an explicit `<base/errnoToString.h>` include.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:47:23 +01:00
Alexey MilovidovandClaude Opus 4.5 d010338fd8 Add --group option and pass install options to suggested start command
- Add --group option to start and restart commands
- Use clickhouse su instead of sudo when --no-sudo is set
- Pass --prefix, --pid-path, --config-path, --binary-path, --user, --group
  from install to the suggested start/restart command

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 07:18:40 +01:00