Skip to content

Commit 4119f62

Browse files
committed
Improvement #8353 : Report unique usernames for isc_info_user_names
1 parent 33f5d0b commit 4119f62

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
@@ -634,6 +634,8 @@ void INF_database_info(thread_db* tdbb,
634634
}
635635

636636
{
637+
StrArray names;
638+
637639
SyncLockGuard sync(&dbb->dbb_sync, SYNC_SHARED, "INF_database_info");
638640

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

0 commit comments

Comments
 (0)