MXS-1717 Show which listener users are coming from
Earlier, if a service had multiple listeners you would have had MaxScale> show dbusers MyService User names: alice@% ... User names: bob@% ... That is, no indication of which listener is reporting what. With this commit the result will be User names (MyListener1): alice@% ... User names (MyListener2): bob@% ... Further, the diagnostics function of an authenticator is now expected to write the list of users to the provided DCB, without performing any other formatting. The formatting (printing "User names" and appending a line-feed) is now handled by the handler for the MaxAdmin command "show dbusers".
This commit is contained in:
@ -166,7 +166,6 @@ public:
|
||||
dcb_printf(dcb, "%s%s", sep, it->first.c_str());
|
||||
sep = ", ";
|
||||
}
|
||||
dcb_printf(dcb, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,17 +323,7 @@ void users_default_diagnostic(DCB* dcb, SERV_LISTENER* port)
|
||||
{
|
||||
if (port->users)
|
||||
{
|
||||
Users* u = reinterpret_cast<Users*>(port->users);
|
||||
|
||||
if (u->empty())
|
||||
{
|
||||
dcb_printf(dcb, "Users table is empty\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
dcb_printf(dcb, "User names: ");
|
||||
users_diagnostic(dcb, port->users);
|
||||
}
|
||||
users_diagnostic(dcb, port->users);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user