2

I have a MariaDB server (v10.6.11 also tried on 10.11.6). I run some massive migrations which also modify a lot of primary keys on a large number of tables. When the migration starts, I disable the FK constraints and enable them again at the end.

After the migration is completed some (always the same) foreign keys (constraints) are missing.

If I restart the db server all the fk constrains are back to normal.

I have tried to Flush the tables but with no luck.

Is there some way to "fix" this situation without having to restart the database server?

ptheofan
  • 121
  • 1
  • 1
    "are missing" is this in behaviour and/or "show create table"? As it will probably have the same effect without data, can you take a mariadb-dump --no-data and do the migration with a general log to capture it. Please do a bug report perhaps with a private report of data structures/changes so that that the test case to produce this can be minimised and produced. – danblack Dec 18 '23 at 00:34
  • show create table does not include the missing constraints before the server is restarted. I will try generate a report (all migrations SQL statements are generated are runtime by the code) and submit it. Good thing is the issue persists even when db has no data. Thanks for the suggestion danblack – ptheofan Dec 19 '23 at 11:07

0 Answers0