diff options
author | Michael Widenius <monty@mariadb.org> | 2018-03-09 14:05:35 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-03-29 13:59:44 +0300 |
commit | a7abddeffa6a760ce948c2dfb007cdf3f1a369d5 (patch) | |
tree | 70eb743fa965a17380bbc0ac88ae79ca1075b896 /mysql-test/main/no_password_column-mdev-11170.test | |
parent | ab1941266c59a19703a74b5593cf3f508a5752d7 (diff) | |
download | mariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz |
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/main/no_password_column-mdev-11170.test')
-rw-r--r-- | mysql-test/main/no_password_column-mdev-11170.test | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/mysql-test/main/no_password_column-mdev-11170.test b/mysql-test/main/no_password_column-mdev-11170.test new file mode 100644 index 00000000000..2cc4ba82ee8 --- /dev/null +++ b/mysql-test/main/no_password_column-mdev-11170.test @@ -0,0 +1,95 @@ +--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; |