diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-05-21 11:09:55 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-05-21 11:09:55 -0400 |
commit | 086af8367ed2499adae378638225ceb14c85f046 (patch) | |
tree | 953720d86a4decd67a24b560ffbe277900ff9609 /sql/sql_trigger.cc | |
parent | 558995ad84ca1348dfe681a8d111650225fcc205 (diff) | |
parent | 1170a54060168d885cbf682836342d4fc4ccae1a (diff) | |
download | mariadb-git-086af8367ed2499adae378638225ceb14c85f046.tar.gz |
bzr merge -r4209 maria/10.0.
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 d137c2ab7aa..c3188305092 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -464,6 +464,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; |