diff --git a/mysql-test/suite/innodb/r/fake_changes-7000.result b/mysql-test/suite/innodb/r/fake_changes-7000.result new file mode 100644 index 00000000000..e41020b7d74 --- /dev/null +++ b/mysql-test/suite/innodb/r/fake_changes-7000.result @@ -0,0 +1,6 @@ +create table t1 (i int) engine=InnoDB; +set innodb_fake_changes = 1; +insert into t1 values (1); +ERROR HY000: Got error 131 "Command not supported by database" during COMMIT +set innodb_fake_changes = 0; +drop table t1; diff --git a/mysql-test/suite/innodb/t/fake_changes-7000.test b/mysql-test/suite/innodb/t/fake_changes-7000.test new file mode 100644 index 00000000000..2be6be2d476 --- /dev/null +++ b/mysql-test/suite/innodb/t/fake_changes-7000.test @@ -0,0 +1,9 @@ +--source include/have_log_bin.inc +--source include/have_xtradb.inc + +create table t1 (i int) engine=InnoDB; +set innodb_fake_changes = 1; +--disable_abort_on_error +insert into t1 values (1); +set innodb_fake_changes = 0; +drop table t1; diff --git a/sql/handler.cc b/sql/handler.cc index 41e686003c5..7c70babfea8 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1152,9 +1152,8 @@ static int prepare_or_error(handlerton *ht, THD *thd, bool all) { /* avoid sending error, if we're going to replay the transaction */ #ifdef WITH_WSREP - if (ht == wsrep_hton && - err != EMSGSIZE && - thd->wsrep_conflict_state != MUST_REPLAY) + if (ht != wsrep_hton || + err == EMSGSIZE || thd->wsrep_conflict_state != MUST_REPLAY) #endif my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); }