Skip to content

Restoring to MySQL fails when tables include generated columnsΒ #150

@gvanhorne

Description

@gvanhorne

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 sed as 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions