diff options
Diffstat (limited to 'mysql-test/main/mysql_upgrade.test')
-rw-r--r-- | mysql-test/main/mysql_upgrade.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test index 42c4a545dd7..a6345af937d 100644 --- a/mysql-test/main/mysql_upgrade.test +++ b/mysql-test/main/mysql_upgrade.test @@ -219,6 +219,37 @@ SET GLOBAL enforce_storage_engine=NULL; --echo # End of 10.1 tests +--echo # +--echo # MDEV-23201 'Roles' are created incorrectly on an install that was previously MySQL 5.7 +--echo # +--echo # + +--exec $MYSQL_DUMP --result-file $MYSQLTEST_VARDIR/tmp/user.sql mysql user +DROP VIEW mysql.user; + +--copy_file std_data/mysql57user.frm $MYSQLD_DATADIR/mysql/user.frm +--copy_file std_data/mysql57user.MYI $MYSQLD_DATADIR/mysql/user.MYI +--copy_file std_data/mysql57user.MYD $MYSQLD_DATADIR/mysql/user.MYD +FLUSH TABLES mysql.user; +FLUSH PRIVILEGES; +SHOW CREATE TABLE mysql.user; + +--exec $MYSQL_UPGRADE --force 2>&1 +SHOW CREATE TABLE mysql.user; + +CREATE ROLE `aRole`; +SET ROLE `aRole`; + +FLUSH PRIVILEGES; + +SET ROLE `aRole`; +SELECT `User`, `is_role` FROM `mysql`.`user`; + +DROP ROLE `aRole`; +--exec $MYSQL mysql < $MYSQLTEST_VARDIR/tmp/user.sql +FLUSH PRIVILEGES; +--remove_file $MYSQLD_DATADIR/mysql_upgrade_info + --echo # End of 10.2 tests --echo # |