mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 01:00:48 +00:00
Revert "Remove "current_password" because it is harmful"
This reverts commit 66ccb2f6b1
.
This commit is contained in:
parent
5866401f60
commit
bbe5f4c909
@ -47,6 +47,8 @@ public:
|
||||
String current_user;
|
||||
String current_query_id;
|
||||
Poco::Net::SocketAddress current_address;
|
||||
/// Use current user and password when sending query to replica leader
|
||||
String current_password;
|
||||
|
||||
/// When query_kind == INITIAL_QUERY, these values are equal to current.
|
||||
String initial_user;
|
||||
|
@ -660,6 +660,7 @@ void Context::setUser(const String & name, const String & password, const Poco::
|
||||
auto lock = getLock();
|
||||
|
||||
client_info.current_user = name;
|
||||
client_info.current_password = password;
|
||||
client_info.current_address = address;
|
||||
|
||||
auto new_user_id = getAccessControlManager().find<User>(name);
|
||||
|
@ -4416,7 +4416,7 @@ void StorageReplicatedMergeTree::sendRequestToLeaderReplica(const ASTPtr & query
|
||||
const auto & query_settings = query_context.getSettingsRef();
|
||||
const auto & query_client_info = query_context.getClientInfo();
|
||||
String user = query_client_info.current_user;
|
||||
String password;
|
||||
String password = query_client_info.current_password;
|
||||
|
||||
if (auto address = findClusterAddress(leader_address); address)
|
||||
{
|
||||
|
@ -222,7 +222,6 @@ private:
|
||||
zkutil::EphemeralNodeHolderPtr replica_is_active_node;
|
||||
|
||||
/** Is this replica "leading". The leader replica selects the parts to merge.
|
||||
* It can be false only when old ClickHouse versions are working on the same cluster, because now we allow multiple leaders.
|
||||
*/
|
||||
std::atomic<bool> is_leader {false};
|
||||
zkutil::LeaderElectionPtr leader_election;
|
||||
@ -498,7 +497,6 @@ private:
|
||||
bool waitForReplicaToProcessLogEntry(const String & replica_name, const ReplicatedMergeTreeLogEntryData & entry, bool wait_for_non_active = true);
|
||||
|
||||
/// Choose leader replica, send requst to it and wait.
|
||||
/// Only makes sense when old ClickHouse versions are working on the same cluster, because now we allow multiple leaders.
|
||||
void sendRequestToLeaderReplica(const ASTPtr & query, const Context & query_context);
|
||||
|
||||
/// Throw an exception if the table is readonly.
|
||||
|
Loading…
Reference in New Issue
Block a user