-
Notifications
You must be signed in to change notification settings - Fork 45
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-25574] Add test case for When dropped user then remove related data on db_auth, db_authorization table #1950
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
create table u1.tbl | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
name | ||
DBA | ||
PUBLIC | ||
U1 | ||
U2 | ||
|
||
=================================================== | ||
|
||
drop user u1, ERROR: Cannot drop the user who owns database objects | ||
|
||
=================================================== | ||
Error:-837 | ||
=================================================== | ||
|
||
drop user u2, success | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
name | ||
DBA | ||
PUBLIC | ||
U1 | ||
|
||
=================================================== | ||
|
||
Test done | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
create table u1.tbl, create javasp u1.hello | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
connect to u1 & u2 grant to u1.tbl, u1.hello & u3 grant to u1.hello | ||
|
||
=================================================== | ||
|
||
null | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
connect to u2 & u3 grant to u1.tbl | ||
|
||
=================================================== | ||
|
||
null | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable | ||
U1 U2 FUNCTION hello U1 EXECUTE NO | ||
U1 U2 CLASS tbl U1 SELECT YES | ||
U1 U3 FUNCTION hello U1 EXECUTE NO | ||
U2 U3 CLASS tbl U1 SELECT YES | ||
|
||
=================================================== | ||
owner.name grants | ||
DBA | ||
U1 | ||
U2 null | ||
U3 null | ||
|
||
=================================================== | ||
|
||
connect to dba & drop user u3 | ||
|
||
=================================================== | ||
|
||
null | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable | ||
U1 U2 FUNCTION hello U1 EXECUTE NO | ||
U1 U2 CLASS tbl U1 SELECT YES | ||
|
||
=================================================== | ||
owner.name grants | ||
DBA | ||
U1 | ||
swi0110 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
U2 null | ||
|
||
=================================================== | ||
|
||
Test done | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
create table u1.tbl, create javasp u1.hello, create u1.v1_tbl | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
connect to u1 | ||
|
||
=================================================== | ||
|
||
null | ||
|
||
=================================================== | ||
|
||
u2 grant to u1.tbl (granted select twice, but duplicate granted does not work) | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable | ||
U1 U2 CLASS tbl U1 SELECT YES | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable | ||
U1 U2 CLASS tbl U1 SELECT YES | ||
|
||
=================================================== | ||
|
||
u2 grant to u1.tbl (insert) | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
u2 grant to u1.hello, u3 grant to u1.v1_tbl | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
connect u2 & u3 grant to u1.tbl (select, insert) | ||
|
||
=================================================== | ||
|
||
null | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
connect to u3 & u4 grant to u1.tbl | ||
|
||
=================================================== | ||
|
||
null | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GRANT EXECUTE ON PROCEDURE u1.hello TO u2; 수행 결과도 포함되어야 하는 것 아닌가요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 지적 감사합니다. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 해당 내용은 추후 spec 논의가 필요할 것으로 판단됩니다. 따라서 현재 답지를 merge한 후, 추후 spec 논의 후 답지를 변경하는건 어떨까요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 네, 알겠습니다. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ssihil 향후 스펙 논의를 하게 될 경우, 현행 유지 또는 oracle과 유사한 방식으로 변경하는 두가지 관점에서 논의하게 될 것 같습니다. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 네, 알겠습니다. |
||
U1 U2 CLASS tbl U1 INSERT YES | ||
U1 U2 CLASS tbl U1 SELECT YES | ||
U1 U3 VCLASS v1_tbl U1 SELECT NO | ||
U2 U3 CLASS tbl U1 INSERT NO | ||
U2 U3 CLASS tbl U1 SELECT YES | ||
U3 U4 CLASS tbl U1 SELECT YES | ||
|
||
=================================================== | ||
owner.name grants | ||
DBA | ||
U1 | ||
swi0110 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
U2 null | ||
U3 null | ||
U4 null | ||
|
||
=================================================== | ||
|
||
connect to dba & drop user u2 | ||
|
||
=================================================== | ||
|
||
null | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable | ||
U1 U3 VCLASS v1_tbl U1 SELECT NO | ||
|
||
=================================================== | ||
owner.name grants | ||
DBA | ||
U1 | ||
U3 null | ||
U4 | ||
swi0110 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
=================================================== | ||
name | ||
DBA | ||
PUBLIC | ||
U1 | ||
U3 | ||
U4 | ||
|
||
=================================================== | ||
|
||
Test done | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
connect to u1 & create partition table t1_r, t1_h, t1_l | ||
|
||
=================================================== | ||
|
||
null | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
u2 grant to t1_r, t1_h, t1_l | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
|
||
ERROR: Invalid partition requests | ||
|
||
=================================================== | ||
Error:-494 | ||
=================================================== | ||
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable | ||
U1 U2 CLASS t1_h U1 SELECT YES | ||
U1 U2 CLASS t1_h__p__p0 U1 SELECT YES | ||
U1 U2 CLASS t1_h__p__p1 U1 SELECT YES | ||
U1 U2 CLASS t1_l U1 ALTER YES | ||
U1 U2 CLASS t1_l U1 SELECT YES | ||
U1 U2 CLASS t1_l__p__p0 U1 ALTER YES | ||
U1 U2 CLASS t1_l__p__p0 U1 SELECT YES | ||
U1 U2 CLASS t1_l__p__p1 U1 ALTER YES | ||
U1 U2 CLASS t1_l__p__p1 U1 SELECT YES | ||
U1 U2 CLASS t1_r U1 SELECT YES | ||
U1 U2 CLASS t1_r__p__p0 U1 SELECT YES | ||
U1 U2 CLASS t1_r__p__p1 U1 SELECT YES | ||
|
||
=================================================== | ||
owner.name grants | ||
DBA | ||
U1 | ||
swi0110 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
U2 null | ||
|
||
=================================================== | ||
|
||
connect to dba & drop user u2 | ||
|
||
=================================================== | ||
|
||
null | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
grantor_name grantee_name object_type object_name owner_name auth_type is_grantable | ||
|
||
=================================================== | ||
owner.name grants | ||
DBA | ||
U1 | ||
swi0110 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
=================================================== | ||
|
||
Test done | ||
|
||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 | ||
=================================================== | ||
0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* Verified the CBRD-25574 | ||
As-is: if dropped user then set 'NULL' related data on the db_auth, db_authorization table | ||
To-be: if dropped user then remove the related data on the db_auth, db_authorization table | ||
*/ | ||
|
||
|
||
create user u1; | ||
create user u2; | ||
|
||
evaluate 'create table u1.tbl'; | ||
create table u1.tbl (col1 int); | ||
|
||
select name from db_user order by name; | ||
|
||
evaluate 'drop user u1, ERROR: Cannot drop the user who owns database objects'; | ||
drop user u1; | ||
|
||
|
||
evaluate 'drop user u2, success'; | ||
drop user u2; | ||
|
||
select name from db_user order by name; | ||
|
||
|
||
evaluate 'Test done'; | ||
drop table u1.tbl; | ||
drop user u1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jdbc driver의 구현상의 문제로 db_authorization 테이블의 grants column은 출력되지 않습니다.