mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-26 18:36:28 +00:00
@@ -279,7 +279,7 @@ where
|
|||||||
{
|
{
|
||||||
let password = md5_hash_password(user, password, salt);
|
let password = md5_hash_password(user, password, salt);
|
||||||
|
|
||||||
let mut message = BytesMut::with_capacity(password.len() + 5);
|
let mut message = BytesMut::with_capacity(password.len() as usize + 5);
|
||||||
|
|
||||||
message.put_u8(b'p');
|
message.put_u8(b'p');
|
||||||
message.put_i32(password.len() as i32 + 4);
|
message.put_i32(password.len() as i32 + 4);
|
||||||
@@ -293,7 +293,7 @@ where
|
|||||||
S: tokio::io::AsyncWrite + std::marker::Unpin,
|
S: tokio::io::AsyncWrite + std::marker::Unpin,
|
||||||
{
|
{
|
||||||
let password = md5_hash_second_pass(hash, salt);
|
let password = md5_hash_second_pass(hash, salt);
|
||||||
let mut message = BytesMut::with_capacity(password.len() + 5);
|
let mut message = BytesMut::with_capacity(password.len() as usize + 5);
|
||||||
|
|
||||||
message.put_u8(b'p');
|
message.put_u8(b'p');
|
||||||
message.put_i32(password.len() as i32 + 4);
|
message.put_i32(password.len() as i32 + 4);
|
||||||
|
|||||||
@@ -137,8 +137,8 @@ impl MirroringManager {
|
|||||||
bytes_rx,
|
bytes_rx,
|
||||||
disconnect_rx: exit_rx,
|
disconnect_rx: exit_rx,
|
||||||
};
|
};
|
||||||
exit_senders.push(exit_tx);
|
exit_senders.push(exit_tx.clone());
|
||||||
byte_senders.push(bytes_tx);
|
byte_senders.push(bytes_tx.clone());
|
||||||
client.start();
|
client.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1041,7 +1041,7 @@ impl ServerPool {
|
|||||||
) -> ServerPool {
|
) -> ServerPool {
|
||||||
ServerPool {
|
ServerPool {
|
||||||
address,
|
address,
|
||||||
user,
|
user: user.clone(),
|
||||||
database: database.to_string(),
|
database: database.to_string(),
|
||||||
client_server_map,
|
client_server_map,
|
||||||
auth_hash,
|
auth_hash,
|
||||||
|
|||||||
@@ -1476,7 +1476,7 @@ mod test {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let mut qr = QueryRouter::new();
|
let mut qr = QueryRouter::new();
|
||||||
qr.update_pool_settings(pool_settings);
|
qr.update_pool_settings(pool_settings.clone());
|
||||||
|
|
||||||
// Shard should start out unset
|
// Shard should start out unset
|
||||||
assert_eq!(qr.active_shard, None);
|
assert_eq!(qr.active_shard, None);
|
||||||
|
|||||||
Reference in New Issue
Block a user