Commit da9650a3 authored by sjaakola's avatar sjaakola Committed by Nirbhay Choubey

Refs: MW-248

- some more code cleanup
parent ae0fec9c
...@@ -6803,19 +6803,18 @@ void THD::reset_for_next_command() ...@@ -6803,19 +6803,18 @@ void THD::reset_for_next_command()
/* /*
Autoinc variables should be adjusted only for locally executed Autoinc variables should be adjusted only for locally executed
transactions. Appliers and replayers are either processing ROW 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 && if (WSREP(thd) && thd->wsrep_exec_mode == LOCAL_STATE &&
!thd->slave_thread && wsrep_auto_increment_control) !thd->slave_thread && wsrep_auto_increment_control)
{ {
if (thd->variables.auto_increment_offset != thd->variables.auto_increment_offset=
global_system_variables.auto_increment_offset) global_system_variables.auto_increment_offset;
thd->variables.auto_increment_offset= thd->variables.auto_increment_increment=
global_system_variables.auto_increment_offset; global_system_variables.auto_increment_increment;
if (thd->variables.auto_increment_increment !=
global_system_variables.auto_increment_increment)
thd->variables.auto_increment_increment=
global_system_variables.auto_increment_increment;
} }
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
thd->query_start_used= 0; thd->query_start_used= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment