Debian Codegraph @

mysql-test/suite/rpl/r/rpl_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 set session sql_log_bin=0;
7 delete from mysql.user where Host='fakehost';
8 set session sql_log_bin=1;
9 set session sql_log_bin=0;
10 delete from mysql.user where Host='fakehost';
11 set session sql_log_bin=1;
12 create user 'foo'@'fakehost';
13 create user 'foo'@'fakehost', 'bar'@'fakehost';
14 ERROR HY000: Operation CREATE USER failed for 'foo'@'fakehost'
15 create user 'bar'@'fakehost';
16 create user 'foo1'@'fakehost' IDENTIFIED WITH 'mysql_native_password' BY 'foo1',
17 'foo2'@'fakehost' IDENTIFIED WITH 'mysql_native_password' AS '*1111111111111111111111111111111111111111',
18 'foo3'@'fakehost';
19 include/sync_slave_sql_with_master.inc
20 select Host,User from mysql.user where Host='fakehost';
21 Host User
22 fakehost bar
23 fakehost foo
24 fakehost foo1
25 fakehost foo2
26 fakehost foo3
27 include/diff_tables.inc [master:mysql.user, slave:mysql.user]
28 rename user 'foo'@'fakehost' to 'foofoo'@'fakehost';
29 rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost';
30 ERROR HY000: Operation RENAME USER failed for 'not_exist_user1'@'fakehost'
31 rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'not_exist_user2'@'fakehost' to 'barfoo'@'fakehost';
32 ERROR HY000: Operation RENAME USER failed for 'not_exist_user1'@'fakehost','not_exist_user2'@'fakehost'
33 include/sync_slave_sql_with_master.inc
34 select Host,User from mysql.user where Host='fakehost';
35 Host User
36 fakehost bar
37 fakehost foo1
38 fakehost foo2
39 fakehost foo3
40 fakehost foofoo
41 drop user 'foofoo'@'fakehost';
42 drop user 'bar'@'fakehost';
43 drop user 'foo1'@'fakehost', 'foo2'@'fakehost', 'foo3'@'fakehost';
44 drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost';
45 ERROR HY000: Operation DROP USER failed for 'not_exist_user1'@'fakehost','barbar'@'fakehost'
46 drop user 'not_exist_user1'@'fakehost', 'not_exist_user2'@'fakehost';
47 ERROR HY000: Operation DROP USER failed for 'not_exist_user1'@'fakehost','not_exist_user2'@'fakehost'
48 include/sync_slave_sql_with_master.inc
49 select Host,User from mysql.user where Host='fakehost';
50 Host User
51 #
52 # WL2392: "Change Password at next login" (initial default for root)
53 #
54 CREATE USER must_change2@localhost IDENTIFIED BY 'aha';
55 ALTER USER must_change2@localhost PASSWORD EXPIRE;
56 include/sync_slave_sql_with_master.inc
57 select Host,User,password_expired from mysql.user where user='must_change2';
58 Host User password_expired
59 localhost must_change2 Y
60 # must throw an error
61 SELECT USER();
62 ERROR HY000: You must reset your password using ALTER USER statement before executing this statement.
63 # setting a password unlocks it
64 SET PASSWORD = 'aha2';
65 include/sync_slave_sql_with_master.inc
66 # must not throw an error
67 SELECT USER();
68 USER()
69 must_change2@localhost
70 DROP USER must_change2@localhost;
71 include/sync_slave_sql_with_master.inc
72 #
73 # WL#9591: Caching sha2 authentication plugin
74 #
75 CREATE USER 9591_user@localhost IDENTIFIED WITH caching_sha2_password BY 'abcd' REQUIRE NONE;
76 include/sync_slave_sql_with_master.inc
77 SELECT Host, User, Plugin FROM mysql.user WHERE user='9591_user';
78 Host User Plugin
79 localhost 9591_user caching_sha2_password
80 SELECT CURRENT_USER();
81 CURRENT_USER()
82 9591_user@localhost
83 SELECT CURRENT_USER();
84 CURRENT_USER()
85 9591_user@localhost
86 DROP USER 9591_user@localhost;
87 include/sync_slave_sql_with_master.inc
88 #
89 # WL#11544: Current password required for SET PASSWORD
90 # Create users with current password require clauses.
91 #
92 [connection master]
93 CREATE USER 11544_u1@localhost REQUIRE NONE PASSWORD REQUIRE CURRENT;
94 CREATE USER 11544_u2@localhost REQUIRE NONE PASSWORD REQUIRE CURRENT OPTIONAL;
95 CREATE USER 11544_u3@localhost REQUIRE NONE PASSWORD REQUIRE CURRENT DEFAULT;
96 include/sync_slave_sql_with_master.inc
97 [connection slave]
98 SELECT user, Password_require_current FROM mysql.user WHERE user like '11544_u%';
99 user Password_require_current
100 11544_u1 Y
101 11544_u2 N
102 11544_u3 NULL
103 [connection master]
104 DROP USER 11544_u1@localhost;
105 DROP USER 11544_u2@localhost;
106 DROP USER 11544_u3@localhost;
107 include/show_binlog_events.inc
108 Log_name Pos Event_type Server_id End_log_pos Info
109 master-bin.000001 # Query # # use `test`; CREATE USER 'foo'@'fakehost' IDENTIFIED WITH 'caching_sha2_password'
110 master-bin.000001 # Query # # use `test`; CREATE USER 'bar'@'fakehost' IDENTIFIED WITH 'caching_sha2_password'
111 master-bin.000001 # Query # # use `test`; CREATE USER 'foo1'@'fakehost' IDENTIFIED WITH 'mysql_native_password' AS '*6EAC5249D53050AE649BDB0CC4B85D1AE90CA16E','foo2'@'fakehost' IDENTIFIED WITH 'mysql_native_password' AS '*1111111111111111111111111111111111111111','foo3'@'fakehost' IDENTIFIED WITH 'caching_sha2_password'
112 master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofoo'@'fakehost'
113 master-bin.000001 # Query # # use `test`; drop user 'foofoo'@'fakehost'
114 master-bin.000001 # Query # # use `test`; drop user 'bar'@'fakehost'
115 master-bin.000001 # Query # # use `test`; drop user 'foo1'@'fakehost', 'foo2'@'fakehost', 'foo3'@'fakehost'
116 master-bin.000001 # Query # # use `test`; CREATE USER 'must_change2'@'localhost' IDENTIFIED WITH 'caching_sha2_password' AS '<non-deterministic-password-hash>'
117 master-bin.000001 # Query # # use `test`; ALTER USER 'must_change2'@'localhost' PASSWORD EXPIRE
118 master-bin.000001 # Query # # use `test`; ALTER USER 'must_change2'@'localhost' IDENTIFIED WITH 'caching_sha2_password' AS '<non-deterministic-password-hash>'
119 master-bin.000001 # Query # # use `test`; DROP USER must_change2@localhost
120 master-bin.000001 # Query # # use `test`; CREATE USER '9591_user'@'localhost' IDENTIFIED WITH 'caching_sha2_password' AS '<non-deterministic-password-hash>' REQUIRE NONE
121 master-bin.000001 # Query # # use `test`; DROP USER 9591_user@localhost
122 master-bin.000001 # Query # # use `test`; CREATE USER '11544_u1'@'localhost' IDENTIFIED WITH 'caching_sha2_password' REQUIRE NONE PASSWORD REQUIRE CURRENT
123 master-bin.000001 # Query # # use `test`; CREATE USER '11544_u2'@'localhost' IDENTIFIED WITH 'caching_sha2_password' REQUIRE NONE PASSWORD REQUIRE CURRENT OPTIONAL
124 master-bin.000001 # Query # # use `test`; CREATE USER '11544_u3'@'localhost' IDENTIFIED WITH 'caching_sha2_password' REQUIRE NONE PASSWORD REQUIRE CURRENT DEFAULT
125 master-bin.000001 # Query # # use `test`; DROP USER 11544_u1@localhost
126 master-bin.000001 # Query # # use `test`; DROP USER 11544_u2@localhost
127 master-bin.000001 # Query # # use `test`; DROP USER 11544_u3@localhost
128 include/rpl_end.inc