mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
3622644836
Renames the upgrade state file, and ensures the old file is properly removed when `mariadb-upgrade` tool is executed. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
32 lines
1.2 KiB
Text
32 lines
1.2 KiB
Text
#
|
|
# 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 /[^ ]*mariadb_upgrade_info/...mariadb_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/mariadb_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
|