diff options
author | Jan Lindström <jplindst@mariadb.org> | 2014-04-16 12:13:43 +0300 |
---|---|---|
committer | Jan Lindström <jplindst@mariadb.org> | 2014-04-16 12:13:43 +0300 |
commit | 150e88e8c9b85e3e6ce500a91fd215d231e99881 (patch) | |
tree | e029a8c9beae4cf67edc5239694c68f8b4de28c0 /sql/sql_trigger.cc | |
parent | 983366e0eef50b95329bcba154ee4fb38b85df3c (diff) | |
parent | 142c20eda9d287f7f898dd8d89821f0e809dafc6 (diff) | |
download | mariadb-git-150e88e8c9b85e3e6ce500a91fd215d231e99881.tar.gz |
Merge from lp:maria/5.5 to maria-5.5.37 release revision 4154.
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 e0ba7d94f9f..2b64239c41b 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; |