Pergunta

I have a quick and simple question to clarify. I have medium sized database (400 Gigs) running in MariaDB 10.2 with lots of tables and lots of triggers as well. I am planning to take a mysqldump and import it to another server. So when we take mysqldump, it will be packed with triggers by default as well.

So if I import that dump with triggers to another server, do those triggers fire during the import and create duplicate data?

I know we can take dump without triggers, but I am asking if I import dump with triggers does this create data duplication?

Foi útil?

Solução

If you take time to run mysqldump, even with all default arguments, you will see that triggers in the dump file are created after all insert statements that populate your tables. So no, there will be no duplication, your data after restoring the dump will be the same as in the source database.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange
scroll top