diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/mysql_upgrade-6984.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/mysql_upgrade-6984.test')
-rw-r--r-- | mysql-test/main/mysql_upgrade-6984.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/main/mysql_upgrade-6984.test b/mysql-test/main/mysql_upgrade-6984.test new file mode 100644 index 00000000..034310e0 --- /dev/null +++ b/mysql-test/main/mysql_upgrade-6984.test @@ -0,0 +1,32 @@ +# +# MDEV-6984 Can't migrate from MySQL 5.6.21 to MariaDB 10 +# +--source include/not_embedded.inc +--source include/have_perfschema.inc + +# +# When 'root' account is password protected and MYSQL_UPGRADE doesn't +# know the password (meaning, MYSQL_UPGRADE is run automatically +# on upgrade), MYSQLD has to be started with --skip-grant-tables. +# +# In this setup MYSQL_UPGRADE cannot continue after issuing FLUSH PRIVILEGES +# + +update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo')) where user='root'; + +--replace_regex /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/ +--exec $MYSQL_UPGRADE + +connect(con1,localhost,root,foo,,,); + +update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin', '$.authentication_string')) where user='root'; +flush privileges; +# Load event table +set global event_scheduler=OFF; + +let MYSQLD_DATADIR= `select @@datadir`; +--remove_file $MYSQLD_DATADIR/mysql_upgrade_info + +# --skip-grant-tables state may changed during the test. Need to restart the server +# to restore the --skip-grant-tables state. Otherwise MTR's internal check will fail +--source include/restart_mysqld.inc |