1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

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

cleanup of register_slave_on_master()


mysql-test/r/rpl000002.result:
  new output of show slave hosts
sql/mysqld.cc:
  user and password are shown in show slave hosts only if show-slave-auth-info option is on
sql/slave.cc:
  cleanup of register_slave_on_master()
sql/sql_repl.cc:
  do not show user/pass for slave unless running with show-slave-auth-info
sql/sql_repl.h:
  show-slave-auth-info
This commit is contained in:
unknown
2001-06-01 21:15:15 -06:00
parent 6b5d02ac53
commit 2cf8889f57
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()))
{