[MDEV-12454] mysql_upgrade documentation is IMHO wrong Created: 2017-04-06  Updated: 2017-05-02  Resolved: 2017-05-02

Status: Closed
Project: MariaDB Server
Component/s: Documentation, Scripts & Clients
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Oli Sennhauser Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: None
Environment:

n.a.



 Description   

MariaDB documentation about mysql_upgrade states:

"It's also safe to run mysql_upgrade for minor upgrades, as if there are no incompatibles between versions it does nothing."

https://mariadb.com/kb/en/mariadb/mysql_upgrade/

This is according to my research wrong. When I enable general log before mysql_upgrade and have a look into it there are many DDL and DML statements happening. This is IHMO NOT "it does nothing"!

Regards,
Oli



 Comments   
Comment by Sergei Golubchik [ 2017-04-06 ]

mysql_upgrade issues a lots of commands, but they don't change anything. For example, there's a bunch of ALTER TABLE statements that add columns to system tables. They fail if these columns already exist.

May be the manual could better say "changes nothing" instead of "does nothing".

Comment by Oli Sennhauser [ 2017-04-06 ]

I do not agree with your comment "but they don't change anything" except the general log is lying and the queries were not really executed. But then this would be another bug report.

Logically you might be correct. But physically this might have an impact. For example in some stupid edge cases where I have zillions of users in my mysql.user table or similar.

I counted 259 DDL and 69 DML statements. And this can take quite a while where my database is or should not be responsive. further those statements are counted in the com_ counters and could confuse my alerting/monitoring.
Further this could lead to heavy unexpected load on my server.

So what mysql_upgrade does: it basically recreates the whole MySQL DD! IMHO documentation should reflect what technically is happening...

Comment by Ian Gilfillan [ 2017-05-02 ]

Changed text to "changes nothing" as per Sergei's suggestion. Most of the statements are of the "CREATE TABLE IF NOT EXISTS" nature or as Sergei pointed out will fail if the column already exists so it's hardly recreating the entire DD.

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