Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-24519] Add test case for PL/CSQL test cases 15 (feature/plcsql-p1) #1901

Open
wants to merge 10 commits into
base: feature/plcsql-p1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
===================================================
0

===================================================
0

===================================================
0

===================================================
0

===================================================
2

===================================================
0

===================================================
0

===================================================
0

===================================================
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable
DBA T1 FUNCTION sp1 DBA EXECUTE NO
DBA T1 CLASS test1 DBA SELECT NO
DBA T1 CLASS test1 DBA INSERT NO
DBA T1 CLASS test1 DBA UPDATE NO
DBA T1 CLASS test1 DBA DELETE NO
DBA T1 CLASS test1 DBA ALTER NO
DBA T1 CLASS test1 DBA INDEX NO
DBA T1 CLASS test1 DBA EXECUTE NO
DBA T1 VCLASS view1 DBA SELECT NO
DBA T1 VCLASS view1 DBA INSERT NO
DBA T1 VCLASS view1 DBA UPDATE NO
DBA T1 VCLASS view1 DBA DELETE NO
DBA T1 VCLASS view1 DBA ALTER NO
DBA T1 VCLASS view1 DBA INDEX NO
DBA T1 VCLASS view1 DBA EXECUTE NO


===================================================
Grants for T1
GRANT ALTER, DELETE, EXECUTE, INDEX, INSERT, SELECT, UPDATE ON DBA.test1 TO T1
GRANT ALTER, DELETE, EXECUTE, INDEX, INSERT, SELECT, UPDATE ON DBA.view1 TO T1
GRANT EXECUTE ON PROCEDURE DBA.sp1 TO T1


===================================================

null


===================================================
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable
DBA T1 FUNCTION sp1 DBA EXECUTE NO
DBA T1 CLASS test1 DBA SELECT NO
DBA T1 CLASS test1 DBA INSERT NO
DBA T1 CLASS test1 DBA UPDATE NO
DBA T1 CLASS test1 DBA DELETE NO
DBA T1 CLASS test1 DBA ALTER NO
DBA T1 CLASS test1 DBA INDEX NO
DBA T1 CLASS test1 DBA EXECUTE NO
DBA T1 VCLASS view1 DBA SELECT NO
DBA T1 VCLASS view1 DBA INSERT NO
DBA T1 VCLASS view1 DBA UPDATE NO
DBA T1 VCLASS view1 DBA DELETE NO
DBA T1 VCLASS view1 DBA ALTER NO
DBA T1 VCLASS view1 DBA INDEX NO
DBA T1 VCLASS view1 DBA EXECUTE NO


===================================================
Grants for T1
GRANT ALTER, DELETE, EXECUTE, INDEX, INSERT, SELECT, UPDATE ON DBA.test1 TO T1
GRANT ALTER, DELETE, EXECUTE, INDEX, INSERT, SELECT, UPDATE ON DBA.view1 TO T1
GRANT EXECUTE ON PROCEDURE DBA.sp1 TO T1


===================================================
0

===================================================
0

===================================================

null


===================================================
Grants for DBA
GRANT EXECUTE ON PROCEDURE T1.sp2 TO DBA


===================================================
0

===================================================
0

===================================================
Error:-494
Semantic: before ' ; '
User t1 is not in the database. revoke execute on procedure on [dba.sp1] from t1

===================================================
Grants for T1


===================================================
0

===================================================
Error:-165
User "t1" is invalid.

===================================================
0

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
===================================================
0

===================================================
0

===================================================
0

===================================================
0

===================================================
0

===================================================
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable
DBA T1 FUNCTION test1 DBA EXECUTE NO


===================================================
Grants for T1
GRANT EXECUTE ON PROCEDURE DBA.test1 TO T1


===================================================
Grants for DBA


===================================================

null


===================================================
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable
DBA T1 FUNCTION test1 DBA EXECUTE NO


===================================================
Grants for T1
GRANT EXECUTE ON PROCEDURE DBA.test1 TO T1


===================================================
0

===================================================

null


===================================================
0

===================================================
Grants for T1


===================================================
0

===================================================
0

Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
===================================================
0

===================================================
0

===================================================

Comparison to table and sp grant/revoke


===================================================
0

===================================================
0

===================================================
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable
DBA U2 CLASS tbl1 U1 EXECUTE NO


===================================================
0

===================================================
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable


===================================================
0

===================================================
0

===================================================
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable
DBA U2 FUNCTION test1 U1 EXECUTE NO


===================================================
0

===================================================
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable


===================================================

in public


===================================================

null


===================================================
Error:-163
EXECUTE authorization failure.

===================================================
Error:-163
EXECUTE authorization failure.

===================================================
Error:-163
EXECUTE authorization failure.

===================================================
Error:-163
EXECUTE authorization failure.

===================================================

in u2


===================================================

null


===================================================
Error:-146
Cannot issue GRANT/REVOKE to owner of a .

===================================================
0

===================================================
Grants for U2


===================================================
Error:-150
Cannot revoke privileges from self.

===================================================
0

===================================================
Grants for U2


===================================================
Error:-150
Cannot revoke privileges from self.

===================================================

in u1


===================================================

null


===================================================
Error:-494
Semantic: SELECT is not authorized on _db_auth. [__t1].auth_type

===================================================

in dba


===================================================

null


===================================================

do not use "on procedure": error


===================================================
Error:-493
Syntax: missing authorized command list
authorized command = SELECT, INSERT, INDEX, DELETE, UPDATE, ALTER, ADD, DROP, EXECUTE, REFERENCES, ALL PRIVILEGES, ALL

===================================================

incorrect test: error


===================================================
Error:-494
Semantic: before ' to u2; '
Unknown class "u1.test1". grant execute on [u1.test1] to u2

===================================================
Error:-493
Syntax: missing class spec list

===================================================
Error:-494
Semantic: before ' to u2; '
Stored procedure/function "dba.test1" does not exist. grant execute on procedure on [dba.test1] to u2

===================================================

mixed lower case and upper case: succ


===================================================
0

===================================================
0

===================================================

test end


===================================================
0

===================================================
0

===================================================
0

===================================================
0

Loading