Debian Codegraph @

mysql-test/suite/roles/create_and_drop_role.result

raw
1 connect mysql, localhost, root,,;
2 use mysql;
3 create role test_role1@host1;
4 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@host1' at line 1
5 create role test_role2@host2, test_role1@host1;
6 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@host2, test_role1@host1' at line 1
7 create role test_role1;
8 create role test_role2, test_role3;
9 select user, host, is_role from user where user like 'test%';
10 User Host is_role
11 test_role1 Y
12 test_role2 Y
13 test_role3 Y
14 drop role test_role1;
15 drop role test_role2, test_role3;
16 create role test_role1;
17 create role test_role1;
18 ERROR HY000: Operation CREATE ROLE failed for 'test_role1'
19 create role test_role1, test_role2;
20 ERROR HY000: Operation CREATE ROLE failed for 'test_role1'
21 select user, host, is_role from user where user like 'test%';
22 User Host is_role
23 test_role1 Y
24 test_role2 Y
25 drop role test_role1;
26 drop role test_role1;
27 ERROR HY000: Operation DROP ROLE failed for 'test_role1'
28 drop role test_role1, test_role2;
29 ERROR HY000: Operation DROP ROLE failed for 'test_role1'
30 drop role root;
31 ERROR HY000: Operation DROP ROLE failed for 'root'
32 create user dummy@'';
33 drop role dummy;
34 ERROR HY000: Operation DROP ROLE failed for 'dummy'
35 drop user dummy@'';
36 select user, host, is_role from user where user like 'test%';
37 User Host is_role
38 disconnect mysql;
39 connection default;
40 create role '';
41 ERROR OP000: Invalid role specification ``
42 create role ' ';
43 ERROR OP000: Invalid role specification ``
44 create role 'foo ';
45 drop role foo;
46 create role r1;
47 drop user r1;
48 ERROR HY000: Operation DROP USER failed for 'r1'@'%'
49 drop role r1;
50 create role r1 with admin u1;
51 Warnings:
52 Note 1449 The user specified as a definer ('u1'@'%') does not exist
53 create user foo@bar;
54 drop user foo@bar;
55 drop role r1;
56 CREATE USER u1;
57 CREATE ROLE r1;
58 CREATE USER r1@localhost;
59 CREATE ROLE r2;
60 GRANT r2 to r1;
61 GRANT r2 to r1@localhost;
62 DROP ROLE r1;
63 SELECT * FROM mysql.roles_mapping;
64 Host User Role Admin_option
65 localhost r1 r2 N
66 localhost root r2 Y
67 SHOW GRANTS FOR r1@localhost;
68 Grants for r1@localhost
69 GRANT `r2` TO `r1`@`localhost`
70 GRANT USAGE ON *.* TO `r1`@`localhost`
71 DROP USER u1;
72 DROP ROLE r2;
73 DROP USER r1@localhost;
74 create role 'foo ';
75 select concat(user, '__'), is_role from mysql.user where user like 'foo%';
76 concat(user, '__') is_role
77 foo__ Y
78 select * from mysql.roles_mapping;
79 Host User Role Admin_option
80 localhost root foo Y
81 drop role foo;
82 select concat(user, '__'), is_role from mysql.user where user like 'foo%';
83 concat(user, '__') is_role
84 select * from mysql.roles_mapping;
85 Host User Role Admin_option
86 show grants;
87 Grants for root@localhost
88 GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
89 GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION