mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 15:23:03 +01:00
Improvement #8353 : Report unique usernames for isc_info_user_names
This commit is contained in:
parent
2528942a8c
commit
7ebb66b5d3
@ -633,6 +633,8 @@ void INF_database_info(thread_db* tdbb,
|
||||
}
|
||||
|
||||
{
|
||||
StrArray names;
|
||||
|
||||
SyncLockGuard sync(&dbb->dbb_sync, SYNC_SHARED, "INF_database_info");
|
||||
|
||||
for (const Jrd::Attachment* att = dbb->dbb_attachments; att; att = att->att_next)
|
||||
@ -643,6 +645,13 @@ void INF_database_info(thread_db* tdbb,
|
||||
{
|
||||
const char* userName = user->getUserName().hasData() ?
|
||||
user->getUserName().c_str() : "(Firebird Worker Thread)";
|
||||
|
||||
FB_SIZE_T pos;
|
||||
if (names.find(userName, pos))
|
||||
continue;
|
||||
|
||||
names.insert(pos, userName);
|
||||
|
||||
p = buffer;
|
||||
const ULONG len = MIN(strlen(userName), MAX_UCHAR);
|
||||
*p++ = static_cast<UCHAR>(len);
|
||||
|
Loading…
Reference in New Issue
Block a user