Debian Codegraph @

mysql-test/suite/auth_sec/r/atomic_drop_role.result

raw
1 include/save_binlog_position.inc
2 # ----------------------------------------------------------------------
3 # Begin : Tests for DROP ROLE
4 CREATE ROLE roleX, roleY, roleZ;
5 include/save_binlog_position.inc
6 # Case 1 : Execute DROP ROLE for existing users
7 DROP ROLE roleX, roleY;
8 # Must show roleZ
9 SELECT user FROM mysql.user WHERE user LIKE 'role%';
10 user
11 roleZ
12 # This event sequence pattern MUST be present in binlog: !Q(DROP ROLE.*roleX.*roleY.*)
13 include/assert_binlog_events.inc
14 include/save_binlog_position.inc
15 # Case 2 : Execute DROP ROLE for non-existing users
16 DROP ROLE roleZ, roleX;
17 ERROR HY000: Operation DROP ROLE failed for 'roleX'@'%'
18 # Must show entry for roleZ
19 SELECT user FROM mysql.user WHERE user LIKE 'role%';
20 user
21 roleZ
22 # This event sequence pattern MUST NOT be present in binlog: !Q(DROP ROLE.*roleZ.*roleX.*)
23 include/assert_binlog_events.inc
24 DROP ROLE roleZ;
25 include/save_binlog_position.inc
26 # End : Tests for DROP ROLE
27 # ----------------------------------------------------------------------
28 # Begin : Tests for DROP ROLE IF EXISTS
29 CREATE ROLE roleX, roleY, roleZ;
30 include/save_binlog_position.inc
31 # Case 1 : Execute DROP ROLE IF NOT EXISTS
32 DROP ROLE IF EXISTS roleX, roleY, roleZ;
33 # Must not show entries for roleX, roleY, roleZ
34 SELECT user FROM mysql.user WHERE user LIKE 'role%';
35 user
36 # This event sequence pattern MUST be present in binlog: !Q(DROP ROLE IF EXISTS.*roleX.*roleY.*roleZ.*)
37 include/assert_binlog_events.inc
38 include/save_binlog_position.inc
39 # case 2 : Execute DROP ROLE IF NOT EXISTS for non-existing users
40 DROP ROLE IF EXISTS roleX, roleY, roleZ;
41 Warnings:
42 Note 3162 Authorization ID 'roleX'@'%' does not exist.
43 Note 3162 Authorization ID 'roleY'@'%' does not exist.
44 Note 3162 Authorization ID 'roleZ'@'%' does not exist.
45 # This event sequence pattern MUST be present in binlog: !Q(DROP ROLE IF EXISTS.*roleX.*roleY.*roleZ.*)
46 include/assert_binlog_events.inc
47 include/save_binlog_position.inc
48 # End : Tests for DROP ROLE IF EXISTS
49 # ----------------------------------------------------------------------