pt-table-sync: Please add to documentation, that "REPLACE INTO" will fire "insert trigger" in mysql variants

Bug #1622663 reported by Lars Erler on 2016-09-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Confirmed
Undecided
Unassigned

Bug Description

Please add the following to the documentation of pt-table-sync https://www.percona.com/doc/percona-toolkit/2.1/pt-table-sync.html

* pt-table-sync uses "REPLACE INTO", which will fire "insert trigger" in all mysql variants

This can be a huge drawback / data loss (overwrite) risk, if user sets via insert trigger reasonable default values for certain columns / other tables.

Example: "REPLACE INTO products" will fire trigger to set default price in "products_price" and finally overwritten by default value again :(

What irritates me most is, that there is even a cmd-line option " --[no]check-triggers"

which checks that no triggers are defined on the destination table. Maybe highlight this much more in the doc part.

Sveta Smirnova (svetasmirnova) wrote :

Thank you for the reasonable documentation request.

tags: added: pt-table-sync
Changed in percona-toolkit:
status: New → Confirmed

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1384

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers