--source include/not_embedded.inc --echo # --echo # MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir: --echo # Fatal error: mysql.user table is damaged or in --echo # unsupported 3.20 format --echo # create table backup_user like mysql.user; insert into backup_user select * from mysql.user; --echo # --echo # Original mysql.user table --echo # describe mysql.user; --echo # --echo # Drop the password column. --echo # alter table mysql.user drop column password; flush privileges; --echo # --echo # Create users without the password column present. --echo # create user foo; create user goo identified by "foo"; select OLD_PASSWORD("ioo"); create user ioo identified with "mysql_old_password" as "7a8f886d28473e85"; --echo # --echo # Check if users have grants loaded correctly. --echo # show grants for foo; show grants for goo; show grants for ioo; select user, host, select_priv, plugin, authentication_string from mysql.user where user like "%oo" order by user; --echo # --echo # Test setting password. --echo # SET PASSWORD FOR foo=PASSWORD("bar"); show grants for foo; show grants for goo; show grants for ioo; select user, host, select_priv, plugin, authentication_string from mysql.user where user like "%oo" order by user; --echo # --echo # Test flush privileges without password column. --echo # flush privileges; show grants for foo; show grants for goo; show grants for ioo; --echo # --echo # Test granting of privileges. --echo # grant select on *.* to foo; grant select on *.* to goo; grant select on *.* to ioo; show grants for foo; show grants for goo; show grants for ioo; --echo # --echo # Check to see if grants are stable on flush. --echo # flush privileges; show grants for foo; show grants for goo; show grants for ioo; --echo # --echo # Check internal table representation. --echo # select user, host, select_priv, plugin, authentication_string from mysql.user where user like "%oo" order by user; --echo # --echo # Reset to final original state. --echo # drop table mysql.user; rename table backup_user to mysql.user; flush privileges;