[MDEV-23630] mysqldump to logically dump system tables Created: 2020-08-30 Updated: 2023-09-26 Resolved: 2020-10-31 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Fix Version/s: | 10.2.37, 10.3.28, 10.4.18, 10.5.9 |
| Type: | Task | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Description |
|
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. So:
Requirements:
Possible:
|
| Comments |
| Comment by Daniel Black [ 2020-08-30 ] |
|
Needs tests. |
| Comment by Daniel Black [ 2020-08-31 ] |
|
GeoffMontee I see from If you have any insights on ordering of output or tests cases here that would be appreciated. Undoubtedly I'll find a few more bugs as I write test cases. |
| Comment by Geoff Montee (Inactive) [ 2020-08-31 ] |
|
Thanks, danblack. This sounds like a cool idea to me. Some questions:
|
| Comment by Daniel Black [ 2020-08-31 ] |
|
anel is working on the dumping of sequences to cover --master-data is the local gtid and binlog position. only slave-data is relevant to multi-source and it appears to be implemented. I'm tempted to implement --system=stats,timezones so they get included under all, that way the statistics of the engines and the timezones are migrated to ensure queries stay the same. With this I'm pretty sure that the "mysql" database can be skipped when going to a new version. I want to look closer to see particular the stats tables to see if they have changed over time. A subgoal is to migrate this over without requiring mysql_update on the destination so I don't want to break that goal on a whim. |
| Comment by Daniel Black [ 2020-10-26 ] |
|
bb-10.2-danielblack- Ready for review. anel covered all but the `dump_all_users_and_grants` |
| Comment by cybernet2u [ 2022-05-02 ] |
|
dumping users from MySQL and then try to import them in a MariaDB ... it's futile |