Although the original bug was fixed in 5.5 (or even 5.1) and therefore a new bug was introduced in the same version, this problem did not reveal itself until "super_read_only" functionality was introduced (in 5.6).
Despite the fact that the execution was going through the wrong path ("else" block of the "if (unlikely(thd->slave_thread))"), the error was never reported.
Here is this "else" block from 5.5
*****************************************
else
{
#endif /* HAVE_REPLICATION */
if (res)
break;
if (opt_readonly &&
!(thd->security_ctx->master_access & SUPER_ACL) &&
some_non_temp_table_to_be_updated(thd, all_tables))
{
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
break;
}
#ifdef HAVE_REPLICATION
} /* unlikely */
#endif
*****************************************
Because for slave threads "thd->security_ctx->master_access" was always set in "Security_context::skip_grants()" and therefore always included "SUPER_ACL" flag, "my_error()" was never called.
Although the original bug was fixed in 5.5 (or even 5.1) and therefore a new bug was introduced in the same version, this problem did not reveal itself until "super_read_only" functionality was introduced (in 5.6).
Despite the fact that the execution was going through the wrong path ("else" block of the "if (unlikely( thd->slave_ thread) )"), the error was never reported.
Here is this "else" block from 5.5 ******* ******* ******* ******* ****** >security_ ctx->master_ access & SUPER_ACL) && non_temp_ table_to_ be_updated( thd, all_tables)) ER_OPTION_ PREVENTS_ STATEMENT, MYF(0), "--read-only");
*******
else
{
#endif /* HAVE_REPLICATION */
if (res)
break;
if (opt_readonly &&
!(thd-
some_
{
my_error(
break;
}
#ifdef HAVE_REPLICATION
} /* unlikely */
#endif
******* ******* ******* ******* ******* ****** ctx->master_ access" was always set in "Security_ context: :skip_grants( )" and therefore always included "SUPER_ACL" flag, "my_error()" was never called.
Because for slave threads "thd->security_