File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -6803,19 +6803,18 @@ void THD::reset_for_next_command()
6803
6803
/*
6804
6804
Autoinc variables should be adjusted only for locally executed
6805
6805
transactions. Appliers and replayers are either processing ROW
6806
- events or get autoinc variable values from Query_log_event.
6806
+ events or get autoinc variable values from Query_log_event and
6807
+ mysql slave may be processing STATEMENT format events, but he should
6808
+ use autoinc values passed in binlog events, not the values forced by
6809
+ the cluster.
6807
6810
*/
6808
6811
if (WSREP (thd) && thd->wsrep_exec_mode == LOCAL_STATE &&
6809
6812
!thd->slave_thread && wsrep_auto_increment_control)
6810
6813
{
6811
- if (thd->variables .auto_increment_offset !=
6812
- global_system_variables.auto_increment_offset )
6813
- thd->variables .auto_increment_offset =
6814
- global_system_variables.auto_increment_offset ;
6815
- if (thd->variables .auto_increment_increment !=
6816
- global_system_variables.auto_increment_increment )
6817
- thd->variables .auto_increment_increment =
6818
- global_system_variables.auto_increment_increment ;
6814
+ thd->variables .auto_increment_offset =
6815
+ global_system_variables.auto_increment_offset ;
6816
+ thd->variables .auto_increment_increment =
6817
+ global_system_variables.auto_increment_increment ;
6819
6818
}
6820
6819
#endif /* WITH_WSREP */
6821
6820
thd->query_start_used = 0 ;
You can’t perform that action at this time.
0 commit comments