In "sql_parse.cc" in "mysql_execute_command()", "case SQLCOM_UPDATE_MULTI:" branch
*****************************************
#ifdef HAVE_REPLICATION
/* Check slave filtering rules */
if (unlikely(thd->slave_thread && !have_table_map_for_update))
{
if (all_tables_not_ok(thd, all_tables))
{
if (res!= 0)
{
res= 0; /* don't care of prev failure */ thd->clear_error(); /* filters are of highest prior */
}
/* we warn the slave SQL thread */ my_error(ER_SLAVE_IGNORED_TABLE, MYF(0));
break;
}
if (res)
break;
}
else
{
#endif /* HAVE_REPLICATION */
if (res)
break;
bool enforce_ro = true;
if (!opt_super_readonly)
enforce_ro = !(thd->security_ctx->master_access & SUPER_ACL);
if (opt_readonly &&
enforce_ro &&
some_non_temp_table_to_be_updated(thd, all_tables))
{ my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), opt_super_readonly ? "--read-only (super)" : "--read-only");
}
#ifdef HAVE_REPLICATION
} /* unlikely */
#endif
*****************************************
"!have_table_map_for_update" additional condition was put in the wrong place. It should have been added inside the "slave" ("if (unlikely(thd->slave_thread))") branch.
The problem was introduced in commit 78e1f5d "Cherry picking patch for BUG#37051" (https:/ /github. com/percona/ percona- server/ commit/ 78e1f5d5232a471 e21234efb55a683 161b72d40a) /bugs.mysql. com/bug. php?id= 37051).
Original BUG#37051 "Replication rules not evaluated correctly"
(https:/
In "sql_parse.cc" in "mysql_ execute_ command( )", "case SQLCOM_ UPDATE_ MULTI:" branch ******* ******* ******* ******* ****** thd->slave_ thread && !have_table_ map_for_ update) ) not_ok( thd, all_tables))
thd- >clear_ error() ; /* filters are of highest prior */
my_error( ER_SLAVE_ IGNORED_ TABLE, MYF(0)); readonly) security_ ctx->master_ access & SUPER_ACL); non_temp_ table_to_ be_updated( thd, all_tables))
my_error( ER_OPTION_ PREVENTS_ STATEMENT, MYF(0),
opt_ super_readonly ? "--read-only (super)" : "--read-only"); ******* ******* ******* ******* ******
*******
#ifdef HAVE_REPLICATION
/* Check slave filtering rules */
if (unlikely(
{
if (all_tables_
{
if (res!= 0)
{
res= 0; /* don't care of prev failure */
}
/* we warn the slave SQL thread */
break;
}
if (res)
break;
}
else
{
#endif /* HAVE_REPLICATION */
if (res)
break;
bool enforce_ro = true;
if (!opt_super_
enforce_ro = !(thd->
if (opt_readonly &&
enforce_ro &&
some_
{
}
#ifdef HAVE_REPLICATION
} /* unlikely */
#endif
*******
"!have_ table_map_ for_update" additional condition was put in the wrong place. It should have been added inside the "slave" ("if (unlikely( thd->slave_ thread) )") branch.