[MDEV-21991] mysqldump will create a dump with indexes ordered by "type and creation time" instead of "type and name" Created: 2020-03-20 Updated: 2020-03-27 Resolved: 2020-03-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Massimiliano Cuttini | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | Compatibility | ||
| Environment: |
CentOS 7 |
||
| Description |
|
We use:
to extract all the tables definitions.
The output is then hashed in order to check table version across different servers. Is it possible to force the dump of the indexes by type and then by alphabetical order? |
| Comments |
| Comment by Sergei Golubchik [ 2020-03-26 ] | |
|
No, mysqldump dumps the table definition as it was created by the user, it does not reorder anything. If you want to compare table structure while ignoring certain details, you'd better query information_schema tables.
will give you all indexes in all tables sorted alphabetically. You can hash that afterwards as you like. | |
| Comment by Massimiliano Cuttini [ 2020-03-26 ] | |
|
It's completly different to parse the result of the information_schema and having a dump of the table definitions. I can use the dump also to create new applications instead of I cannot reuse information schema for this directly (i should parse the result). I know this is not a bug. I think that there is not any kind of advantage having INDEX ordered by creation time. Table are dumped in alphabetical order, not in creation order and there is a reason for this. |