[MDEV-8944] mysql_upgrade force engine Created: 2015-10-14 Updated: 2015-10-20 Resolved: 2015-10-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Affects Version/s: | 10.0.21 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Thierry Brouard | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux Centos 7.1 |
||
| Description |
|
Hello, Just after the MariaDB 10.0.21 installation on my server, I decided to change all database tables "mysql" for the Aria format. But when I decided to run mysql_upgrade, to check if the installation was good, some errors appeared. Specifically on InnoDB table _ * _ stats. When I look inside the code, parts contain definitions forcing engine to use. MariaDB is not Oracle and leaves its clients or users for the use of engines, right? |
| Comments |
| Comment by Elena Stepanova [ 2015-10-15 ] |
|
Thierry-B., If it's about the errors, please quote the exact output that you got. Errors about system tables, including stat tables, can indeed appear after switching from one version to another, but mysql_upgrade is supposed to fix them. If if was about the code, please quote the code fragment(s) that you are referring to, and explain the nature of the problem that you see in them. Thanks. |
| Comment by Thierry Brouard [ 2015-10-15 ] |
|
Elena, The text written below is not directed against you That's not really a bug in fact. But JIRA doesn't purpose anything else than "bug, epic or task". Anyway, First point : line 23 to 27
Is It a choice ? or an historical laziness ? Why not let the default storage engine to build the mysql database, except if this one is blackhole ! Second point : line 106 to 130
Well, this tables are not transactionnal, they are used to store datas only. To my knowledge it has no integrity constraint. But the script fix directly INNODB without explaination. why not use @innodb_myisam variable Third point : The result of this, is when mysql_upgrade trying to control the differences, It said , Error. Best regards, Elena |
| Comment by Elena Stepanova [ 2015-10-15 ] |
|
Yes, I understand you are not being antagonistic, my comment had the literal meaning: to respond appropriately, we really needed to know what exactly you meant while filing the issue. It is much clearer now, thanks. I will write a detailed response later, we are having a MariaDB development meeting now, so things are a bit hectic here. Regarding issue types, "bug" and "task" normally cover the range of issues we want to use JIRA for (and epic is rarely used as an umbrella for smaller tasks). If you don't find either of them suitable, most likely what you want is a discussion, which is better to have on the public MariaDB mailing list maria-discuss@lists.launchpad.net – you will have a wider audience and more opinions there. |
| Comment by Elena Stepanova [ 2015-10-20 ] |
|
So, back to your questions.
It is historical, but not exactly laziness. The legacy limitation that system tables must be MyISAM is deeply ingrained in MySQL/MariaDB, and it's not easy to get rid of.
You can try to alter a system table manually on a test instance and see how it goes. So all in all, it will happen some day, but we are not there yet.
InnoDB stat tables are used only for InnoDB, and inside InnoDB. The engine expects to find them in their dictionary and cannot store statistics if the tables belong to any other engine. I suppose one could claim that the tables should be universal, but it just does not make sense. They are meaningless if InnoDB is disabled, they are only useful when InnoDB is in use, and it just makes no point to introduce inter-engine communication for such functionality. If you have good arguments for that, I suppose you could file a feature request for Oracle InnoDB.
Actually, it is not, or I don't understand the nature of your complaint. Both mysql_upgrade and mysql_install_db use SQL-ish scripts which, in turn, are put up together during compilation from templates that reside in scripts/* folder, but there is no code duplication or SQL hard code in either of the tools. If you still think otherwise, please provide examples.
I hope the above explains why mysql_upgrade was not happy about your converting all system tables to Aria. If it does not, please let me know. |
| Comment by Thierry Brouard [ 2015-10-20 ] |
|
Given my last point, I just retail inspector the code that generates table creation and update it. Thank you very much for your time, Elena. PS: After the migration of the "mysql" database of innodb_*_stats tables from the InnoDB format to Aria, statistics no longer stored. after restoring the structure to Innodb, everything returned to normal. That's good, but here shows a nesting (too) high in my opinion |