← Back to team overview

maria-discuss team mailing list archive

Re: Why MyISAM as default engine for system tables ?

 

Note that several system tables in "mysql" schema cannot have InnoDB
as storage engine due to explicit prohibition in the InnoDB code (see
https://github.com/MariaDB/server/blob/10.4/storage/innobase/row/row0mysql.cc#L2376)
and due to lots of other code throughout the codebase assuming that
the system tables are not transactional. MySQL has fixed that only in
8.0.

I'd say the question of why system tables don't have Aria storage
engine is still valid though.

On Wed, Jun 6, 2018 at 5:11 AM <Rhys.Campbell@xxxxxxxxxxxx> wrote:
>
> "why keep using MyISAM as default engine for system tables, when MariaDB has Aria or InnoDB ?"
>
> Probably because of the time required to implement and test this. To be honest you were probably just very unlucky. Generally the MySQL db receives few writes so the chances of corruption are very small. I can honestly say I've never had this issue in over 10 years of working with MySQL/MariaDB.
>
> As I recall the documentation does warn you not to change the mysql table to another other engine. Has anyone else tried?
>
> Rhys
>
> -----Original Message-----
> From: Maria-discuss [mailto:maria-discuss-bounces+rhys.campbell=swisscom.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of Julien Muchembled
> Sent: 06 June 2018 12:38
> To: Maria Discuss <maria-discuss@xxxxxxxxxxxxxxxxxxx>
> Cc: Robin Sébastien <seb@xxxxxxxxxx>
> Subject: [Maria-discuss] Why MyISAM as default engine for system tables ?
>
> Hello,
>
> A few weeks ago, we got the following fatal error when starting mariadb:
>
> [Note] Starting crash recovery...
> [Note] Crash recovery finished.
> [ERROR] mysqld: Table './mysql/db' is marked as crashed and should be repaired
> [Warning] Checking table:   './mysql/db'
> [ERROR] mysql.db: 1 client is using or hasn't closed the table properly tch value count at row 1 [ERROR] Aborting
>
> Unfortunately, what led to this is unclear. We only rebooted the machine. Maybe a hw raid issue. We did a copy at that time. I tried recently if it could be repaired but I don't have the a fatal error anymore. We also don't know why system tables were touched during the reboot.
>
> Anyway, given the description of Aria ("Crash-safe tables with MyISAM heritage"), I understand that MyISAM is not crash-safe. Then, why keep using MyISAM as default engine for system tables, when MariaDB has Aria or InnoDB ?
>
> Not sure a crash-safe engine would have helped in the above case (there's no miracle for data corruption). But we'd like at least that all our mariadb setups are crash-safe (e.g. power cuts) and we use InnoDB partly for that. And I don't know if a InnoDB DB could be always recoverable if the 'mysql' DB is lost but we don't want to do manually (and learn how to) what the machine can do automatically.
>
> Julien
>
> _______________________________________________
> Mailing list: https://launchpad.net/~maria-discuss
> Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~maria-discuss
> Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp


References