diff options
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index 9886149ba77..be267f8d160 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -151,7 +151,11 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count, } } - if (write_lock_used && opt_readonly) + if ( write_lock_used + && opt_readonly + && ! (thd->security_ctx->master_access & SUPER_ACL) + && ! thd->slave_thread + ) { /* Someone has issued SET GLOBAL READ_ONLY=1 and we want a write lock. |