github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/zz_accesscontrol/use_role.result (about)

     1  set global enable_privilege_cache = off;
     2  drop role if exists use_role_1,use_role_2,use_role_3,use_role_4,use_role_5;
     3  drop user if exists use_user_1,use_user_2;
     4  drop database if exists use_db_1;
     5  create role use_role_1,use_role_2,use_role_3,use_role_4,use_role_5;
     6  create database use_db_1;
     7  create user use_user_1 identified by '123456' default role use_role_1;
     8  grant select ,insert ,update on table *.* to use_role_1;
     9  grant all on database * to use_role_2;
    10  grant use_role_2 to use_user_1;
    11  create table use_db_1.use_table_1(a int,b varchar(20),c double );
    12  internal error: do not have privilege to execute the statement
    13  set secondary role all;
    14  create table use_db_1.use_table_1(a int,b varchar(20),c double );
    15  select * from use_db_1.use_table_1;
    16  a    b    c
    17  insert into use_db_1.use_table_1 values(34,'kelly',90.3);
    18  set role use_role_2;
    19  create table use_db_1.use_table_2(a int,b varchar(20),c double );
    20  insert into use_db_1.use_table_2 values(34,'kelly',90.3);
    21  select * from use_db_1.use_table_2;
    22  a    b    c
    23  34    kelly    90.3
    24  set secondary role none;
    25  create table use_db_1.use_table_3(a int,b varchar(20),c double );
    26  insert into use_db_1.use_table_3 values(34,'kelly',90.3);
    27  select * from use_db_1.use_table_3;
    28  a    b    c
    29  34    kelly    90.3
    30  drop table use_db_1.use_table_3;
    31  set role use_role_1;
    32  create table use_db_1.use_table_4(a int,b varchar(20),c double );
    33  internal error: do not have privilege to execute the statement
    34  insert into use_db_1.use_table_2 values(10,'yellow',99.99);
    35  select * from use_db_1.use_table_2;
    36  a    b    c
    37  34    kelly    90.3
    38  10    yellow    99.99
    39  drop table use_db_1.use_table_2;
    40  internal error: do not have privilege to execute the statement
    41  set role public;
    42  create table use_db_1.use_table_4(a int,b varchar(20),c double );
    43  internal error: do not have privilege to execute the statement
    44  insert into use_db_1.use_table_2 values(10,'yellow',99.99);
    45  internal error: do not have privilege to execute the statement
    46  select * from use_db_1.use_table_2;
    47  internal error: do not have privilege to execute the statement
    48  drop table use_db_1.use_table_2;
    49  internal error: do not have privilege to execute the statement
    50  set secondary role all;
    51  create table use_db_1.use_table_5(a int,b varchar(20),c double );
    52  insert into use_db_1.use_table_5 values(10,'yellow',99.99);
    53  select * from use_db_1.use_table_5;
    54  a    b    c
    55  10    yellow    99.99
    56  drop table use_db_1.use_table_5;
    57  set role moadmin;
    58  internal error: the role moadmin has not be granted to the user use_user_1
    59  create user use_user_2 identified by '123456';
    60  grant create user, drop user, alter user, create role, drop role, create database,drop database,show databases on account *  to use_role_3;
    61  grant all on table *.* to use_role_4;
    62  grant create table,drop table on database * to use_role_5;
    63  grant use_role_3,use_role_4,use_role_5 to use_user_2;
    64  set role use_not_exists;
    65  internal error: there is no role use_not_exists
    66  set role use_role_3;
    67  internal error: the role use_role_3 has not be granted to the user use_user_1
    68  create role use_role_test;
    69  internal error: do not have privilege to execute the statement
    70  set role use_role_test;
    71  internal error: there is no role use_role_test
    72  drop role  use_role_test;
    73  internal error: do not have privilege to execute the statement
    74  set secondary role all;
    75  create table use_db_1.use_table_6(a int,b varchar(20),c double);
    76  insert into use_db_1.use_table_6 values(10,'yellow',99.99);
    77  create database use_db_test;
    78  internal error: do not have privilege to execute the statement
    79  drop database use_db_test;
    80  internal error: do not have privilege to execute the statement
    81  set secondary role none;
    82  insert into use_db_1.use_table_6 values (10, 'yellow', 99.99);
    83  drop table use_db_1.use_table_6;
    84  internal error: do not have privilege to execute the statement
    85  create role if not exists use_role_test;
    86  internal error: do not have privilege to execute the statement
    87  drop role use_role_test;
    88  internal error: do not have privilege to execute the statement
    89  set role use_role_5;
    90  internal error: the role use_role_5 has not be granted to the user use_user_1
    91  drop table use_db_1.use_table_6;
    92  internal error: do not have privilege to execute the statement
    93  create database if not exists use_db_test;
    94  internal error: do not have privilege to execute the statement
    95  drop role if exists use_role_1,use_role_2,use_role_3,use_role_4,use_role_5;
    96  drop user if exists use_user_1,use_user_2;
    97  drop database if exists use_db_1;
    98  set global enable_privilege_cache = on;