1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Refs: MW-248

- some more code cleanup
This commit is contained in:
sjaakola
2016-02-19 13:08:22 +02:00
committed by Nirbhay Choubey
parent ae0fec9c36
commit da9650a36a

View File

@@ -6803,19 +6803,18 @@ 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 &&
!thd->slave_thread && wsrep_auto_increment_control)
{
if (thd->variables.auto_increment_offset !=
global_system_variables.auto_increment_offset)
thd->variables.auto_increment_offset=
global_system_variables.auto_increment_offset;
if (thd->variables.auto_increment_increment !=
global_system_variables.auto_increment_increment)
thd->variables.auto_increment_increment=
global_system_variables.auto_increment_increment;
thd->variables.auto_increment_offset=
global_system_variables.auto_increment_offset;
thd->variables.auto_increment_increment=
global_system_variables.auto_increment_increment;
}
#endif /* WITH_WSREP */
thd->query_start_used= 0;