[MDEV-9394] Automatic dictionary upgrade on server upgrade Created: 2016-01-11  Updated: 2023-11-30

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Jan Lindström (Inactive) Assignee: Ralf Gebhardt
Resolution: Unresolved Votes: 6
Labels: None

Issue Links:
Relates
relates to MDEV-19010 run mysql_install_db automatically Open
relates to MDEV-19989 Implement upgrade checker utility Open

 Description   

Instead of mysql_upgrade separate program, at startup mysqld should check current dictionary version and if it does not match server version call function to upgrade the system tables automatically.



 Comments   
Comment by Peter McLarty [ 2016-01-12 ]

A suggestion as part of this if it identifies this state to not start networking so only localhost activity can be carried out - restricts the possibilities of issues from external sources when before or while the upgrade is run. Probably a low-risk issue with many use cases but in time that may be less true.

Comment by Simon J Mudd [ 2016-01-29 ]
  • +1 to not allow network access while this is going on. That would not be good.
  • Also consider providing an option to NOT trigger the upgrade (and possibly not WRITE anything) but just warn if it needs to be done. Sometimes a DBA might want to check without actually touching the db server and they only way to know would be to startup the binaries, so this option might be handy under those circumstances or for people providing support.
  • It is probably wise to see how other RDBMSes handle this as I've seen that Sybase and Oracle both will do automatic upgrades on startup and it might be interesting to see if there's anything else that might also need to be taken into account.
  • See: http://bugs.mysql.com/bug.php?id=68834 as this is related. I would like to see a table containing this upgrade info (or an append only csv file etc) containing the timestamp, hostname, new mysql version and old mysql version and results of the attempted upgrade (success/failure etc) so that we have some auditing history of the upgrade processes on servers. This is currently not very visible and if you go through several binary upgrades that history can be quite informative.
Comment by Geoff Montee (Inactive) [ 2019-07-09 ]

In MySQL 8.0, this can be done with the --upgrade option.

https://dev.mysql.com/doc/refman/8.0/en/server-options.html#option_mysqld_upgrade

Generated at Thu Feb 08 07:34:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.