-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance Improvement of create login in BBF (#3291)
Engine PR : babelfish-for-postgresql/postgresql_modified_for_babelfish#507 In Major version 16 Babelfish introduced a new role bbf_admin_role which is a member of all the roles which created implicitly from TSQL. This increases the Load on any Grant/Revoke operations that happen since in BBF to "select the role through which it gets permission to current user to grant", is inefficient and loops over members of members to find the all members of the role even though the required role is find. This commit optimizes the selection of role with is_admin_option true for babelfish by escaping the search for any TSQL roles conditionally. Signed-off-by: ANJU BHARTI <[email protected]> Issues Resolved BABEL-5349
- Loading branch information
1 parent
be6b58f
commit ec665c4
Showing
21 changed files
with
1,284 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
test/JDBC/expected/test_windows_login_before-17_2-vu-cleanup.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
-- tsql | ||
DROP LOGIN PassWordUser; | ||
GO | ||
|
||
-- test for drop login with upn format | ||
DROP LOGIN [aduser@AD]; | ||
GO | ||
~~ERROR (Code: 33557097)~~ | ||
|
||
~~ERROR (Message: Cannot drop the login 'aduser@ad', because it does not exist or you do not have permission.)~~ | ||
|
||
|
||
DROP LOGIN [ad\adUSer]; | ||
GO | ||
|
||
DROP LOGIN [ad\aduserDB]; | ||
GO | ||
|
||
DROP LOGIN [ad\Aduserlanguage]; | ||
GO | ||
~~ERROR (Code: 33557097)~~ | ||
|
||
~~ERROR (Message: Cannot drop the login 'aduserlanguage@AD', because it does not exist or you do not have permission.)~~ | ||
|
||
|
||
DROP LOGIN [ad\Aduserdblanguage]; | ||
GO | ||
~~ERROR (Code: 33557097)~~ | ||
|
||
~~ERROR (Message: Cannot drop the login 'aduserdblanguage@AD', because it does not exist or you do not have permission.)~~ | ||
|
||
|
||
DROP LOGIN [ad\AduserdbEnglish]; | ||
GO | ||
|
||
DROP LOGIN [ad\Aduseroption]; | ||
GO | ||
~~ERROR (Code: 33557097)~~ | ||
|
||
~~ERROR (Message: Cannot drop the login 'aduseroption@AD', because it does not exist or you do not have permission.)~~ | ||
|
||
|
||
DROP LOGIN [babel\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] | ||
GO | ||
~~ERROR (Code: 33557097)~~ | ||
|
||
~~ERROR (Message: Cannot drop the login 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@BABEL', because it does not exist or you do not have permission.)~~ | ||
|
||
|
||
DROP LOGIN [ba.bel\username]; | ||
GO | ||
|
||
-- test for non-existent login | ||
DROP LOGIN [babel\non_existent_login] | ||
GO | ||
~~ERROR (Code: 33557097)~~ | ||
|
||
~~ERROR (Message: Cannot drop the login 'non_existent_login@BABEL', because it does not exist or you do not have permission.)~~ | ||
|
||
|
||
-- drop login with different casing | ||
DROP LOGIN UserPassword; | ||
GO | ||
|
||
DROP LOGIN [BabeL\DupLicate]; | ||
GO | ||
|
||
DROP LOGIN [Babel\DuplicateDefaultDB]; | ||
GO | ||
|
||
-- test drop logins for logins with different language names | ||
-- Arabic | ||
DROP LOGIN [babel\كلب]; | ||
GO | ||
|
||
-- Mongolian | ||
DROP LOGIN [babel\өглөө]; | ||
GO | ||
|
||
-- Greek | ||
DROP LOGIN [babel\ελπίδα]; | ||
GO | ||
|
||
-- Chinese | ||
DROP LOGIN [babel\爱]; | ||
GO | ||
|
||
DROP DATABASE ad_db; | ||
GO | ||
|
||
|
Oops, something went wrong.