diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-03-27 22:26:58 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-03-27 22:26:58 +0100 |
commit | cb67dcb6184535349ca4ff3d7c64eba9c63a0688 (patch) | |
tree | 10d38ccf7fe60d5ea5c866d37292833b77dfcdae /sql/sql_trigger.cc | |
parent | 44002a34e680c79c01df879b540458c2885e97e8 (diff) | |
parent | faec0e2f4aecfc902e354ae7af991779d6bfc4a7 (diff) | |
download | mariadb-git-cb67dcb6184535349ca4ff3d7c64eba9c63a0688.tar.gz |
mysql-5.5.37 selective merge
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r-- | sql/sql_trigger.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index dfb6ace57f4..b6915b708fa 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -458,6 +458,13 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) */ thd->lex->sql_command= backup.sql_command; + if (opt_readonly && !(thd->security_ctx->master_access & SUPER_ACL) && + !thd->slave_thread) + { + my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only"); + goto end; + } + if (add_table_for_trigger(thd, thd->lex->spname, if_exists, & tables)) goto end; |