Skip to content

Commit 49e62e4

Browse files
committed
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
1 parent c734c96 commit 49e62e4

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/jrd/Mapping.cpp

+2-7
Original file line numberDiff line numberDiff line change
@@ -1091,12 +1091,7 @@ class SysPrivCache : public PermanentStorage
10911091
return false;
10921092

10931093
MAP_DEBUG(fprintf(stderr, "granted=%d\n", granted));
1094-
1095-
// Note, roles have no special entry with empty string as a key.
1096-
// Thus, don't consider it as not populated if role to check is not set (empty).
1097-
1098-
const string& roleInUse = granted ? *sqlRole : trusted_role;
1099-
return roleInUse.hasData() ? roles.getPrivileges(roleInUse, system_privileges) : true;
1094+
return roles.getPrivileges((granted ? *sqlRole : trusted_role), system_privileges);
11001095
}
11011096

11021097
void populate(Mapping::DbHandle& iDb, const string& name, const string* sqlRole,
@@ -1128,7 +1123,7 @@ class SysPrivCache : public PermanentStorage
11281123
bool getPrivileges(const string& key, UserId::Privileges& system_privileges)
11291124
{
11301125
if (!key.hasData())
1131-
return false;
1126+
return true;
11321127

11331128
UserId::Privileges p;
11341129
if (!get(key, p))

0 commit comments

Comments
 (0)