8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:03:03 +01:00

Fixed bug #8189 : Slow connection times with a lot of simultaneous connections and active trace session present

The patch by @AlexPeshkoff
This commit is contained in:
Vlad Khorsun 2024-07-22 19:39:54 +03:00
parent cf95284e40
commit f604c565f3

View File

@ -1091,7 +1091,12 @@ private:
return false;
MAP_DEBUG(fprintf(stderr, "granted=%d\n", granted));
return roles.getPrivileges((granted ? *sqlRole : trusted_role), system_privileges);
// Note, roles have no special entry with empty string as a key.
// Thus, don't consider it as not populated if role to check is not set (empty).
const string& roleInUse = granted ? *sqlRole : trusted_role;
return roleInUse.hasData() ? roles.getPrivileges(roleInUse, system_privileges) : true;
}
void populate(Mapping::DbHandle& iDb, const string& name, const string* sqlRole,