From 620d520d680fc8849a518d0fe5172bcedb632564 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Thu, 29 Sep 2022 00:20:23 +1000 Subject: [PATCH] MDEV-29614 mariadb-upgrade calls mysql and mysql-check (#2279) rather than mariadb/mariadb-check --- client/mysql_upgrade.c | 6 +++--- mysql-test/main/mysql_upgrade.result | 6 +++--- mysql-test/main/mysql_upgrade.test | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 4e7ddec312f..ad54b06101e 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -935,7 +935,7 @@ static int run_mysqlcheck_upgrade(my_bool mysql_db_only) return 0; } verbose("Phase %d/%d: Checking and upgrading %s", ++phase, phases_total, what); - print_conn_args("mysqlcheck"); + print_conn_args("mariadb-check"); retch= run_tool(mysqlcheck_path, NULL, /* Send output from mysqlcheck directly to screen */ defaults_file, @@ -1451,7 +1451,7 @@ int main(int argc, char **argv) } /* Find mysql */ - find_tool(mysql_path, IF_WIN("mysql.exe", "mysql"), self_name); + find_tool(mysql_path, IF_WIN("mariadb.exe", "mariadb"), self_name); open_mysql_upgrade_file(); @@ -1459,7 +1459,7 @@ int main(int argc, char **argv) exit(upgrade_already_done(0) == 0); /* Find mysqlcheck */ - find_tool(mysqlcheck_path, IF_WIN("mysqlcheck.exe", "mysqlcheck"), self_name); + find_tool(mysqlcheck_path, IF_WIN("mariadb-check.exe", "mariadb-check"), self_name); if (opt_systables_only && !opt_silent) printf("The --upgrade-system-tables option was used, user tables won't be touched.\n"); diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result index f1872c17802..e2155b522a3 100644 --- a/mysql-test/main/mysql_upgrade.result +++ b/mysql-test/main/mysql_upgrade.result @@ -778,18 +778,18 @@ FLUSH PRIVILEGES; # This installation of MariaDB is already upgraded to MariaDB . There is no need to run mysql_upgrade again for MariaDB . -Looking for 'mysql' as: mysql +Looking for 'mariadb' as: mariadb This installation of MariaDB is already upgraded to MariaDB . There is no need to run mysql_upgrade again for MariaDB . # # MDEV-27279: mariadb_upgrade check-if-upgrade absence is do it # -Looking for 'mysql' as: mysql +Looking for 'mariadb' as: mariadb Empty or non existent ...mysql_upgrade_info. Assuming mysql_upgrade has to be run! # # MDEV-27279: mariadb_upgrade check-if-upgrade with minor version change # -Looking for 'mysql' as: mysql +Looking for 'mariadb' as: mariadb This installation of MariaDB is already upgraded to MariaDB . There is no need to run mysql_upgrade again for MariaDB . This installation of MariaDB is already upgraded to MariaDB . diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test index 017a7cc742f..19d490d73bd 100644 --- a/mysql-test/main/mysql_upgrade.test +++ b/mysql-test/main/mysql_upgrade.test @@ -55,7 +55,7 @@ DROP USER mysqltest1@'%'; --echo Run mysql_upgrade with a non existing server socket --replace_result $MYSQLTEST_VARDIR var ---replace_regex /.*mysqlcheck.*: Got/mysqlcheck: Got/ /\([0-9|-]*\)/(errno)/ +--replace_regex /.*mariadb-check.*: Got/mariadb-check: Got/ /\([0-9|-]*\)/(errno)/ --error 1 # NC: Added --skip-version-check, as the version check would fail when # mysql_upgrade tries to get the server version. @@ -139,7 +139,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; --echo Run mysql_upgrade with unauthorized access --error 1 --exec $MYSQL_UPGRADE --skip-verbose --user=root --password=wrong_password 2>&1 ---replace_regex /.*mysqlcheck.*: Got/mysqlcheck: Got/ /\([0-9|-]*\)/(errno)/ +--replace_regex /.*mariadb-check.*: Got/mariadb-check: Got/ /\([0-9|-]*\)/(errno)/ --error 1 --exec $MYSQL_UPGRADE --skip-verbose --skip-version-check --user=root --password=wrong_password 2>&1 @@ -290,7 +290,7 @@ FLUSH PRIVILEGES; --replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / --error 1 --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed ---replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mysql.* as:[^\n]*/'mysql' as: mysql/ +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mariadb.* as:[^\n]*/'mariadb' as: mariadb/ --error 1 --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose @@ -302,7 +302,7 @@ FLUSH PRIVILEGES; --replace_regex /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/ --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed ---replace_regex /'mysql.* as:[^\n]*/'mysql' as: mysql/ /open .* Assuming/open XXX. Assuming/ /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/ +--replace_regex /'mariadb.* as:[^\n]*/'mariadb' as: mariadb/ /open .* Assuming/open XXX. Assuming/ /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/ --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose --echo # @@ -324,7 +324,7 @@ EOF --error 1 --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --silent ---replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mysql.* as:[^\n]*/'mysql' as: mysql/ +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mariadb.* as:[^\n]*/'mariadb' as: mariadb/ --error 1 --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose --replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / @@ -351,7 +351,7 @@ EOF --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --silent --replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed ---replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mysql.* as:[^\n]*/'mysql' as: mysql/ +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mariadb.* as:[^\n]*/'mysql' as: mysql/ --exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose --remove_file $MYSQLD_DATADIR/mysql_upgrade_info drop table mysql.global_priv;