[MDEV-32362] Backup of VIRTUALS colums is represented in restore Created: 2023-10-06 Updated: 2024-01-02 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Backup |
| Affects Version/s: | 10.6.14 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Kim Gert Nielsen | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When doing a backup of a table with a virtual colum (GENERATED ALWAYS) the mysqldump tools fails to see its a generated column and adds it to the restore example
then a mysqldump --opt generates
It should actually ignore it since its generated. The example above is very simple but we have seen issues with restoring due to this. |
| Comments |
| Comment by Roman [ 2023-12-18 ] |
|
Been trying to track this down for days, as I am not too closely familiar with mariadb/mysql landscape. I am migrating from on-prem MariaDB to RDS Aurora, which is MySQL-based, and ran into this exact issue. The dump contains these generated values. And then the loading of the dump fails with: > ERROR 3105 (HY000) at line 2217: The value specified for generated column 'x' in table 'y' is not allowed. It appears that MySQL had this exact bug fixed years ago. Here it is for reference: https://github.com/mysql/mysql-server/commit/513552e30ba4cabe638cabb5a69cb1a82a96c7c5 Was released in 5.7.9 https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-9.html |
| Comment by Kim Gert Nielsen [ 2024-01-02 ] |
|
Yeah it seems the dump tool has gotten very little attention for many years. |