summaryrefslogtreecommitdiff
path: root/sql/events.cc
diff options
context:
space:
mode:
authorunknown <gluh@mysql.com/eagle.(none)>2007-11-30 18:48:22 +0400
committerunknown <gluh@mysql.com/eagle.(none)>2007-11-30 18:48:22 +0400
commitff7e7fcb6794d243b8324c3a76359a9c5ac68710 (patch)
tree9fe6cf2ef16a15517abc0820b5b91d8347a126f2 /sql/events.cc
parentf4a7464f1e259840216de264b246568ea2694109 (diff)
downloadmariadb-git-ff7e7fcb6794d243b8324c3a76359a9c5ac68710.tar.gz
Bug#32775 problems with SHOW EVENTS and Information_Schema
removed unnecessary privilege checks for I_S schema mysql-test/r/information_schema.result: test result mysql-test/t/information_schema.test: test case sql/events.cc: There is no events in I_S so we don't need to execute check_access here. sql/sql_parse.cc: removed unnecessary check
Diffstat (limited to 'sql/events.cc')
-rw-r--r--sql/events.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/events.cc b/sql/events.cc
index 262c62bdbc8..4579fb4d086 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -825,8 +825,8 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */)
if (thd->lex->sql_command == SQLCOM_SHOW_EVENTS)
{
DBUG_ASSERT(thd->lex->select_lex.db);
- if (check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0,
- is_schema_db(thd->lex->select_lex.db)))
+ if (!is_schema_db(thd->lex->select_lex.db) && // There is no events in I_S
+ check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0, 0))
DBUG_RETURN(1);
db= thd->lex->select_lex.db;
}