summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorunknown <hery.ramilison@oracle.com>2011-07-06 01:13:50 +0200
committerMySQL Release Engineering <mysql-re_ww@oracle.com>2011-07-06 01:13:50 +0200
commit7d605ec45f8e55e1775fd028931c459e6501d25a (patch)
tree31e14059cf5a1e5e8c1601a2488b98c4af1bfeb0 /sql/sp_head.cc
parent8f73e64fff57fe4080cfc4d2816555b0d22b9e13 (diff)
parent8b1566aaaf93e6e885badd6500a07a0f70cc81f3 (diff)
downloadmariadb-git-7d605ec45f8e55e1775fd028931c459e6501d25a.tar.gz
Merge from mysql-5.5.14-release
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 7c5b5be3e00..ce713504a38 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2591,8 +2591,9 @@ bool check_show_routine_access(THD *thd, sp_head *sp, bool *full_access)
bzero((char*) &tables,sizeof(tables));
tables.db= (char*) "mysql";
tables.table_name= tables.alias= (char*) "proc";
- *full_access= (!check_table_access(thd, SELECT_ACL, &tables, FALSE,
- 1, TRUE) ||
+ *full_access= ((!check_table_access(thd, SELECT_ACL, &tables, FALSE,
+ 1, TRUE) &&
+ (tables.grant.privilege & SELECT_ACL) != 0) ||
(!strcmp(sp->m_definer_user.str,
thd->security_ctx->priv_user) &&
!strcmp(sp->m_definer_host.str,