mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 22:43:03 +01:00
A bit better patch for #8189 : Slow connection times with a lot of simultaneous connections and active trace session present.
This also reverts commit f604c56
.
The patch created by @AlexPeshkoff
This commit is contained in:
parent
a741cbe261
commit
fd2aa4429e
@ -1091,12 +1091,7 @@ private:
|
||||
return false;
|
||||
|
||||
MAP_DEBUG(fprintf(stderr, "granted=%d\n", granted));
|
||||
|
||||
// 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;
|
||||
return roles.getPrivileges((granted ? *sqlRole : trusted_role), system_privileges);
|
||||
}
|
||||
|
||||
void populate(Mapping::DbHandle& iDb, const string& name, const string* sqlRole,
|
||||
@ -1128,7 +1123,7 @@ private:
|
||||
bool getPrivileges(const string& key, UserId::Privileges& system_privileges)
|
||||
{
|
||||
if (!key.hasData())
|
||||
return false;
|
||||
return true;
|
||||
|
||||
UserId::Privileges p;
|
||||
if (!get(key, p))
|
||||
|
Loading…
Reference in New Issue
Block a user