mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
`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]>