1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

do not show user/pass for slave unless running with show-slave-auth-info

cleanup of register_slave_on_master()
This commit is contained in:
sasha@mysql.sashanet.com
2001-06-01 21:15:15 -06:00
parent 68adfd2322
commit ad0b92f941
5 changed files with 31 additions and 25 deletions

View File

@@ -830,8 +830,11 @@ int show_slave_hosts(THD* thd)
List<Item> field_list;
field_list.push_back(new Item_empty_string("Server_id", 20));
field_list.push_back(new Item_empty_string("Host", 20));
field_list.push_back(new Item_empty_string("User",20));
field_list.push_back(new Item_empty_string("Password",20));
if(opt_show_slave_auth_info)
{
field_list.push_back(new Item_empty_string("User",20));
field_list.push_back(new Item_empty_string("Password",20));
}
field_list.push_back(new Item_empty_string("Port",20));
if(send_fields(thd, field_list, 1))
@@ -848,8 +851,11 @@ int show_slave_hosts(THD* thd)
packet->length(0);
net_store_data(packet, si->server_id);
net_store_data(packet, si->host);
net_store_data(packet, si->user);
net_store_data(packet, si->password);
if(opt_show_slave_auth_info)
{
net_store_data(packet, si->user);
net_store_data(packet, si->password);
}
net_store_data(packet, (uint)si->port);
if(my_net_write(net, (char*)packet->ptr(), packet->length()))
{