Debian Codegraph @

mysql-test/suite/binlog/t/binlog_user_if_exists.test

raw
1 # Save the initial number of concurrent sessions
2 --source include/count_sessions.inc
3 --source include/master-slave.inc
4 --connection master
5
6 SET SESSION sql_log_bin= 0;
7 call mtr.add_suppression("Following users were specified in CREATE USER IF NOT EXISTS");
8 call mtr.add_suppression("Following users were specified in ALTER USER IF EXISTS");
9 SET SESSION sql_log_bin= 1;
10
11 --echo #
12 --echo # WL#8540: Support IF [NOT] EXISTS clause in CREATE/DROP USER
13 --echo #
14
15 CREATE USER u1@localhost;
16 CREATE USER IF NOT EXISTS u1@localhost, u2@localhost;
17 ALTER USER IF EXISTS u1@localhost ACCOUNT LOCK;
18 DROP USER u1@localhost;
19 DROP USER IF EXISTS u2@localhost;
20
21 --echo #
22 --echo # Bug #21807286: "CREATE USER IF NOT EXISTS" REPORTS AN ERROR
23 --echo #
24
25
26 CREATE USER IF NOT EXISTS b21807286@localhost IDENTIFIED BY 'haha';
27 CREATE USER IF NOT EXISTS b21807286@localhost IDENTIFIED BY 'haha2';
28 ALTER USER IF EXISTS b21807286@localhost IDENTIFIED BY 'haha3';
29 ALTER USER IF EXISTS b21807286_not_exists@localhost IDENTIFIED BY 'haha4';
30 DROP USER b21807286@localhost;
31
32
33 --source include/sync_slave_sql_with_master.inc
34 --echo [On Slave]
35 --let $mask_user_password_events=1
36 --source include/show_binlog_events.inc
37 --let $mask_user_password_events=0
38
39 SET SESSION sql_log_bin= 0;
40 call mtr.add_suppression("Following users were specified in CREATE USER IF NOT EXISTS");
41 call mtr.add_suppression("Following users were specified in ALTER USER IF EXISTS");
42 SET SESSION sql_log_bin= 1;
43
44 --source include/rpl_end.inc
45
46 --echo
47 --echo End of 5.7 tests!
48 --echo