diff --git a/test/JDBC/expected/sys_server_role_members-vu-prepare.out b/test/JDBC/expected/sys_server_role_members-vu-prepare.out index 7981f29a4c..d997ec6590 100644 --- a/test/JDBC/expected/sys_server_role_members-vu-prepare.out +++ b/test/JDBC/expected/sys_server_role_members-vu-prepare.out @@ -11,6 +11,12 @@ GO CREATE LOGIN sys_server_role_members_vu_prepare_login4 WITH PASSWORD = '123'; GO +CREATE LOGIN sys_server_role_members_vu_prepare_without_sa WITH PASSWORD = '123'; +GO + +CREATE USER sys_server_role_members_vu_prepare_without_sa for login sys_server_role_members_vu_prepare_without_sa; +GO + CREATE VIEW sys_server_role_members_vu_prepare_view AS SELECT roles.name AS RolePrincipalName @@ -19,7 +25,7 @@ FROM sys.server_role_members AS server_role_members INNER JOIN sys.server_principals AS roles ON server_role_members.role_principal_id = roles.principal_id INNER JOIN sys.server_principals AS members - ON server_role_members.member_principal_id = members.principal_id; + ON server_role_members.member_principal_id = members.principal_id order by MemberPrincipalName; GO CREATE FUNCTION sys_server_role_members_vu_prepare_func () @@ -33,7 +39,7 @@ RETURN ( INNER JOIN sys.server_principals AS roles ON server_role_members.role_principal_id = roles.principal_id INNER JOIN sys.server_principals AS members - ON server_role_members.member_principal_id = members.principal_id + ON server_role_members.member_principal_id = members.principal_id order by MemberPrincipalName ); GO @@ -47,12 +53,6 @@ BEGIN INNER JOIN sys.server_principals AS roles ON server_role_members.role_principal_id = roles.principal_id INNER JOIN sys.server_principals AS members - ON server_role_members.member_principal_id = members.principal_id; + ON server_role_members.member_principal_id = members.principal_id order by MemberPrincipalName; END; GO - -CREATE LOGIN sys_server_role_members_vu_prepare_without_sa WITH PASSWORD = '123'; -GO - -CREATE USER sys_server_role_members_vu_prepare_without_sa for login sys_server_role_members_vu_prepare_without_sa; -GO diff --git a/test/JDBC/expected/sys_server_role_members-vu-verify.out b/test/JDBC/expected/sys_server_role_members-vu-verify.out index cd23e37f20..79c9b8a9e1 100644 --- a/test/JDBC/expected/sys_server_role_members-vu-verify.out +++ b/test/JDBC/expected/sys_server_role_members-vu-verify.out @@ -47,6 +47,10 @@ GO GRANT EXECUTE ON sys_server_role_members_vu_prepare_func TO sys_server_role_members_vu_prepare_without_sa; GO +-- reset the login password +ALTER LOGIN sys_server_role_members_vu_prepare_without_sa WITH PASSWORD = '123'; +GO + -- tsql user=sys_server_role_members_vu_prepare_without_sa password=123 SELECT * FROM sys_server_role_members_vu_prepare_view; @@ -70,6 +74,10 @@ varchar#!#varchar ~~END~~ +-- psql +ALTER USER sys_server_role_members_vu_prepare_login1 PASSWORD '123'; +GO + -- tsql user=sys_server_role_members_vu_prepare_login1 password=123 SELECT * from sys_server_role_members_vu_prepare_view; GO diff --git a/test/JDBC/input/ownership/sys_server_role_members-vu-prepare.mix b/test/JDBC/input/ownership/sys_server_role_members-vu-prepare.mix index 7981f29a4c..9613401b0d 100644 --- a/test/JDBC/input/ownership/sys_server_role_members-vu-prepare.mix +++ b/test/JDBC/input/ownership/sys_server_role_members-vu-prepare.mix @@ -11,6 +11,12 @@ GO CREATE LOGIN sys_server_role_members_vu_prepare_login4 WITH PASSWORD = '123'; GO +CREATE LOGIN sys_server_role_members_vu_prepare_without_sa WITH PASSWORD = '123'; +GO + +CREATE USER sys_server_role_members_vu_prepare_without_sa for login sys_server_role_members_vu_prepare_without_sa; +GO + CREATE VIEW sys_server_role_members_vu_prepare_view AS SELECT roles.name AS RolePrincipalName @@ -19,7 +25,7 @@ FROM sys.server_role_members AS server_role_members INNER JOIN sys.server_principals AS roles ON server_role_members.role_principal_id = roles.principal_id INNER JOIN sys.server_principals AS members - ON server_role_members.member_principal_id = members.principal_id; + ON server_role_members.member_principal_id = members.principal_id order by MemberPrincipalName; GO CREATE FUNCTION sys_server_role_members_vu_prepare_func () @@ -33,7 +39,7 @@ RETURN ( INNER JOIN sys.server_principals AS roles ON server_role_members.role_principal_id = roles.principal_id INNER JOIN sys.server_principals AS members - ON server_role_members.member_principal_id = members.principal_id + ON server_role_members.member_principal_id = members.principal_id order by MemberPrincipalName ); GO @@ -47,12 +53,6 @@ BEGIN INNER JOIN sys.server_principals AS roles ON server_role_members.role_principal_id = roles.principal_id INNER JOIN sys.server_principals AS members - ON server_role_members.member_principal_id = members.principal_id; + ON server_role_members.member_principal_id = members.principal_id order by MemberPrincipalName; END; -GO - -CREATE LOGIN sys_server_role_members_vu_prepare_without_sa WITH PASSWORD = '123'; -GO - -CREATE USER sys_server_role_members_vu_prepare_without_sa for login sys_server_role_members_vu_prepare_without_sa; -GO +GO \ No newline at end of file diff --git a/test/JDBC/input/ownership/sys_server_role_members-vu-verify.mix b/test/JDBC/input/ownership/sys_server_role_members-vu-verify.mix index bc61f8eaa7..4440a73fc1 100644 --- a/test/JDBC/input/ownership/sys_server_role_members-vu-verify.mix +++ b/test/JDBC/input/ownership/sys_server_role_members-vu-verify.mix @@ -27,6 +27,10 @@ GO GRANT EXECUTE ON sys_server_role_members_vu_prepare_func TO sys_server_role_members_vu_prepare_without_sa; GO +-- reset the login password +ALTER LOGIN sys_server_role_members_vu_prepare_without_sa WITH PASSWORD = '123'; +GO + -- tsql user=sys_server_role_members_vu_prepare_without_sa password=123 SELECT * FROM sys_server_role_members_vu_prepare_view; @@ -38,6 +42,10 @@ GO SELECT * FROM sys_server_role_members_vu_prepare_func(); GO +-- psql +ALTER USER sys_server_role_members_vu_prepare_login1 PASSWORD '123'; +GO + -- tsql user=sys_server_role_members_vu_prepare_login1 password=123 SELECT * from sys_server_role_members_vu_prepare_view; GO