mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.local:/opt/local/work/mysql-5.1-runtime mysql-test/r/log_tables.result: Auto merged sql/handler.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/r/read_only.result: Manual merge. mysql-test/t/read_only.test: Manual merge. server-tools/instance-manager/guardian.cc: Manual merge.
This commit is contained in:
@@ -692,6 +692,19 @@ int ha_commit_trans(THD *thd, bool all)
|
||||
ha_rollback_trans(thd, all);
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
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);
|
||||
error= 1;
|
||||
goto end;
|
||||
}
|
||||
|
||||
DBUG_EXECUTE_IF("crash_commit_before", abort(););
|
||||
|
||||
/* Close all cursors that can not survive COMMIT */
|
||||
|
||||
Reference in New Issue
Block a user