1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-28209 New mysql_upgrade message on minor-only upgrades is confusing

This commit is contained in:
Sergei Golubchik
2025-03-21 17:52:43 +01:00
parent bca07a6f88
commit 04771ff6b1
2 changed files with 14 additions and 10 deletions

View File

@@ -855,8 +855,7 @@ static int upgrade_already_done(int silent)
s= strchr(version, '.'); s= strchr(version, '.');
s= strchr(s + 1, '.'); s= strchr(s + 1, '.');
if (strncmp(upgrade_from_version, version, if (strncmp(upgrade_from_version, version, (size_t)(s - version + 1)))
(size_t)(s - version + 1)))
{ {
if (calc_server_version(upgrade_from_version) <= MYSQL_VERSION_ID) if (calc_server_version(upgrade_from_version) <= MYSQL_VERSION_ID)
{ {
@@ -870,9 +869,14 @@ static int upgrade_already_done(int silent)
} }
if (!silent) if (!silent)
{ {
verbose("This installation of MariaDB is already upgraded to %s.\n" if (strcmp(upgrade_from_version, version))
"There is no need to run mysql_upgrade again for %s.", verbose("This installation of MariaDB is already upgraded to %s.\n"
upgrade_from_version, version); "There is no need to run mysql_upgrade again for %s, because "
"they're both %.*s.",
upgrade_from_version, version, (int)(s - version), version);
else
verbose("This installation of MariaDB is already upgraded to %s.\n"
"There is no need to run mysql_upgrade again.", version);
if (!opt_check_upgrade) if (!opt_check_upgrade)
verbose("You can use --force if you still want to run mysql_upgrade"); verbose("You can use --force if you still want to run mysql_upgrade");
} }

View File

@@ -48,7 +48,7 @@ Phase 7/7: Running 'FLUSH PRIVILEGES'
OK OK
Run it again - should say already completed Run it again - should say already completed
This installation of MariaDB is already upgraded to X.Y.Z-MariaDB. This installation of MariaDB is already upgraded to X.Y.Z-MariaDB.
There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. There is no need to run mysql_upgrade again.
You can use --force if you still want to run mysql_upgrade You can use --force if you still want to run mysql_upgrade
Force should run it regardless of whether it has been run before Force should run it regardless of whether it has been run before
Phase 1/7: Checking and upgrading mysql database Phase 1/7: Checking and upgrading mysql database
@@ -778,10 +778,10 @@ FLUSH PRIVILEGES;
# MDEV-27279: mariadb_upgrade add --check-if-upgrade-is-needed # MDEV-27279: mariadb_upgrade add --check-if-upgrade-is-needed
# #
This installation of MariaDB is already upgraded to X.Y.Z-MariaDB. This installation of MariaDB is already upgraded to X.Y.Z-MariaDB.
There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. There is no need to run mysql_upgrade again.
Looking for 'mariadb' as: mariadb Looking for 'mariadb' as: mariadb
This installation of MariaDB is already upgraded to X.Y.Z-MariaDB. This installation of MariaDB is already upgraded to X.Y.Z-MariaDB.
There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. There is no need to run mysql_upgrade again.
# #
# MDEV-27279: mariadb_upgrade check-if-upgrade absence is do it # MDEV-27279: mariadb_upgrade check-if-upgrade absence is do it
# #
@@ -792,9 +792,9 @@ Empty or non existent ...mysql_upgrade_info. Assuming mysql_upgrade has to be ru
# #
Looking for 'mariadb' as: mariadb Looking for 'mariadb' as: mariadb
This installation of MariaDB is already upgraded to X.Y.0-MariaDB. This installation of MariaDB is already upgraded to X.Y.0-MariaDB.
There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. There is no need to run mysql_upgrade again for X.Y.Z-MariaDB, because they're both X.Y.
This installation of MariaDB is already upgraded to X.Y.0-MariaDB. This installation of MariaDB is already upgraded to X.Y.0-MariaDB.
There is no need to run mysql_upgrade again for X.Y.Z-MariaDB. There is no need to run mysql_upgrade again for X.Y.Z-MariaDB, because they're both X.Y.
You can use --force if you still want to run mysql_upgrade You can use --force if you still want to run mysql_upgrade
# #
# MDEV-27279: mariadb_upgrade check-if-upgrade with major version change # MDEV-27279: mariadb_upgrade check-if-upgrade with major version change