Skip to content

Commit 7ebb66b

Browse files
committed
Improvement #8353 : Report unique usernames for isc_info_user_names
1 parent 2528942 commit 7ebb66b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/jrd/inf.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,8 @@ void INF_database_info(thread_db* tdbb,
633633
}
634634

635635
{
636+
StrArray names;
637+
636638
SyncLockGuard sync(&dbb->dbb_sync, SYNC_SHARED, "INF_database_info");
637639

638640
for (const Jrd::Attachment* att = dbb->dbb_attachments; att; att = att->att_next)
@@ -643,6 +645,13 @@ void INF_database_info(thread_db* tdbb,
643645
{
644646
const char* userName = user->getUserName().hasData() ?
645647
user->getUserName().c_str() : "(Firebird Worker Thread)";
648+
649+
FB_SIZE_T pos;
650+
if (names.find(userName, pos))
651+
continue;
652+
653+
names.insert(pos, userName);
654+
646655
p = buffer;
647656
const ULONG len = MIN(strlen(userName), MAX_UCHAR);
648657
*p++ = static_cast<UCHAR>(len);

0 commit comments

Comments
 (0)