MDEV-22127 highlights the lack of import ability into 10.4+ from mysqldump.
When saving system tables, the logical form of the mysql.user table is not insert statements but create user statements. Show create user was added in 10.2.
users, roles, their grants, servers, plugins, and udf functions all are a global defination where being created as a logical form aids portability between major versions.
- users - CREATE USER, GRANT
- roles - CREATE ROLE, GRANT
- servers - CREATE SERVER
- plugin - INSTALL PLUGIN
- udf - CREATE FUNCTION
- compatibility - so its a new dump option
- use "IF NOT EXISTS" is added with --insert-ignore
- is dumped first to solve MDEV-19558
- logically dumped tables are omitted from mysql database
- because of how users, roles and grants are tied together in output, tie these to a single option
- because there are better options for data migration, allow the mysqldump to be limited to just these system attributes (e.g. MDEV-22645)
- server, plugins, and udf can be separate options.
- include "stats" as a virtual alias for the mysql EITS and innodb statistics tables
- timezones as an alias for timezone tables