backup-container
backup-container copied to clipboard
Restoring to MySQL fails when tables include generated columns
Judging from https://dba.stackexchange.com/a/279248, it sounds like
MariaDB's mysqldump dumps the generated values, but MySQL only accepts DEFAULT as value for a virtual generated column.
Creating the backup works no problem, but I get the following error when running ./backup.sh -r HOST:PORT/DATABASE:
ERROR 3105 (HY000) at line 2517: The value specified for generated column 'foo' in table 'bar' is not allowed.
I imagine this issue could be resolved by either:
- Including the workaround using
sedas described in the stackexchange answer as part of the restore script - Using an image which executes a non-mariadb version of
mysqldump
I'll look to add reproduction steps soon!