[MDEV-32209] mariadb cannot import 10.3 or older mysqldump-produced dumps anymore Created: 2023-09-20 Updated: 2023-09-22 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.4.1, 10.5.22 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Rick Pizzi | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | regression | ||
| Issue Links: |
|
||||||||
| Description |
|
It appears that the change in mysql.user table from table to view has broken the ability to restore older dumps produced (for example) with MariaDB 10.3 or older. The 10.3 dump will try to drop table user, but in 10.5 and later you cannot drop a view with "drop table" anymore (not sure when this changed). Hence in 10.5 you get:
But in the 10.3 dump you have:
I would recommend we revert the change that disabled "drop table" for view, in the sake of compatibility. Thanks, |
| Comments |
| Comment by Rick Pizzi [ 2023-09-20 ] | |
|
I guess it's not just a matter of reverting the drop table thing, as of course we need a view there and not a table... | |
| Comment by Marko Mäkelä [ 2023-09-21 ] | |
|
| |
| Comment by Rick Pizzi [ 2023-09-22 ] | |
|
A possible solution would be to add the following to the output of mysqldump, right after the "DROP TABLE IF EXISTS `user`:
| |
| Comment by Sergei Golubchik [ 2023-09-22 ] | |
|
we can hardly change mysqldump of 10.3 so that it would have been adding DROP VIEW IF EXISTS `user`; to the dumps it has been creating over the last five years. I don't see what we can do here, a user can employ the workaround you provided. | |
| Comment by Rick Pizzi [ 2023-09-22 ] | |
|
Right, so we should allow DROP TABLE to drop views as well (by the way, the fact it currently doesn't allow that, should raise an error and not a warning, IMHO) Thanks, |