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

Description

**Reported in Launchpad by Lars Erler last update 13-12-2016 12:20:03

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.

Environment

None

Smart Checklist

Activity

Show:

lpjirasync January 24, 2018 at 9:19 PM

**Comment from Launchpad by: Sveta Smirnova on: 13-12-2016 12:19:49

Thank you for the reasonable documentation request.

Details

Assignee

Reporter

Priority

Components

Fix versions

Smart Checklist

Created January 24, 2018 at 9:19 PM
Updated January 13, 2024 at 8:54 PM