Debian Codegraph @

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

raw
1 include/save_binlog_position.inc
2 # -----------------------------------------------------------------------
3 # Begin : Tests for DROP USER
4 CREATE USER userX, userY, userZ;
5 DROP USER userZ;
6 include/save_binlog_position.inc
7 SELECT user from mysql.user WHERE user LIKE 'user%';
8 user
9 userX
10 userY
11 # Case 1 : Try removing a non-existing user
12 DROP USER userX, userY, userZ;
13 ERROR HY000: Operation DROP USER failed for 'userZ'@'%'
14 # Must show userX and userY
15 SELECT user FROM mysql.user WHERE user LIKE 'user%';
16 user
17 userX
18 userY
19 # This event sequence pattern MUST NOT be present in binlog: !Q(DROP USER.*userX.*userY.*userZ)
20 include/assert_binlog_events.inc
21 # Case 2 : DROP USER after deleting entry from mysql.user tables
22 DELETE FROM mysql.user WHERE user LIKE 'userY';
23 include/save_binlog_position.inc
24 # Must succeed
25 DROP USER userX, userY;
26 # Must not show any entries
27 SELECT user FROM mysql.user WHERE user LIKE 'user%';
28 user
29 # This event sequence pattern MUST be present in binlog: !Q(DROP USER.*userX.*userY.*)
30 include/assert_binlog_events.inc
31 include/save_binlog_position.inc
32 # End : Tests for DROP USER
33 # -----------------------------------------------------------------------
34 # Begin : Tests for DROP USER IF EXISTS
35 CREATE USER userX, userY, userZ;
36 DROP USER userZ;
37 include/save_binlog_position.inc
38 # Case 1 : DROP USER IF EXISTS for non-existing user
39 DROP USER IF EXISTS userX, userY, userZ;
40 Warnings:
41 Note 3162 Authorization ID 'userZ'@'%' does not exist.
42 # Must not show any entries
43 SELECT user FROM mysql.user WHERE user LIKE 'user%';
44 user
45 #check binlog : Must show DROP USER IF EXISTS as it is
46 # This event sequence pattern MUST be present in binlog: !Q(DROP USER.*userX.*userY.*)
47 include/assert_binlog_events.inc
48 include/save_binlog_position.inc
49 # Case 2 : DROP USER IF EXISTS should be logged in binlog
50 # even if non of the users were present.
51 DROP USER IF EXISTS userX, userY, userZ;
52 Warnings:
53 Note 3162 Authorization ID 'userX'@'%' does not exist.
54 Note 3162 Authorization ID 'userY'@'%' does not exist.
55 Note 3162 Authorization ID 'userZ'@'%' does not exist.
56 # This event sequence pattern MUST be present in binlog: !Q(DROP USER.*userX.*userY.*)
57 include/assert_binlog_events.inc
58 include/save_binlog_position.inc
59 # End : Test for DROP USER IF EXISTS
60 # -----------------------------------------------------------------------