summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-08-25 15:39:39 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2016-08-25 15:39:39 -0400
commit90266e8a0eb46867c990930fa4d305d2424929ba (patch)
tree787918cf537c678ab4f7a949520c847fa3fd8442 /sql/sql_parse.cc
parentdfa3046db48d8439cf3eb02ba6623fe2f6e44f91 (diff)
parentb506d9527b4303b91f69fe6b6f21f911e5bfef72 (diff)
downloadmariadb-git-90266e8a0eb46867c990930fa4d305d2424929ba.tar.gz
Merge branch '10.0-galera' into bb-10.1-serg
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc7
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;