mariadb/mysql-test/main/mysql_upgrade-6984.test
Sergei Golubchik 279b0db8c6 MDEV-29827 collateral cleanup
* removed universal suppression of everything "Event Schedule" everywhere
* added suppressions in tests as needed
* moved events test to the events suite
* renamed -master.opt -> .opt
* added standard test header
* verified in the test that the error, indeed, was written into the log
* removed useless suppressions
* removed ER_EVENTS_NO_ACL, replaced with ER_OPTION_PREVENTS_STATEMENT
* fixed error message to say exactly what option disabled event scheduler
  instead of "this or that or that, you figure it out"
* also fixed old message for SET event_scheduler=
  (it was also non-translatable)
* changed to use sql_print_error() when an error is not sent to the user
* removed duplicate hard-coded error message
2023-07-02 12:15:11 +02:00

30 lines
1.1 KiB
Text

--source include/not_embedded.inc
--source include/have_perfschema.inc
--echo #
--echo # MDEV-6984 Can't migrate from MySQL 5.6.21 to MariaDB 10
--echo #
#
# 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;
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