diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2004-09-24 17:55:43 +0400 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2004-09-24 17:55:43 +0400 |
commit | 7c46c0d020e0bdcd3b427e2e7e058c6fefa643e0 (patch) | |
tree | 4666d6fa452427429fc798f687a092ae01f25457 /sql/sql_trigger.cc | |
parent | 79ffe4f504617693408ce717aad357cc09fbab4b (diff) | |
download | mariadb-git-7c46c0d020e0bdcd3b427e2e7e058c6fefa643e0.tar.gz |
For now we will require super privilege for creating/dropping trigger because proper
privilege checking is not in place yet.
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r-- | sql/sql_trigger.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index c376e86f18c..add4078ce8e 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -2,6 +2,7 @@ #include "sp_head.h" #include "sql_trigger.h" #include "parse_file.h" +#include "sql_acl.h" static const LEX_STRING triggers_file_type= {(char *)"TRIGGERS", 8}; @@ -54,7 +55,13 @@ int mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) if (open_and_lock_tables(thd, tables)) DBUG_RETURN(-1); - // TODO: We should check if user has TRIGGER privilege for table here. + /* + TODO: We should check if user has TRIGGER privilege for table here. + Now we just require SUPER privilege for creating/dropping because + we don't have proper privilege checking for triggers in place yet. + */ + if (check_global_access(thd, SUPER_ACL)) + DBUG_RETURN(1); table= tables->table; |