1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00
Post review changes
the --read-only option is not enforced for the slave thread in replication, or for the SUPER user.
This commit is contained in:
malff/marcsql@weblab.(none)
2006-11-30 18:43:33 -07:00
parent bafbe2c7c7
commit e1bdc140d1
5 changed files with 229 additions and 2 deletions

View File

@@ -693,7 +693,11 @@ int ha_commit_trans(THD *thd, bool all)
DBUG_RETURN(1);
}
if (is_real_trans && opt_readonly)
if ( is_real_trans
&& opt_readonly
&& ! (thd->security_ctx->master_access & SUPER_ACL)
&& ! thd->slave_thread
)
{
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
ha_rollback_trans(thd, all);