Debian Codegraph @

mysql-test/suite/rpl/r/rpl_row_USER.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 DROP DATABASE IF EXISTS mysqltest1;
7 CREATE DATABASE mysqltest1;
8 CREATE USER tester IDENTIFIED BY 'test', ''@'localhost%';
9 GRANT ALL ON mysqltest1.* TO 'tester'@'%';
10 GRANT ALL ON mysqltest1.* TO ''@'localhost%';
11 FLUSH PRIVILEGES;
12 CREATE TABLE mysqltest1.t1 (a INT, users VARCHAR(255), PRIMARY KEY(a));
13 INSERT INTO mysqltest1.t1 VALUES(1,USER());
14 INSERT INTO mysqltest1.t1 VALUES(2,CURRENT_USER());
15 CREATE PROCEDURE mysqltest1.p1()
16 BEGIN
17 INSERT INTO mysqltest1.t1 VALUES(3,USER());
18 INSERT INTO mysqltest1.t1 VALUES(4,CURRENT_USER());
19 END|
20 CALL mysqltest1.p1();
21 SELECT * FROM mysqltest1.t1 ORDER BY a;
22 a users
23 1 tester@localhost
24 2 @localhost%
25 3 tester@localhost
26 4 @localhost%
27 include/sync_slave_sql_with_master.inc
28 SELECT * FROM mysqltest1.t1 ORDER BY a;
29 a users
30 1 tester@localhost
31 2 @localhost%
32 3 tester@localhost
33 4 @localhost%
34 DROP DATABASE mysqltest1;
35 REVOKE ALL ON mysqltest1.* FROM 'tester'@'%';
36 REVOKE ALL ON mysqltest1.* FROM ''@'localhost%';
37 DROP USER tester@'%';
38 DROP USER ''@'localhost%';
39 include/sync_slave_sql_with_master.inc
40 DROP DATABASE IF EXISTS mysqltest1;
41 CREATE DATABASE mysqltest1;
42 CREATE USER 'tester1'@'' IDENTIFIED BY 'test';
43 GRANT ALL ON mysqltest1.* TO 'tester1'@'';
44 FLUSH PRIVILEGES;
45 CREATE TABLE mysqltest1.t1 (a INT, users VARCHAR(255), PRIMARY KEY(a));
46 INSERT INTO mysqltest1.t1 VALUES(1,USER());
47 INSERT INTO mysqltest1.t1 VALUES(2,CURRENT_USER());
48 CREATE PROCEDURE mysqltest1.p1()
49 BEGIN
50 INSERT INTO mysqltest1.t1 VALUES(3,USER());
51 INSERT INTO mysqltest1.t1 VALUES(4,CURRENT_USER());
52 END|
53 CALL mysqltest1.p1();
54 SELECT * FROM mysqltest1.t1 ORDER BY a;
55 a users
56 1 tester1@localhost
57 2 tester1@
58 3 tester1@localhost
59 4 tester1@
60 include/sync_slave_sql_with_master.inc
61 SELECT * FROM mysqltest1.t1 ORDER BY a;
62 a users
63 1 tester1@localhost
64 2 tester1@
65 3 tester1@localhost
66 4 tester1@
67 DROP DATABASE mysqltest1;
68 REVOKE ALL ON mysqltest1.* FROM 'tester1'@'';
69 DROP USER tester1@'';
70 include/sync_slave_sql_with_master.inc
71 include/rpl_end.inc