Ensuring continuity and open collaboration

MariaDB 10.1.1: no more .frm’s for performance_schema tables

Yes! In MariaDB 10.1.1 tables in PERFORMANCE_SCHEMA do not use .frm files. These files are not created, not read — in fact, PERFORMANCE_SCHEMA tables never touch the disk at all.

This became possible due to a lesser-known feature of MariaDB — new table discovery (“old table discovery” was implemented in MySQL for NDB Cluster in 2004), implemented in MariaDB 10.0.2. Instead of reading and parsing .frm files, MariaDB simply asks PERFORMANCE_SCHEMA table, what structure it has, and because these tables always have a fixed structure, the table directly returns it to MariaDB with no need for any external data dictionary.

It also means, you never need to upgrade PERFORMANCE_SCHEMA tables, they always have the correct structure corresponding to the MariaDB version you’re running. And PERFORMANCE_SCHEMA never needs to deal with outdated .frm files, with old table structures. This alone allowed us to remove ~5500 lines (five and a half thousand lines!) of PERFORMANCE_SCHEMA code.

Currently PERFORMANCE_SCHEMA tables, INFORMATION_SCHEMA tables, Sequence, and Archive tables can work without .frm files. Connect and FederatedX tables also support discovery (a variant of it, called assisted discovery).

In the future we plan to extend other engines to support discovery too.

Table discovery for PERFORMANCE_SCHEMA tables was implemented by Sergey Vojtovich.

No Comments Yet

Leave a Reply

Your email address will not be published. Required fields are marked *

Sponsors

MariaDB Foundation sponsors

Tweets by @mariadbfdn

Code statistics