Re: [Maria-discuss] mysql_upgrade fails
on centos 8, upgrade form mraidb 10.3 to 10.6 fails with: sudo mysql_upgrade -u root -p Enter password: Major version upgrade detected from 10.3.17-MariaDB to 10.6.8-MariaDB. Check required! Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK mysql.index_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.roles_mapping OK mysql.servers OK mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK Phase 2/7: Installing used storage engines... Skipped Phase 3/7: Fixing views Phase 4/7: Running 'mysql_fix_privilege_tables' ERROR 1005 (HY000) at line 694: Can't create table `mysql`.`innodb_table_stats` (errno: 184 "Tablespace already exists") ERROR 1005 (HY000) at line 698: Can't create table `mysql`.`innodb_index_stats` (errno: 184 "Tablespace already exists") ERROR 1005 (HY000) at line 702: Can't create table `mysql`.`transaction_registry` (errno: 184 "Tablespace already exists") ERROR 1005 (HY000) at line 774: Can't create table `mysql`.`gtid_slave_pos` (errno: 184 "Tablespace already exists") FATAL ERROR: Upgrade failed ________________________________ From: Vicențiu Ciorbaru <cvicentiu@gmail.com> Sent: Wednesday, April 21, 2021 3:51 PM To: Majed Zouhairy <majedzouhairy@hotmail.com> Cc: maria-discuss@lists.launchpad.net <maria-discuss@lists.launchpad.net> Subject: Re: [Maria-discuss] mysql_upgrade fails Hi Majed, What MariaDB version is this? What is the previous version and what is the current version you are upgrading to? Is this from a linux distro, or where did you get the MariaDB binary from? If it's a distro, which one? Vicențiu On Wed, 21 Apr 2021 at 15:31, Majed Zouhairy <majedzouhairy@hotmail.com<mailto:majedzouhairy@hotmail.com>> wrote: in last time's upgrade and today i got: sudo mysql_upgrade -u root -p Enter password: Phase 1/7: Checking and upgrading mysql database Processing databases mysql mysql.column_stats OK mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK mysql.index_stats OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.roles_mapping OK mysql.servers OK mysql.table_stats OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK Phase 2/7: Installing used storage engines... Skipped Phase 3/7: Fixing views Phase 4/7: Running 'mysql_fix_privilege_tables' ERROR 1813 (HY000) at line 77: Tablespace for table '`mysql`.`innodb_table_stats`' exists. Please DISCARD the tablespace before IMPORT ERROR 1813 (HY000) at line 81: Tablespace for table '`mysql`.`innodb_index_stats`' exists. Please DISCARD the tablespace before IMPORT ERROR 1813 (HY000) at line 85: Tablespace for table '`mysql`.`transaction_registry`' exists. Please DISCARD the tablespace before IMPORT ERROR 1813 (HY000) at line 153: Tablespace for table '`mysql`.`gtid_slave_pos`' exists. Please DISCARD the tablespace before IMPORT ERROR 1146 (42S02) at line 642: Table 'mysql.innodb_index_stats' doesn't exist ERROR 1243 (HY000) at line 643: Unknown prepared statement handler (stmt) given to EXECUTE ERROR 1146 (42S02) at line 645: Table 'mysql.innodb_table_stats' doesn't exist ERROR 1243 (HY000) at line 646: Unknown prepared statement handler (stmt) given to EXECUTE ERROR 1146 (42S02) at line 650: Table 'mysql.innodb_index_stats' doesn't exist ERROR 1146 (42S02) at line 654: Table 'mysql.innodb_table_stats' doesn't exist ERROR 1146 (42S02) at line 657: Table 'mysql.innodb_table_stats' doesn't exist FATAL ERROR: Upgrade failed what to do? _______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net<mailto:maria-discuss@lists.launchpad.net> Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Am 20.07.22 um 09:34 schrieb Majed Zouhairy:
on centos 8, upgrade form mraidb 10.3 to 10.6 fails
it's not that smart to skip major versions why for the sake of god do you not upgrade 10.3 -> 10.4 -> 10.5 -> 10.6 like everybody else?
On 20.07.22 12:39, Reindl Harald wrote:
it's not that smart to skip major versions
why for the sake of god do you not upgrade 10.3 -> 10.4 -> 10.5 -> 10.6 like everybody else?
this has been considered best practice for quite a while, but is not really the case anymore (although old habits my take their time to die) It is still OK to do it one step at a time, and it may help to track down a non-backwards-compatible change that your applications can't cope with by doing it this way, and running application tests on each major version step on the way. From the server side itself there's no real reason to not just upgrade to the final target version right away anymore. In the past such scenarios were not tested, but sometimes people would do it anyway (intentionally or via a distro upgrade) and there were no related problems related for several years. So it seemed to be safe to skip over major releases after all, and we also added test coverage for this in recent years. So "like everybody else does" was never true to begin with, even though documentation recommended to to it this way until some two years ago or so. But by now it is not even really what the documentation suggests anymore. I was originally reluctant about this change in recommendation, but have been convinced since and so far have not seen any problem with such direct version skipping upgrades either. -- Hartmut Holzgraefe, Principal Support Engineer (EMEA) MariaDB Corporation | http://www.mariadb.com/
i just upgraded zabbix and it doesn't support version 10.4 so that's why.. and it failed the upgrade prior to version 10.3 ________________________________ From: Maria-discuss <maria-discuss-bounces+majedzouhairy=hotmail.com@lists.launchpad.net> on behalf of Reindl Harald <h.reindl@thelounge.net> Sent: Wednesday, July 20, 2022 1:39 PM To: maria-discuss@lists.launchpad.net <maria-discuss@lists.launchpad.net> Subject: Re: [Maria-discuss] mysql_upgrade fails Am 20.07.22 um 09:34 schrieb Majed Zouhairy:
on centos 8, upgrade form mraidb 10.3 to 10.6 fails
it's not that smart to skip major versions why for the sake of god do you not upgrade 10.3 -> 10.4 -> 10.5 -> 10.6 like everybody else? _______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Am 21.07.22 um 07:48 schrieb Majed Zouhairy:
i just upgraded zabbix and it doesn't support version 10.4 so that's why.. and it failed the upgrade prior to version 10.3
irrelevant - i would make a major upgrade followed by mysql_upgrade one by one no matter what "it doesn't support version 10.4" means when it comes to "mysql_upgrade" i don't trust what developers say given that it even crashed hard after bugfix point-updates in the past (which now stops with the message "There is no need to run mysql_upgrade again") 10.2.x to 10.2.y and mysql_upgrade crashing but now developers pretend they even *really test* jumps from 10.2 to 10.6 - are you guys kidding me?
*From:* Maria-discuss <maria-discuss-bounces+majedzouhairy=hotmail.com@lists.launchpad.net> on behalf of Reindl Harald <h.reindl@thelounge.net> *Sent:* Wednesday, July 20, 2022 1:39 PM *To:* maria-discuss@lists.launchpad.net <maria-discuss@lists.launchpad.net> *Subject:* Re: [Maria-discuss] mysql_upgrade fails
Am 20.07.22 um 09:34 schrieb Majed Zouhairy:
on centos 8, upgrade form mraidb 10.3 to 10.6 fails
it's not that smart to skip major versions
why for the sake of god do you not upgrade 10.3 -> 10.4 -> 10.5 -> 10.6 like everybody else?
so what is the solution? what Imeant by 10.4, is that the new version of zabbix does not support mariadb below 10.5 must i report a bug report somewhere else? ________________________________ From: Maria-discuss <maria-discuss-bounces+majedzouhairy=hotmail.com@lists.launchpad.net> on behalf of Reindl Harald <h.reindl@thelounge.net> Sent: Thursday, July 21, 2022 11:37 AM To: maria-discuss@lists.launchpad.net <maria-discuss@lists.launchpad.net> Subject: Re: [Maria-discuss] mysql_upgrade fails Am 21.07.22 um 07:48 schrieb Majed Zouhairy:
i just upgraded zabbix and it doesn't support version 10.4 so that's why.. and it failed the upgrade prior to version 10.3
irrelevant - i would make a major upgrade followed by mysql_upgrade one by one no matter what "it doesn't support version 10.4" means when it comes to "mysql_upgrade" i don't trust what developers say given that it even crashed hard after bugfix point-updates in the past (which now stops with the message "There is no need to run mysql_upgrade again") 10.2.x to 10.2.y and mysql_upgrade crashing but now developers pretend they even *really test* jumps from 10.2 to 10.6 - are you guys kidding me?
*From:* Maria-discuss <maria-discuss-bounces+majedzouhairy=hotmail.com@lists.launchpad.net> on behalf of Reindl Harald <h.reindl@thelounge.net> *Sent:* Wednesday, July 20, 2022 1:39 PM *To:* maria-discuss@lists.launchpad.net <maria-discuss@lists.launchpad.net> *Subject:* Re: [Maria-discuss] mysql_upgrade fails
Am 20.07.22 um 09:34 schrieb Majed Zouhairy:
on centos 8, upgrade form mraidb 10.3 to 10.6 fails
it's not that smart to skip major versions
why for the sake of god do you not upgrade 10.3 -> 10.4 -> 10.5 -> 10.6 like everybody else?
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Am 21.07.22 um 10:54 schrieb Majed Zouhairy:
so what is the solution? what Imeant by 10.4, is that the new version of zabbix does not support mariadb below 10.5
and how does that change the upgrade path? 10.2 -> 10.3 -> mysql_upgrade 10.3 -> 10.4 -> mysql_upgrade 10.4 -> 10.5 -> mysql_upgrade how does that lead to 10.6 instead, well 10.5? "i just upgraded zabbix and it doesn't support version 10.4" normally you *first* look at the requirements
must i report a bug report somewhere else? ------------------------------------------------------------------------ *From:* Maria-discuss <maria-discuss-bounces+majedzouhairy=hotmail.com@lists.launchpad.net> on behalf of Reindl Harald <h.reindl@thelounge.net> *Sent:* Thursday, July 21, 2022 11:37 AM *To:* maria-discuss@lists.launchpad.net <maria-discuss@lists.launchpad.net> *Subject:* Re: [Maria-discuss] mysql_upgrade fails
Am 21.07.22 um 07:48 schrieb Majed Zouhairy:
i just upgraded zabbix and it doesn't support version 10.4 so that's why.. and it failed the upgrade prior to version 10.3
irrelevant - i would make a major upgrade followed by mysql_upgrade one by one no matter what "it doesn't support version 10.4" means
when it comes to "mysql_upgrade" i don't trust what developers say given that it even crashed hard after bugfix point-updates in the past (which now stops with the message "There is no need to run mysql_upgrade again")
10.2.x to 10.2.y and mysql_upgrade crashing but now developers pretend they even *really test* jumps from 10.2 to 10.6 - are you guys kidding me?
*From:* Maria-discuss <maria-discuss-bounces+majedzouhairy=hotmail.com@lists.launchpad.net> on behalf of Reindl Harald <h.reindl@thelounge.net> *Sent:* Wednesday, July 20, 2022 1:39 PM *To:* maria-discuss@lists.launchpad.net <maria-discuss@lists.launchpad.net> *Subject:* Re: [Maria-discuss] mysql_upgrade fails
Am 20.07.22 um 09:34 schrieb Majed Zouhairy:
on centos 8, upgrade form mraidb 10.3 to 10.6 fails
it's not that smart to skip major versions
why for the sake of god do you not upgrade 10.3 -> 10.4 -> 10.5 -> 10.6 like everybody else?
On 21.07.22 10:37, Reindl Harald wrote:
10.2.x to 10.2.y and mysql_upgrade crashing
can you point me at a related bug report for that?
but now developers pretend they even *really test* jumps from 10.2 to 10.6 - are you guys kidding me?
I'm not a developer, or at least that's not my job description at MariaDB Corp., but no, I'm not trying to kid you.
(which now stops with the message "There is no need to run mysql_upgrade again")
While there have been a few cases where the system table schema changed within a major release series (in all cases I remember by simply extending the size of some VARCHAR) the plan is to never have that again within in a major release. With new major releases happening more frequently these days (which can be considered arguably by itself, but that is another story) any such change can now more easily wait on the next major release. And so mysql_upgrade on a minor release does not actually have to do anything anyway. The new logic just takes a shortcut by checking whether the current major release number differs from what is stored as last known version, and when seeing the same number it just terminates right away (unless when started with --force) instead of spending time on individual checks that will end up in "nothing to do" anyway. The main problem with this change that I see is with the wording of the message printed in that case, and if you check the related MDEV-28209 you'll see that it was reported by me. The other (long standing) issue with the mysql_upgrade version check is that it relies on information stored in a flat file, and not in the database itself, so e.g. in case of a "mysql" system schema restored from a mysqldump taken from an older instance mysql_upgrade may report that no action is needed based on wrong information. But that's a totally different story, and if anyone wants to chime in on the related MDEV-23008 (also reported by me) I'd be happy to see that. -- Hartmut Holzgraefe, Principal Support Engineer (EMEA) MariaDB Corporation | http://www.mariadb.com/
Am 21.07.22 um 13:01 schrieb Hartmut Holzgraefe:
On 21.07.22 10:37, Reindl Harald wrote:
10.2.x to 10.2.y and mysql_upgrade crashing
can you point me at a related bug report for that?
i can't find it in the archives and it was one of my replies to a point update release anouncement * rpmbuild from sources * upgrade * as everytime run "mysql_upgrade" * mysql_upgrade itself didn't work / crashed yeah, it was fixed at the next point release but it tells a lot about how well it's tested at all
participants (3)
-
Hartmut Holzgraefe
-
Majed Zouhairy
-
Reindl Harald