mysqlbinlog_slave_exec_idempotent
Description
In some cases it is necessary to replay binlogs to a MySQL server so that duplicate-key or no-key-found errors are ignored. Even though there is the slave_exec_mode global system variable which provides this behavior when its value is set to 'IDEMPOTENT', it is sometimes convenient to be able to temporarily turn on the IDEMPOTENT mode for a particular binlog without affecting global system variables.
This patch changes slave_exec_mode to a session variable and adds a new command line option to mysqlbinlog called –slave-exec-idempotent. When the option is enabled, mysqlbinlog prepends its output with ”SET LOCAL slave_exec_mode='IDEMPOTENT';” so that all subsequent row events are applied in the idempotent mode. The option is disabled by default.
Version Specific Information
| Percona Server Version | Comments |
|---|---|
| release-5.1.52-12-rnt | Full functionality available. |
Other Information
| Author/Origin | Alexey Kopytov |
System variables
The patch changes the scope of the slave_exec_mode system variable from global to session.
Command line options
--slave-exec-idempotent
| General Description: | |
|---|---|
| Utility | mysqlbinlog |
| Command Line | Yes |
| Config File | Yes |
| Permitted Values: | |
| Type | Boolean |
| Default Value | off |


