summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.cc
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2005-11-10 17:53:09 +0100
committerunknown <guilhem@mysql.com>2005-11-10 17:53:09 +0100
commitfa22ce3f1ad9bd3d33bd00d505c71fe9c2cc9fc8 (patch)
tree8dffd13b9e21841c989e0f0841708b36f19e27b2 /sql/sql_trigger.cc
parent73006d114f51dce06766422e6040d646d90378d3 (diff)
parent20285580ccf87fddc7045e9e2d898bbce0286530 (diff)
downloadmariadb-git-fa22ce3f1ad9bd3d33bd00d505c71fe9c2cc9fc8.tar.gz
Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into mysql.com:/home/mysql_src/mysql-5.0-release
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r--sql/sql_trigger.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index dbad8dcffb5..3eaa067807a 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -131,9 +131,12 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
But a trigger can in theory be used to do nasty things (if it supported
DROP for example) so we do the check for privileges. For now there is
already a stronger test right above; but when this stronger test will
- be removed, the test below will hold.
+ be removed, the test below will hold. Because triggers have the same
+ nature as functions regarding binlogging: their body is implicitely
+ binlogged, so they share the same danger, so trust_function_creators
+ applies to them too.
*/
- if (!trust_routine_creators && mysql_bin_log.is_open() &&
+ if (!trust_function_creators && mysql_bin_log.is_open() &&
!(thd->security_ctx->master_access & SUPER_ACL))
{
my_error(ER_BINLOG_CREATE_ROUTINE_NEED_SUPER, MYF(0));