1
+ #
2
+ # Bug#36808636 System accounts are not converted to non legacy auth plugin during upgrade
3
+ #
4
+
5
+ --echo #
6
+ --echo # Bug#36808636 System accounts are not converted to non legacy auth plugin during upgrade
7
+ --echo #
8
+
9
+ # prep a'la 5.7 system accounts
10
+ --echo
11
+ --echo # prep a'la 5.7 system accounts
12
+ UPDATE mysql.user SET plugin='mysql_native_password', authentication_string='*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE' WHERE user='mysql.sys';
13
+ UPDATE mysql.user SET plugin='mysql_native_password', authentication_string='*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE' WHERE user='mysql.session';
14
+
15
+ # check sys-accounts use mysql_native_password
16
+ --echo
17
+ --echo # check sys-accounts use mysql_native_password
18
+ --echo # expected: mysql_native_password *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE Y
19
+ SELECT user,plugin,authentication_string,account_locked FROM mysql.user WHERE USER='mysql.sys';
20
+ SELECT user,plugin,authentication_string,account_locked FROM mysql.user WHERE USER='mysql.session';
21
+
22
+ --let $MYSQLD_LOG= $MYSQLTEST_VARDIR/log/mysql_upgrade_test.log
23
+
24
+ # restart the server and enforce the upgrade
25
+ --echo
26
+ --echo # restart the server and enforce the upgrade
27
+ --replace_result $MYSQLD_LOG MYSQLD_LOG
28
+ --let $restart_parameters = restart:--upgrade=FORCE --log-error=$MYSQLD_LOG
29
+ --let $wait_counter= 10000
30
+ --source include/restart_mysqld.inc
31
+
32
+ # check for [ERROR] pattern in server log
33
+ --echo
34
+ --echo # check for ERROR pattern in server log
35
+ --echo # expected: pattern not found
36
+ --let SEARCH_FILE= $MYSQLD_LOG
37
+ --let SEARCH_PATTERN= \[ERROR\]
38
+ --source include/search_pattern.inc
39
+
40
+ # clean log
41
+ --remove_file $MYSQLD_LOG
42
+
43
+ # check sys-accounts are upgraded to cahcing_sha2_password
44
+ --echo
45
+ --echo # check sys-accounts are upgraded to caching_sha2_password
46
+ --echo # expected: caching_sha2_password \$A\$005\$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED Y
47
+ SELECT user,plugin,authentication_string,account_locked FROM mysql.user WHERE USER='mysql.sys';
48
+ SELECT user,plugin,authentication_string,account_locked FROM mysql.user WHERE USER='mysql.session';
49
+
50
+ # end of test, no cleanup needed
51
+ --echo
52
+ --echo # End of tests
0 commit comments