Skip to content

Commit da9650a

Browse files
sjaakolaNirbhay Choubey
authored andcommitted
Refs: MW-248
- some more code cleanup
1 parent ae0fec9 commit da9650a

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

sql/sql_parse.cc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6803,19 +6803,18 @@ void THD::reset_for_next_command()
68036803
/*
68046804
Autoinc variables should be adjusted only for locally executed
68056805
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.
68076810
*/
68086811
if (WSREP(thd) && thd->wsrep_exec_mode == LOCAL_STATE &&
68096812
!thd->slave_thread && wsrep_auto_increment_control)
68106813
{
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;
68196818
}
68206819
#endif /* WITH_WSREP */
68216820
thd->query_start_used= 0;

0 commit comments

Comments
 (0)