diff options
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7238e439392..c6d80e1ba97 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6883,10 +6883,13 @@ void THD::reset_for_next_command() /* Autoinc variables should be adjusted only for locally executed transactions. Appliers and replayers are either processing ROW - events or get autoinc variable values from Query_log_event. + events or get autoinc variable values from Query_log_event and + mysql slave may be processing STATEMENT format events, but he should + use autoinc values passed in binlog events, not the values forced by + the cluster. */ if (WSREP(thd) && thd->wsrep_exec_mode == LOCAL_STATE && - wsrep_auto_increment_control) + !thd->slave_thread && wsrep_auto_increment_control) { thd->variables.auto_increment_offset= global_system_variables.auto_increment_offset; |