Files
datastore/programs
Christoph WurmandClaude Fable 5 e5f80bbc8d Fix abort in clickhouse-client --login when no host is passed explicitly
`Client::login` read `hosts_and_ports.front()`, but `hosts_and_ports` is only
filled from explicit `--host` arguments; the default host is added later, in
`Client::connect`. Running `clickhouse client --login` without `--host` (e.g.
with the host coming from `--connection`, the config file, or the
`CLICKHOUSE_HOST` environment variable) failed a libc++ hardening assertion:
`front() called on an empty vector`.

Resolve the host from the configuration when `hosts_and_ports` is empty, the
same way `connect` does.

Also fix the client docs, which listed the option as `login` instead of
`--login`.

Closes: https://github.com/ClickHouse/ClickHouse/issues/103603

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-13 15:17:44 +01:00
..
2026-06-23 18:47:50 +00:00